Skip to content

Commit 98521a2

Browse files
committed
📝 update embeddings docs
1 parent 8ff3d58 commit 98521a2

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

Diff for: docs/docs/walkthroughs/codebase-embeddings.md

+24-5
Original file line numberDiff line numberDiff line change
@@ -94,19 +94,36 @@ We also support other methods of generating embeddings, which can be configured
9494
}
9595
```
9696

97+
### Voyage AI
98+
99+
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:
100+
101+
```json title="~/.continue/config.json"
102+
{
103+
"embeddingsProvider": {
104+
"provider": "openai",
105+
"model": "voyage-code-2",
106+
"apiBase": "
107+
https://api.voyageai.com/v1/",
108+
"apiKey": "<VOYAGE_API_KEY>"
109+
}
110+
}
111+
```
112+
97113
### OpenAI
98114

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

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

104120
```json title="~/.continue/config.json"
105121
{
106122
"embeddingsProvider": {
107123
"provider": "openai",
108124
"model": "text-embedding-3-small",
109-
"apiBase": "<your custom OpenAI-compatible endpoint>" // optional, defaults to OpenAI's API
125+
"apiBase": "<your custom OpenAI-compatible endpoint>", // optional, defaults to OpenAI's API
126+
"apiKey": "<OPENAI_API_KEY>"
110127
}
111128
}
112129
```
@@ -119,7 +136,8 @@ For those requiring the highest level of embedding detail and precision, the tex
119136
"embeddingsProvider": {
120137
"provider": "openai",
121138
"model": "text-embedding-3-large",
122-
"apiBase": "<your custom OpenAI-compatible endpoint>" // optional, defaults to OpenAI's API
139+
"apiBase": "<your custom OpenAI-compatible endpoint>", // optional, defaults to OpenAI's API
140+
"apiKey": "<OPENAI_API_KEY>"
123141
}
124142
}
125143
```
@@ -132,7 +150,8 @@ For certain scenarios, you may still find the text-embedding-ada-002 model relev
132150
"embeddingsProvider": {
133151
"provider": "openai",
134152
"model": "text-embedding-ada-002",
135-
"apiBase": "<your custom OpenAI-compatible endpoint>" // optional, defaults to OpenAI's API
153+
"apiBase": "<your custom OpenAI-compatible endpoint>", // optional, defaults to OpenAI's API
154+
"apiKey": "<OPENAI_API_KEY>"
136155
}
137156
}
138157
```
@@ -153,7 +172,7 @@ export function modifyConfig(config: Config): Config {
153172
});
154173
const data = await response.json();
155174
return data.embedding;
156-
})
175+
}),
157176
);
158177
},
159178
};

0 commit comments

Comments
 (0)