Skip to content

Commit 72ea6c3

Browse files
committed
Remove all references to OctoAI since they've shutdown
1 parent d88f6d2 commit 72ea6c3

File tree

8 files changed

+1285
-770
lines changed

8 files changed

+1285
-770
lines changed

src/collections/config/types/generative.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,6 @@ export type GenerativeMistralConfig = {
5858
temperature?: number;
5959
};
6060

61-
export type GenerativeOctoAIConfig = {
62-
baseURL?: string;
63-
maxTokens?: number;
64-
model?: string;
65-
temperature?: number;
66-
};
67-
6861
export type GenerativeOllamaConfig = {
6962
apiEndpoint?: string;
7063
model?: string;
@@ -102,7 +95,6 @@ export type GenerativeConfig =
10295
| GenerativeGoogleConfig
10396
| GenerativeFriendliAIConfig
10497
| GenerativeMistralConfig
105-
| GenerativeOctoAIConfig
10698
| GenerativeOllamaConfig
10799
| GenerativeOpenAIConfig
108100
| GenerativePaLMConfig
@@ -127,8 +119,6 @@ export type GenerativeConfigType<G> = G extends 'generative-anthropic'
127119
? GenerativeFriendliAIConfig
128120
: G extends 'generative-mistral'
129121
? GenerativeMistralConfig
130-
: G extends 'generative-octoai'
131-
? GenerativeOctoAIConfig
132122
: G extends 'generative-ollama'
133123
? GenerativeOllamaConfig
134124
: G extends 'generative-openai'
@@ -152,7 +142,6 @@ export type GenerativeSearch =
152142
| 'generative-google'
153143
| 'generative-friendliai'
154144
| 'generative-mistral'
155-
| 'generative-octoai'
156145
| 'generative-ollama'
157146
| 'generative-openai'
158147
| GenerativePalm

src/collections/config/types/vectorizer.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export type Vectorizer =
3333
| 'text2vec-huggingface'
3434
| 'text2vec-jina'
3535
| 'text2vec-mistral'
36-
| 'text2vec-octoai'
3736
| 'text2vec-ollama'
3837
| 'text2vec-openai'
3938
| Text2VecPalmVectorizer
@@ -290,20 +289,6 @@ export type Text2VecMistralConfig = {
290289
vectorizeCollectionName?: boolean;
291290
};
292291

293-
/**
294-
* The configuration for text vectorization using the OctoAI module.
295-
*
296-
* See the [documentation](https://weaviate.io/developers/weaviate/model-providers/octoai/embeddings) for detailed usage.
297-
*/
298-
export type Text2VecOctoAIConfig = {
299-
/** The base URL to use where API requests should go. */
300-
baseURL?: string;
301-
/** The model to use. */
302-
model?: string;
303-
/** Whether to vectorize the collection name. */
304-
vectorizeCollectionName?: boolean;
305-
};
306-
307292
/**
308293
* The configuration for text vectorization using the Ollama module.
309294
*
@@ -447,8 +432,6 @@ export type VectorizerConfigType<V> = V extends 'img2vec-neural'
447432
? Text2VecJinaConfig | undefined
448433
: V extends 'text2vec-mistral'
449434
? Text2VecMistralConfig | undefined
450-
: V extends 'text2vec-octoai'
451-
? Text2VecOctoAIConfig | undefined
452435
: V extends 'text2vec-ollama'
453436
? Text2VecOllamaConfig | undefined
454437
: V extends 'text2vec-openai'

src/collections/configure/generative.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
GenerativeFriendliAIConfig,
99
GenerativeGoogleConfig,
1010
GenerativeMistralConfig,
11-
GenerativeOctoAIConfig,
1211
GenerativeOllamaConfig,
1312
GenerativeOpenAIConfig,
1413
GenerativePaLMConfig,
@@ -23,7 +22,6 @@ import {
2322
GenerativeDatabricksConfigCreate,
2423
GenerativeFriendliAIConfigCreate,
2524
GenerativeMistralConfigCreate,
26-
GenerativeOctoAIConfigCreate,
2725
GenerativeOllamaConfigCreate,
2826
GenerativeOpenAIConfigCreate,
2927
GenerativePaLMConfigCreate,
@@ -171,22 +169,6 @@ export default {
171169
config,
172170
};
173171
},
174-
/**
175-
* Create a `ModuleConfig<'generative-octoai', GenerativeOpenAIConfig | undefined>` object for use when performing AI generation using the `generative-octoai` module.
176-
*
177-
* See the [documentation](https://weaviate.io/developers/weaviate/model-providers/octoai/generative) for detailed usage.
178-
*
179-
* @param {GenerativeOctoAIConfigCreate} [config] The configuration for the `generative-octoai` module.
180-
* @returns {ModuleConfig<'generative-octoai', GenerativeOctoAIConfig | undefined>} The configuration object.
181-
*/
182-
octoai(
183-
config?: GenerativeOctoAIConfigCreate
184-
): ModuleConfig<'generative-octoai', GenerativeOctoAIConfig | undefined> {
185-
return {
186-
name: 'generative-octoai',
187-
config,
188-
};
189-
},
190172
/**
191173
* Create a `ModuleConfig<'generative-ollama', GenerativeOllamaConfig | undefined>` object for use when performing AI generation using the `generative-ollama` module.
192174
*

src/collections/configure/types/generative.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
GenerativeDatabricksConfig,
66
GenerativeFriendliAIConfig,
77
GenerativeMistralConfig,
8-
GenerativeOctoAIConfig,
98
GenerativeOllamaConfig,
109
GenerativePaLMConfig,
1110
} from '../../index.js';
@@ -45,8 +44,6 @@ export type GenerativeFriendliAIConfigCreate = GenerativeFriendliAIConfig;
4544

4645
export type GenerativeMistralConfigCreate = GenerativeMistralConfig;
4746

48-
export type GenerativeOctoAIConfigCreate = GenerativeOctoAIConfig;
49-
5047
export type GenerativeOllamaConfigCreate = GenerativeOllamaConfig;
5148

5249
export type GenerativeOpenAIConfigCreate = GenerativeOpenAIConfigBaseCreate & {
@@ -64,7 +61,6 @@ export type GenerativeConfigCreate =
6461
| GenerativeDatabricksConfigCreate
6562
| GenerativeFriendliAIConfigCreate
6663
| GenerativeMistralConfigCreate
67-
| GenerativeOctoAIConfigCreate
6864
| GenerativeOllamaConfigCreate
6965
| GenerativeOpenAIConfigCreate
7066
| GenerativePaLMConfigCreate
@@ -85,8 +81,6 @@ export type GenerativeConfigCreateType<G> = G extends 'generative-anthropic'
8581
? GenerativeFriendliAIConfigCreate
8682
: G extends 'generative-mistral'
8783
? GenerativeMistralConfigCreate
88-
: G extends 'generative-octoai'
89-
? GenerativeOctoAIConfigCreate
9084
: G extends 'generative-ollama'
9185
? GenerativeOllamaConfigCreate
9286
: G extends 'generative-openai'

src/collections/configure/types/vectorizer.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
Text2VecHuggingFaceConfig,
1414
Text2VecJinaConfig,
1515
Text2VecMistralConfig,
16-
Text2VecOctoAIConfig,
1716
Text2VecOllamaConfig,
1817
Text2VecOpenAIConfig,
1918
Text2VecTransformersConfig,
@@ -154,8 +153,6 @@ export type Text2VecJinaConfigCreate = Text2VecJinaConfig;
154153

155154
export type Text2VecMistralConfigCreate = Text2VecMistralConfig;
156155

157-
export type Text2VecOctoAIConfigCreate = Text2VecOctoAIConfig;
158-
159156
export type Text2VecOllamaConfigCreate = Text2VecOllamaConfig;
160157

161158
export type Text2VecOpenAIConfigCreate = Text2VecOpenAIConfig;
@@ -197,8 +194,6 @@ export type VectorizerConfigCreateType<V> = V extends 'img2vec-neural'
197194
? Text2VecJinaConfigCreate | undefined
198195
: V extends 'text2vec-mistral'
199196
? Text2VecMistralConfigCreate | undefined
200-
: V extends 'text2vec-octoai'
201-
? Text2VecOctoAIConfigCreate | undefined
202197
: V extends 'text2vec-ollama'
203198
? Text2VecOllamaConfigCreate | undefined
204199
: V extends 'text2vec-openai'

src/collections/configure/unit.test.ts

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
GenerativeFriendliAIConfig,
99
GenerativeGoogleConfig,
1010
GenerativeMistralConfig,
11-
GenerativeOctoAIConfig,
1211
GenerativeOllamaConfig,
1312
GenerativeOpenAIConfig,
1413
ModuleConfig,
@@ -1025,45 +1024,6 @@ describe('Unit testing of the vectorizer factory class', () => {
10251024
});
10261025
});
10271026

1028-
it('should create the correct Text2VecOctoAIConfig type with defaults', () => {
1029-
const config = configure.vectorizer.text2VecOctoAI();
1030-
expect(config).toEqual<VectorConfigCreate<never, undefined, 'hnsw', 'text2vec-octoai'>>({
1031-
name: undefined,
1032-
vectorIndex: {
1033-
name: 'hnsw',
1034-
config: undefined,
1035-
},
1036-
vectorizer: {
1037-
name: 'text2vec-octoai',
1038-
config: undefined,
1039-
},
1040-
});
1041-
});
1042-
1043-
it('should create the correct Text2VecOctoAIConfig type with all values', () => {
1044-
const config = configure.vectorizer.text2VecOctoAI({
1045-
name: 'test',
1046-
baseURL: 'base-url',
1047-
model: 'model',
1048-
vectorizeCollectionName: true,
1049-
});
1050-
expect(config).toEqual<VectorConfigCreate<never, 'test', 'hnsw', 'text2vec-octoai'>>({
1051-
name: 'test',
1052-
vectorIndex: {
1053-
name: 'hnsw',
1054-
config: undefined,
1055-
},
1056-
vectorizer: {
1057-
name: 'text2vec-octoai',
1058-
config: {
1059-
baseURL: 'base-url',
1060-
model: 'model',
1061-
vectorizeCollectionName: true,
1062-
},
1063-
},
1064-
});
1065-
});
1066-
10671027
it('should create the correct Text2VecOllamaConfig type with defaults', () => {
10681028
const config = configure.vectorizer.text2VecOllama();
10691029
expect(config).toEqual<VectorConfigCreate<never, undefined, 'hnsw', 'text2vec-ollama'>>({
@@ -1546,32 +1506,6 @@ describe('Unit testing of the generative factory class', () => {
15461506
});
15471507
});
15481508

1549-
it('should create the correct GenerativeOctoAIConfig type with required & default values', () => {
1550-
const config = configure.generative.octoai();
1551-
expect(config).toEqual<ModuleConfig<'generative-octoai', GenerativeOctoAIConfig | undefined>>({
1552-
name: 'generative-octoai',
1553-
config: undefined,
1554-
});
1555-
});
1556-
1557-
it('should create the correct GenerativeOctoAIConfig type with all values', () => {
1558-
const config = configure.generative.octoai({
1559-
baseURL: 'base-url',
1560-
maxTokens: 100,
1561-
model: 'model',
1562-
temperature: 0.5,
1563-
});
1564-
expect(config).toEqual<ModuleConfig<'generative-octoai', GenerativeOctoAIConfig | undefined>>({
1565-
name: 'generative-octoai',
1566-
config: {
1567-
baseURL: 'base-url',
1568-
maxTokens: 100,
1569-
model: 'model',
1570-
temperature: 0.5,
1571-
},
1572-
});
1573-
});
1574-
15751509
it('should create the correct GenerativeOllamaConfig type with required & default values', () => {
15761510
const config = configure.generative.ollama();
15771511
expect(config).toEqual<ModuleConfig<'generative-ollama', GenerativeOllamaConfig | undefined>>({

src/collections/configure/vectorizer.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -439,27 +439,6 @@ export const vectorizer = {
439439
},
440440
});
441441
},
442-
/**
443-
* Create a `VectorConfigCreate` object with the vectorizer set to `'text2vec-octoai'`.
444-
*
445-
* See the [documentation](https://weaviate.io/developers/weaviate/model-providers/octoai/embeddings) for detailed usage.
446-
*
447-
* @param {ConfigureTextVectorizerOptions<T, N, I, 'text2vec-octoai'>} [opts] The configuration for the `text2vec-octoai` vectorizer.
448-
* @returns {VectorConfigCreate<PrimitiveKeys<T>, N, I, 'text2vec-octoai'>} The configuration object.
449-
*/
450-
text2VecOctoAI: <T, N extends string | undefined = undefined, I extends VectorIndexType = 'hnsw'>(
451-
opts?: ConfigureTextVectorizerOptions<T, N, I, 'text2vec-octoai'>
452-
): VectorConfigCreate<PrimitiveKeys<T>, N, I, 'text2vec-octoai'> => {
453-
const { name, sourceProperties, vectorIndexConfig, ...config } = opts || {};
454-
return makeVectorizer(name, {
455-
sourceProperties,
456-
vectorIndexConfig,
457-
vectorizerConfig: {
458-
name: 'text2vec-octoai',
459-
config: Object.keys(config).length === 0 ? undefined : config,
460-
},
461-
});
462-
},
463442
/**
464443
* Create a `VectorConfigCreate` object with the vectorizer set to `'text2vec-openai'`.
465444
*

0 commit comments

Comments
 (0)