Skip to content

Commit

Permalink
Merge pull request #381 from naynaly10/patch-4
Browse files Browse the repository at this point in the history
Fix OpenAIEmbeddingFunction in JS to use passed model name
  • Loading branch information
jeffchuber authored Apr 22, 2023
2 parents a8d9800 + 893b5d8 commit b96fc38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clients/js/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class OpenAIEmbeddingFunction {
const openai = new OpenAIApi.OpenAIApi(configuration);
const embeddings = [];
const response = await openai.createEmbedding({
model: "text-embedding-ada-002",
model: this.model,
input: texts,
});
const data = response.data['data'];
Expand Down Expand Up @@ -436,4 +436,4 @@ export class ChromaClient {
return response
}

}
}

0 comments on commit b96fc38

Please sign in to comment.