Skip to content

Commit

Permalink
📝 update embeddings docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sestinj committed Apr 15, 2024
1 parent 8ff3d58 commit 98521a2
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions docs/docs/walkthroughs/codebase-embeddings.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,36 @@ We also support other methods of generating embeddings, which can be configured
}
```

### Voyage AI

Voyage AI offers the best embeddings for code with their voyage-code-2 model. After obtaining an API key from [here](https://www.voyageai.com/), you can configure like this:

```json title="~/.continue/config.json"
{
"embeddingsProvider": {
"provider": "openai",
"model": "voyage-code-2",
"apiBase": "
https://api.voyageai.com/v1/",
"apiKey": "<VOYAGE_API_KEY>"
}
}
```

### OpenAI

OpenAI's [embeddings](https://platform.openai.com/docs/guides/embeddings) are high dimensional embeddings that give great performance on both text and code.

Configuration for text-embedding-3-small Model. This is default.
Configuration for text-embedding-3-small Model. This is default.
The text-embedding-3-small model offers an outstanding balance between performance and efficiency, suitable for a versatile range of applications.

```json title="~/.continue/config.json"
{
"embeddingsProvider": {
"provider": "openai",
"model": "text-embedding-3-small",
"apiBase": "<your custom OpenAI-compatible endpoint>" // optional, defaults to OpenAI's API
"apiBase": "<your custom OpenAI-compatible endpoint>", // optional, defaults to OpenAI's API
"apiKey": "<OPENAI_API_KEY>"
}
}
```
Expand All @@ -119,7 +136,8 @@ For those requiring the highest level of embedding detail and precision, the tex
"embeddingsProvider": {
"provider": "openai",
"model": "text-embedding-3-large",
"apiBase": "<your custom OpenAI-compatible endpoint>" // optional, defaults to OpenAI's API
"apiBase": "<your custom OpenAI-compatible endpoint>", // optional, defaults to OpenAI's API
"apiKey": "<OPENAI_API_KEY>"
}
}
```
Expand All @@ -132,7 +150,8 @@ For certain scenarios, you may still find the text-embedding-ada-002 model relev
"embeddingsProvider": {
"provider": "openai",
"model": "text-embedding-ada-002",
"apiBase": "<your custom OpenAI-compatible endpoint>" // optional, defaults to OpenAI's API
"apiBase": "<your custom OpenAI-compatible endpoint>", // optional, defaults to OpenAI's API
"apiKey": "<OPENAI_API_KEY>"
}
}
```
Expand All @@ -153,7 +172,7 @@ export function modifyConfig(config: Config): Config {
});
const data = await response.json();
return data.embedding;
})
}),
);
},
};
Expand Down

0 comments on commit 98521a2

Please sign in to comment.