Closed Pawe98 closed 3 months ago
multiple models have been tested, this is the current config.json I use which does create the same behaviour as before:
{
"models": [
{
"model": "codellama:7b",
"title": "Ollama",
"provider": "ollama"
}
],
"slashCommands": [
{
"name": "edit",
"description": "Edit selected code"
},
{
"name": "comment",
"description": "Write comments for the selected code"
},
{
"name": "share",
"description": "Download and share this session"
},
{
"name": "cmd",
"description": "Generate a shell command"
}
],
"customCommands": [
{
"name": "test",
"prompt": "Write a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.",
"description": "Write unit tests for highlighted code"
}
],
"contextProviders": [
{
"name": "diff",
"params": {}
},
{
"name": "open",
"params": {}
},
{
"name": "terminal",
"params": {}
},
{
"name": "problems",
"params": {}
},
{
"name": "codebase",
"params": {}
}
],
"embeddingsProvider": {
"model": "codellama:7b",
"provider": "ollama"
}
}
multiple models have been tested, this is the current config.json I use which does create the same behaviour as before:
Be sure to restart the extension once the new provider is added — Command Palette > Restart Extension Host
Here's a functioning embeddings provider using Voyage:
"embeddingsProviders": {
"provider": "openai",
"model": "voyage-code-2",
"apiBase": "https://api.voyageai.com/v1/",
"apiKey": "REMOVED"
},
I'm not getting embeddings to work.
I'm using LM Studio. Chat and tabAutocomplete are working as expected.
config.json file has:
{
"title": "LM studio",
"provider": "lmstudio",
"model": "AUTODETECT",
"apiBase": "http://localhost:1234/v1/",
"apiKey": "lm-studio",
"completionOptions": {}
}
…
"tabAutocompleteModel": {
"provider": "lmstudio",
"title": "Codestral autocomplete",
"model": "lmstudio-community/Codestral-22B-v0.1-Q8_0.gguf"
},
"embeddingsProvider": {
"provider": "ollama",
"model": "nomic-ai/nomic-embed-text-v1.5.Q8_0.gguf",
"apiBase": "http://localhost:1234/v1"
}
Albeit very slow, auto complete is working ok. but embeddings is showing this error:
models list is showing:
I also tried adding "apiKey": ""
(with the actual key) changing the url to end with /v1/embeddings
but also didn't work.
Any hints on what's going on?
Actually I think I found the problem:
Continue is looking for Ollama's http://127.0.0.1:1234/api/embeddings
instead of http://127.0.0.1:1234/v1/embeddings
used by LM Studio
I think this is another bug, probably should add it as issue. not sure @TyDunn ?
LM Studio uses OpenAI API format, try
"embeddingsProvider": {
"provider": "openai",
"model": "nomic-ai/nomic-embed-text-v1.5.Q8_0.gguf",
"apiBase": "http://localhost:1234/v1/"
},
"model": "nomic-ai/nomic-embed-text-v1.5.Q8_0.gguf", "apiBase": "http://localhost:1234/v1/"
It works :)
the only thing I changed was "provider": "openai"
. I had "provider": "ollama"
didn't know the provider part was so important.
Thanks a lot @Henri-J-Norden
Thanks for helping out @Henri-J-Norden! Looks like both this and the original problem are resolved, so I'll close the issue
Before submitting your bug report
Relevant environment info
Description
When im using a different embeddingsProvider other than the standard transformer.js, I get various bugs and an unexplained behavior. This is my setup:
Starting VS Code as a fresh install, adding the continue extension. Navigating into the config.js in users/USER/.continue/config.js and adding a custom embedding provider:
Adding another Ollama "model" to be used for chat:
Closing VS Code, deleting the .continue/index directory. Downloading the necessary models with
Starting ollama in a seperate cmd window with "
ollama serve
".Now when im starting VS-Code, i can see that the index is created even before I see any logs of my ollama. This would tell me, that it is somehow creating the embeddings without using the specified embeddings provider. However, after a while I see that ollama is deploying the codellama model, and answer some api/embedding requests. The first few seem to be sucessfull:
However, after the first few it gives me errors:
(It looks like that continue makes requests for the embeddings, but just uses "something" else to create a broken index. Nonetheless, if i now write a message into the chat window, after all the requests are finished, ollama switches to the deepseek-coder model to generate a text response. However, if im now including the index via @CodeBase inside my message, I get an Error:
Error getting context items from codebase: TypeError: failed to downcast any to Array
this is the vs code dev tools, for some reason can't copy the console content:
To reproduce
Log output