From 98521a2120fc02be749ba0b87cb7039dcd357568 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 15 Apr 2024 08:51:14 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20update=20embeddings=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs/walkthroughs/codebase-embeddings.md | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/docs/docs/walkthroughs/codebase-embeddings.md b/docs/docs/walkthroughs/codebase-embeddings.md index 701100a4de..7d7dd8ca51 100644 --- a/docs/docs/walkthroughs/codebase-embeddings.md +++ b/docs/docs/walkthroughs/codebase-embeddings.md @@ -94,11 +94,27 @@ 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": "" + } +} +``` + ### 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" @@ -106,7 +122,8 @@ The text-embedding-3-small model offers an outstanding balance between performan "embeddingsProvider": { "provider": "openai", "model": "text-embedding-3-small", - "apiBase": "" // optional, defaults to OpenAI's API + "apiBase": "", // optional, defaults to OpenAI's API + "apiKey": "" } } ``` @@ -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": "" // optional, defaults to OpenAI's API + "apiBase": "", // optional, defaults to OpenAI's API + "apiKey": "" } } ``` @@ -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": "" // optional, defaults to OpenAI's API + "apiBase": "", // optional, defaults to OpenAI's API + "apiKey": "" } } ``` @@ -153,7 +172,7 @@ export function modifyConfig(config: Config): Config { }); const data = await response.json(); return data.embedding; - }) + }), ); }, };