Update default embedding model to text-embedding-3-small

- Changed from text-ada-002 to text-embedding-3-small
- Aligns with OpenAI's current best practices
- More cost-effective and better performance
This commit is contained in:
wlvrx 2024-11-04 21:55:10 +08:00
parent 0a21561dcb
commit 043031f9b0
2 changed files with 2 additions and 2 deletions

View file

@ -115,7 +115,7 @@ LLM backends can be specified as simply as `"model": "gpt-3.5-turbo"`. However,
"embedding": {
"api": "openai",
"url": "https://api.openai.com/v1/",
"model": "text-embedding-ada-002"
"model": "text-embedding-3-small"
}
```

View file

@ -55,7 +55,7 @@ export class GPT {
async embed(text) {
const embedding = await this.openai.embeddings.create({
model: this.model_name || "text-embedding-ada-002",
model: this.model_name || "text-embedding-3-small",
input: text,
encoding_format: "float",
});