continue
continue copied to clipboard
The documentation about custom LLM provider ist outdated
Before submitting your bug report
- [X] I believe this is a bug. I'll try to join the Continue Discord for questions
- [X] I'm not able to find an open issue that reports the same bug
- [X] I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS: Ubuntu 22.04
- Continue: HEAD
- IDE: VS-Code
Description
The documentation about custom LLM provider is outdated. Meanwhile it should look like this:
export function modifyConfig(config: Config): Config {
config.models.push({
options: {
title: "My Custom LLM",
model: "mistral-7b",
},
streamCompletion: async function* (prompt: string, options: CompletionOptions) {
// Make the API call here
// Then yield each part of the completion as it is streamed
// This is a toy example that will count to 10
for (let i = 0; i < 10; i++) {
yield `- ${i}\n`;
await new Promise((resolve) => setTimeout(resolve, 1000));
}
},
});
return config;
}
To reproduce
Visit this site and try to build a custom provider.
Log output
Cannot read properties of undefined (reading 'models')