continue icon indicating copy to clipboard operation
continue copied to clipboard

The documentation about custom LLM provider ist outdated

Open siom79 opened this issue 10 months ago • 0 comments

Before submitting your bug report

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')

siom79 avatar Apr 04 '24 14:04 siom79