Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove all references to OctoAI since they've shutdown #228

Merged
merged 1 commit into from
Nov 13, 2024
Merged
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
11 changes: 0 additions & 11 deletions src/collections/config/types/generative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,6 @@ export type GenerativeMistralConfig = {
temperature?: number;
};

export type GenerativeOctoAIConfig = {
baseURL?: string;
maxTokens?: number;
model?: string;
temperature?: number;
};

export type GenerativeOllamaConfig = {
apiEndpoint?: string;
model?: string;
Expand Down Expand Up @@ -102,7 +95,6 @@ export type GenerativeConfig =
| GenerativeGoogleConfig
| GenerativeFriendliAIConfig
| GenerativeMistralConfig
| GenerativeOctoAIConfig
| GenerativeOllamaConfig
| GenerativeOpenAIConfig
| GenerativePaLMConfig
Expand All @@ -127,8 +119,6 @@ export type GenerativeConfigType<G> = G extends 'generative-anthropic'
? GenerativeFriendliAIConfig
: G extends 'generative-mistral'
? GenerativeMistralConfig
: G extends 'generative-octoai'
? GenerativeOctoAIConfig
: G extends 'generative-ollama'
? GenerativeOllamaConfig
: G extends 'generative-openai'
Expand All @@ -152,7 +142,6 @@ export type GenerativeSearch =
| 'generative-google'
| 'generative-friendliai'
| 'generative-mistral'
| 'generative-octoai'
| 'generative-ollama'
| 'generative-openai'
| GenerativePalm
Expand Down
17 changes: 0 additions & 17 deletions src/collections/config/types/vectorizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export type Vectorizer =
| 'text2vec-huggingface'
| 'text2vec-jina'
| 'text2vec-mistral'
| 'text2vec-octoai'
| 'text2vec-ollama'
| 'text2vec-openai'
| Text2VecPalmVectorizer
Expand Down Expand Up @@ -290,20 +289,6 @@ export type Text2VecMistralConfig = {
vectorizeCollectionName?: boolean;
};

/**
* The configuration for text vectorization using the OctoAI module.
*
* See the [documentation](https://weaviate.io/developers/weaviate/model-providers/octoai/embeddings) for detailed usage.
*/
export type Text2VecOctoAIConfig = {
/** The base URL to use where API requests should go. */
baseURL?: string;
/** The model to use. */
model?: string;
/** Whether to vectorize the collection name. */
vectorizeCollectionName?: boolean;
};

/**
* The configuration for text vectorization using the Ollama module.
*
Expand Down Expand Up @@ -447,8 +432,6 @@ export type VectorizerConfigType<V> = V extends 'img2vec-neural'
? Text2VecJinaConfig | undefined
: V extends 'text2vec-mistral'
? Text2VecMistralConfig | undefined
: V extends 'text2vec-octoai'
? Text2VecOctoAIConfig | undefined
: V extends 'text2vec-ollama'
? Text2VecOllamaConfig | undefined
: V extends 'text2vec-openai'
Expand Down
18 changes: 0 additions & 18 deletions src/collections/configure/generative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
GenerativeFriendliAIConfig,
GenerativeGoogleConfig,
GenerativeMistralConfig,
GenerativeOctoAIConfig,
GenerativeOllamaConfig,
GenerativeOpenAIConfig,
GenerativePaLMConfig,
Expand All @@ -23,7 +22,6 @@ import {
GenerativeDatabricksConfigCreate,
GenerativeFriendliAIConfigCreate,
GenerativeMistralConfigCreate,
GenerativeOctoAIConfigCreate,
GenerativeOllamaConfigCreate,
GenerativeOpenAIConfigCreate,
GenerativePaLMConfigCreate,
Expand Down Expand Up @@ -171,22 +169,6 @@ export default {
config,
};
},
/**
* Create a `ModuleConfig<'generative-octoai', GenerativeOpenAIConfig | undefined>` object for use when performing AI generation using the `generative-octoai` module.
*
* See the [documentation](https://weaviate.io/developers/weaviate/model-providers/octoai/generative) for detailed usage.
*
* @param {GenerativeOctoAIConfigCreate} [config] The configuration for the `generative-octoai` module.
* @returns {ModuleConfig<'generative-octoai', GenerativeOctoAIConfig | undefined>} The configuration object.
*/
octoai(
config?: GenerativeOctoAIConfigCreate
): ModuleConfig<'generative-octoai', GenerativeOctoAIConfig | undefined> {
return {
name: 'generative-octoai',
config,
};
},
/**
* Create a `ModuleConfig<'generative-ollama', GenerativeOllamaConfig | undefined>` object for use when performing AI generation using the `generative-ollama` module.
*
Expand Down
6 changes: 0 additions & 6 deletions src/collections/configure/types/generative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
GenerativeDatabricksConfig,
GenerativeFriendliAIConfig,
GenerativeMistralConfig,
GenerativeOctoAIConfig,
GenerativeOllamaConfig,
GenerativePaLMConfig,
} from '../../index.js';
Expand Down Expand Up @@ -45,8 +44,6 @@ export type GenerativeFriendliAIConfigCreate = GenerativeFriendliAIConfig;

export type GenerativeMistralConfigCreate = GenerativeMistralConfig;

export type GenerativeOctoAIConfigCreate = GenerativeOctoAIConfig;

export type GenerativeOllamaConfigCreate = GenerativeOllamaConfig;

export type GenerativeOpenAIConfigCreate = GenerativeOpenAIConfigBaseCreate & {
Expand All @@ -64,7 +61,6 @@ export type GenerativeConfigCreate =
| GenerativeDatabricksConfigCreate
| GenerativeFriendliAIConfigCreate
| GenerativeMistralConfigCreate
| GenerativeOctoAIConfigCreate
| GenerativeOllamaConfigCreate
| GenerativeOpenAIConfigCreate
| GenerativePaLMConfigCreate
Expand All @@ -85,8 +81,6 @@ export type GenerativeConfigCreateType<G> = G extends 'generative-anthropic'
? GenerativeFriendliAIConfigCreate
: G extends 'generative-mistral'
? GenerativeMistralConfigCreate
: G extends 'generative-octoai'
? GenerativeOctoAIConfigCreate
: G extends 'generative-ollama'
? GenerativeOllamaConfigCreate
: G extends 'generative-openai'
Expand Down
5 changes: 0 additions & 5 deletions src/collections/configure/types/vectorizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
Text2VecHuggingFaceConfig,
Text2VecJinaConfig,
Text2VecMistralConfig,
Text2VecOctoAIConfig,
Text2VecOllamaConfig,
Text2VecOpenAIConfig,
Text2VecTransformersConfig,
Expand Down Expand Up @@ -154,8 +153,6 @@ export type Text2VecJinaConfigCreate = Text2VecJinaConfig;

export type Text2VecMistralConfigCreate = Text2VecMistralConfig;

export type Text2VecOctoAIConfigCreate = Text2VecOctoAIConfig;

export type Text2VecOllamaConfigCreate = Text2VecOllamaConfig;

export type Text2VecOpenAIConfigCreate = Text2VecOpenAIConfig;
Expand Down Expand Up @@ -197,8 +194,6 @@ export type VectorizerConfigCreateType<V> = V extends 'img2vec-neural'
? Text2VecJinaConfigCreate | undefined
: V extends 'text2vec-mistral'
? Text2VecMistralConfigCreate | undefined
: V extends 'text2vec-octoai'
? Text2VecOctoAIConfigCreate | undefined
: V extends 'text2vec-ollama'
? Text2VecOllamaConfigCreate | undefined
: V extends 'text2vec-openai'
Expand Down
66 changes: 0 additions & 66 deletions src/collections/configure/unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
GenerativeFriendliAIConfig,
GenerativeGoogleConfig,
GenerativeMistralConfig,
GenerativeOctoAIConfig,
GenerativeOllamaConfig,
GenerativeOpenAIConfig,
ModuleConfig,
Expand Down Expand Up @@ -1025,45 +1024,6 @@ describe('Unit testing of the vectorizer factory class', () => {
});
});

it('should create the correct Text2VecOctoAIConfig type with defaults', () => {
const config = configure.vectorizer.text2VecOctoAI();
expect(config).toEqual<VectorConfigCreate<never, undefined, 'hnsw', 'text2vec-octoai'>>({
name: undefined,
vectorIndex: {
name: 'hnsw',
config: undefined,
},
vectorizer: {
name: 'text2vec-octoai',
config: undefined,
},
});
});

it('should create the correct Text2VecOctoAIConfig type with all values', () => {
const config = configure.vectorizer.text2VecOctoAI({
name: 'test',
baseURL: 'base-url',
model: 'model',
vectorizeCollectionName: true,
});
expect(config).toEqual<VectorConfigCreate<never, 'test', 'hnsw', 'text2vec-octoai'>>({
name: 'test',
vectorIndex: {
name: 'hnsw',
config: undefined,
},
vectorizer: {
name: 'text2vec-octoai',
config: {
baseURL: 'base-url',
model: 'model',
vectorizeCollectionName: true,
},
},
});
});

it('should create the correct Text2VecOllamaConfig type with defaults', () => {
const config = configure.vectorizer.text2VecOllama();
expect(config).toEqual<VectorConfigCreate<never, undefined, 'hnsw', 'text2vec-ollama'>>({
Expand Down Expand Up @@ -1546,32 +1506,6 @@ describe('Unit testing of the generative factory class', () => {
});
});

it('should create the correct GenerativeOctoAIConfig type with required & default values', () => {
const config = configure.generative.octoai();
expect(config).toEqual<ModuleConfig<'generative-octoai', GenerativeOctoAIConfig | undefined>>({
name: 'generative-octoai',
config: undefined,
});
});

it('should create the correct GenerativeOctoAIConfig type with all values', () => {
const config = configure.generative.octoai({
baseURL: 'base-url',
maxTokens: 100,
model: 'model',
temperature: 0.5,
});
expect(config).toEqual<ModuleConfig<'generative-octoai', GenerativeOctoAIConfig | undefined>>({
name: 'generative-octoai',
config: {
baseURL: 'base-url',
maxTokens: 100,
model: 'model',
temperature: 0.5,
},
});
});

it('should create the correct GenerativeOllamaConfig type with required & default values', () => {
const config = configure.generative.ollama();
expect(config).toEqual<ModuleConfig<'generative-ollama', GenerativeOllamaConfig | undefined>>({
Expand Down
21 changes: 0 additions & 21 deletions src/collections/configure/vectorizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,27 +439,6 @@ export const vectorizer = {
},
});
},
/**
* Create a `VectorConfigCreate` object with the vectorizer set to `'text2vec-octoai'`.
*
* See the [documentation](https://weaviate.io/developers/weaviate/model-providers/octoai/embeddings) for detailed usage.
*
* @param {ConfigureTextVectorizerOptions<T, N, I, 'text2vec-octoai'>} [opts] The configuration for the `text2vec-octoai` vectorizer.
* @returns {VectorConfigCreate<PrimitiveKeys<T>, N, I, 'text2vec-octoai'>} The configuration object.
*/
text2VecOctoAI: <T, N extends string | undefined = undefined, I extends VectorIndexType = 'hnsw'>(
opts?: ConfigureTextVectorizerOptions<T, N, I, 'text2vec-octoai'>
): VectorConfigCreate<PrimitiveKeys<T>, N, I, 'text2vec-octoai'> => {
const { name, sourceProperties, vectorIndexConfig, ...config } = opts || {};
return makeVectorizer(name, {
sourceProperties,
vectorIndexConfig,
vectorizerConfig: {
name: 'text2vec-octoai',
config: Object.keys(config).length === 0 ? undefined : config,
},
});
},
/**
* Create a `VectorConfigCreate` object with the vectorizer set to `'text2vec-openai'`.
*
Expand Down
Loading
Loading