Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/core/src/config/types/vectorizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,8 @@ export type Text2VecOpenAIConfig = {
baseURL?: string;
/** The dimensionality of the vector once embedded. */
dimensions?: number;
/** The endpoint path to use for embedding requests. Defaults to `/v1/embeddings` in Weaviate. */
endpoint?: string;
/** The model to use. */
model?: 'text-embedding-3-small' | 'text-embedding-3-large' | 'text-embedding-ada-002' | string;
/** The model version to use. */
Expand Down Expand Up @@ -702,6 +704,8 @@ export type Text2VecModel2Vec = {
export type Text2VecMorphConfig = {
/** The base URL to use where API requests should go. */
baseURL?: string;
/** The endpoint path to use for embedding requests. Defaults to `/v1/embeddings` in Weaviate. */
endpoint?: string;
/** The model to use. */
model?: string;
};
Expand Down
4 changes: 4 additions & 0 deletions packages/test/node/configure/unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1394,6 +1394,7 @@ describe('Unit testing of the vectorizer factory class', () => {
name: 'test',
baseURL: 'base-url',
dimensions: 256,
endpoint: '/v1/embeddings',
model: 'model',
modelVersion: 'model-version',
type: 'type',
Expand All @@ -1405,6 +1406,7 @@ describe('Unit testing of the vectorizer factory class', () => {
config: {
baseURL: 'base-url',
dimensions: 256,
endpoint: '/v1/embeddings',
model: 'model',
modelVersion: 'model-version',
type: 'type',
Expand Down Expand Up @@ -1703,6 +1705,7 @@ describe('Unit testing of the vectorizer factory class', () => {
const config = configure.vectors.text2VecMorph({
name: 'test',
baseURL: 'base-url',
endpoint: '/v1/embeddings',
model: 'model',
});
expect(config).toEqual<VectorConfigCreate<never, 'test', 'hnsw', 'text2vec-morph'>>({
Expand All @@ -1711,6 +1714,7 @@ describe('Unit testing of the vectorizer factory class', () => {
name: 'text2vec-morph',
config: {
baseURL: 'base-url',
endpoint: '/v1/embeddings',
model: 'model',
},
},
Expand Down
Loading