Skip to content

Commit 977523a

Browse files
authored
Merge pull request #228 from weaviate/modules/remove-octoai
Remove all references to OctoAI since they've shutdown
2 parents 91a3f1a + 72ea6c3 commit 977523a

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
@@ -34,7 +34,6 @@ export type Vectorizer =
3434
| 'text2vec-huggingface'
3535
| 'text2vec-jina'
3636
| 'text2vec-mistral'
37-
| 'text2vec-octoai'
3837
| 'text2vec-ollama'
3938
| 'text2vec-openai'
4039
| Text2VecPalmVectorizer
@@ -318,20 +317,6 @@ export type Text2VecMistralConfig = {
318317
vectorizeCollectionName?: boolean;
319318
};
320319

321-
/**
322-
* The configuration for text vectorization using the OctoAI module.
323-
*
324-
* See the [documentation](https://weaviate.io/developers/weaviate/model-providers/octoai/embeddings) for detailed usage.
325-
*/
326-
export type Text2VecOctoAIConfig = {
327-
/** The base URL to use where API requests should go. */
328-
baseURL?: string;
329-
/** The model to use. */
330-
model?: string;
331-
/** Whether to vectorize the collection name. */
332-
vectorizeCollectionName?: boolean;
333-
};
334-
335320
/**
336321
* The configuration for text vectorization using the Ollama module.
337322
*
@@ -477,8 +462,6 @@ export type VectorizerConfigType<V> = V extends 'img2vec-neural'
477462
? Text2VecJinaConfig | undefined
478463
: V extends 'text2vec-mistral'
479464
? Text2VecMistralConfig | undefined
480-
: V extends 'text2vec-octoai'
481-
? Text2VecOctoAIConfig | undefined
482465
: V extends 'text2vec-ollama'
483466
? Text2VecOllamaConfig | undefined
484467
: 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,
@@ -170,8 +169,6 @@ export type Text2VecJinaConfigCreate = Text2VecJinaConfig;
170169

171170
export type Text2VecMistralConfigCreate = Text2VecMistralConfig;
172171

173-
export type Text2VecOctoAIConfigCreate = Text2VecOctoAIConfig;
174-
175172
export type Text2VecOllamaConfigCreate = Text2VecOllamaConfig;
176173

177174
export type Text2VecOpenAIConfigCreate = Text2VecOpenAIConfig;
@@ -215,8 +212,6 @@ export type VectorizerConfigCreateType<V> = V extends 'img2vec-neural'
215212
? Text2VecJinaConfigCreate | undefined
216213
: V extends 'text2vec-mistral'
217214
? Text2VecMistralConfigCreate | undefined
218-
: V extends 'text2vec-octoai'
219-
? Text2VecOctoAIConfigCreate | undefined
220215
: V extends 'text2vec-ollama'
221216
? Text2VecOllamaConfigCreate | undefined
222217
: 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,
@@ -1098,45 +1097,6 @@ describe('Unit testing of the vectorizer factory class', () => {
10981097
});
10991098
});
11001099

1101-
it('should create the correct Text2VecOctoAIConfig type with defaults', () => {
1102-
const config = configure.vectorizer.text2VecOctoAI();
1103-
expect(config).toEqual<VectorConfigCreate<never, undefined, 'hnsw', 'text2vec-octoai'>>({
1104-
name: undefined,
1105-
vectorIndex: {
1106-
name: 'hnsw',
1107-
config: undefined,
1108-
},
1109-
vectorizer: {
1110-
name: 'text2vec-octoai',
1111-
config: undefined,
1112-
},
1113-
});
1114-
});
1115-
1116-
it('should create the correct Text2VecOctoAIConfig type with all values', () => {
1117-
const config = configure.vectorizer.text2VecOctoAI({
1118-
name: 'test',
1119-
baseURL: 'base-url',
1120-
model: 'model',
1121-
vectorizeCollectionName: true,
1122-
});
1123-
expect(config).toEqual<VectorConfigCreate<never, 'test', 'hnsw', 'text2vec-octoai'>>({
1124-
name: 'test',
1125-
vectorIndex: {
1126-
name: 'hnsw',
1127-
config: undefined,
1128-
},
1129-
vectorizer: {
1130-
name: 'text2vec-octoai',
1131-
config: {
1132-
baseURL: 'base-url',
1133-
model: 'model',
1134-
vectorizeCollectionName: true,
1135-
},
1136-
},
1137-
});
1138-
});
1139-
11401100
it('should create the correct Text2VecOllamaConfig type with defaults', () => {
11411101
const config = configure.vectorizer.text2VecOllama();
11421102
expect(config).toEqual<VectorConfigCreate<never, undefined, 'hnsw', 'text2vec-ollama'>>({
@@ -1619,32 +1579,6 @@ describe('Unit testing of the generative factory class', () => {
16191579
});
16201580
});
16211581

1622-
it('should create the correct GenerativeOctoAIConfig type with required & default values', () => {
1623-
const config = configure.generative.octoai();
1624-
expect(config).toEqual<ModuleConfig<'generative-octoai', GenerativeOctoAIConfig | undefined>>({
1625-
name: 'generative-octoai',
1626-
config: undefined,
1627-
});
1628-
});
1629-
1630-
it('should create the correct GenerativeOctoAIConfig type with all values', () => {
1631-
const config = configure.generative.octoai({
1632-
baseURL: 'base-url',
1633-
maxTokens: 100,
1634-
model: 'model',
1635-
temperature: 0.5,
1636-
});
1637-
expect(config).toEqual<ModuleConfig<'generative-octoai', GenerativeOctoAIConfig | undefined>>({
1638-
name: 'generative-octoai',
1639-
config: {
1640-
baseURL: 'base-url',
1641-
maxTokens: 100,
1642-
model: 'model',
1643-
temperature: 0.5,
1644-
},
1645-
});
1646-
});
1647-
16481582
it('should create the correct GenerativeOllamaConfig type with required & default values', () => {
16491583
const config = configure.generative.ollama();
16501584
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
@@ -472,27 +472,6 @@ export const vectorizer = {
472472
},
473473
});
474474
},
475-
/**
476-
* Create a `VectorConfigCreate` object with the vectorizer set to `'text2vec-octoai'`.
477-
*
478-
* See the [documentation](https://weaviate.io/developers/weaviate/model-providers/octoai/embeddings) for detailed usage.
479-
*
480-
* @param {ConfigureTextVectorizerOptions<T, N, I, 'text2vec-octoai'>} [opts] The configuration for the `text2vec-octoai` vectorizer.
481-
* @returns {VectorConfigCreate<PrimitiveKeys<T>, N, I, 'text2vec-octoai'>} The configuration object.
482-
*/
483-
text2VecOctoAI: <T, N extends string | undefined = undefined, I extends VectorIndexType = 'hnsw'>(
484-
opts?: ConfigureTextVectorizerOptions<T, N, I, 'text2vec-octoai'>
485-
): VectorConfigCreate<PrimitiveKeys<T>, N, I, 'text2vec-octoai'> => {
486-
const { name, sourceProperties, vectorIndexConfig, ...config } = opts || {};
487-
return makeVectorizer(name, {
488-
sourceProperties,
489-
vectorIndexConfig,
490-
vectorizerConfig: {
491-
name: 'text2vec-octoai',
492-
config: Object.keys(config).length === 0 ? undefined : config,
493-
},
494-
});
495-
},
496475
/**
497476
* Create a `VectorConfigCreate` object with the vectorizer set to `'text2vec-openai'`.
498477
*

0 commit comments

Comments
 (0)