chroma-core / chroma-core/chroma
[Bug]: Morph embedding function has snake cased arguments, open ai has camel cased
- Dominant language
- Rust
- Stars
- 29.3k
- Forks
- 2.5k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 38
Description
### What happened?
It looks like the morph typescript package has snaked cased args whereas the other embedding function packages have camel cased args.
morph.d.ts:
```typescript
import { EmbeddingFunction, EmbeddingFunctionSpace } from 'chromadb';
interface MorphConfig {
api_key_env_var: string;
model_name: string;
api_base?: string;
encoding_format?: 'float' | 'base64';
}
interface MorphEmbeddingFunctionConfig {
api_key?: string;
model_name?: string;
api_base?: string;
encoding_format?: 'float' | 'base64';
api_key_env_var?: string;
}
declare class MorphEmbeddingFunction implements EmbeddingFunction {
readonly name = "morph";
private readonly apiKeyEnvVar;
private readonly modelName;
private readonly encodingFormat;
private readonly apiBase;
private client;
constructor(config?: MorphEmbeddingFunctionConfig);
generate(texts: string[]): Promise;
defaultSpace(): EmbeddingFunctionSpace;
supportedSpaces(): EmbeddingFunctionSpace[];
static buildFromConfig(config: MorphConfig): MorphEmbeddingFunction;
getConfig(): MorphConfig;
validateConfigUpdate(newConfig: Record): void;
static validateConfig(config: MorphConfig): void;
}
export { type MorphConfig, MorphEmbeddingFunction, type MorphEmbeddingFunctionConfig };
```
openai.d.ts:
```typescript
import { EmbeddingFunction, EmbeddingFunctionSpace } from 'chromadb';
interface OpenAIConfig {
api_key_env_var?: string;
model_name: string;
organization_id?: string;
dimensions?: number;
api_base?: string;
}
interface OpenAIArgs {
apiKeyEnvVar?: string;
modelName: string;
organizationId?: string;
dimensions?: number;
apiKey?: string;
apiBase?: string;
}
declare class OpenAIEmbeddingFunction implements EmbeddingFunction {
readonly name = "openai";
private readonly apiKeyEnvVar;
private readonly modelName;
private readonly dimensions;
private readonly organizationId;
private readonly apiBase;
private client;
constructor(args: OpenAIArgs);
generate(texts: string[]): Promise;
defaultSpace(): EmbeddingFunctionSpace;
supportedSpaces(): EmbeddingFunctionSpace[];
static buildFromConfig(config: OpenAIConfig): OpenAIEmbeddingFunction;
getConfig(): OpenAIConfig;
validateConfigUpdate(newConfig: Record): void;
static validateConfig(config: OpenAIConfig): void;
}
export { type OpenAIArgs, type OpenAIConfig, OpenAIEmbeddingFunction };
```
cohere.d.ts
```typescript
import { EmbeddingFunction, EmbeddingFunctionSpace } from 'chromadb';
type CohereEmbedInputType = "search_document" | "search_query" | "classification" | "clustering" | "image";
type CohereEmbedTruncate = "NONE" | "START" | "END";
type CohereEmbedEmbeddingType = "float" | "int8" | "uint8" | "binary" | "ubinary";
interface CohereConfig {
model_name: string;
api_key_env_var: string;
input_type?: CohereEmbedInputType;
truncate?: CohereEmbedTruncate;
embedding_type?: CohereEmbedEmbeddingType;
image?: boolean;
}
interface CohereArgs {
apiKey?: string;
apiKeyEnvVar?: string;
modelName?: string;
image?: boolean;
inputType?: CohereEmbedInputType;
truncate?: CohereEmbedTruncate;
embeddingType?: CohereEmbedEmbeddingType;
}
declare class CohereEmbeddingFunction implements EmbeddingFunction {
readonly name = "cohere";
private readonly client;
private readonly apiKeyEnvVar;
private readonly modelName;
private readonly inputType;
private readonly truncate;
private readonly embeddingType;
private readonly image;
constructor(args?: Partial);
generate(texts: string[]): Promise;
defaultSpace(): EmbeddingFunctionSpace;
supportedSpaces(): EmbeddingFunctionSpace[];
static buildFromConfig(config: CohereConfig): CohereEmbeddingFunction;
getConfig(): CohereConfig;
validateConfigUpdate(newConfig: Record): void;
static validateConfig(config: CohereConfig): void;
}
export { type CohereArgs, type CohereConfig, type CohereEmbedEmbeddingType, type CohereEmbedInputType, type CohereEmbedTruncate, CohereEmbeddingFunction };
```
### Versions
@chroma-core/morph @ v0.1.8
@chroma-core/openai @ v0.1.9
@chroma-core/cohere @ v0.1.8
(both are latest in npm)
### Relevant log output
```shell
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.