continue icon indicating copy to clipboard operation
continue copied to clipboard

[CON-256] config.ts custom model not appearing in model selection dropdown

Open sestinj opened this issue 1 year ago • 0 comments

Before submitting your bug report

Relevant environment info

- OS:*
- Continue:0.0.192
- IDE:VS Code
- Model:
- config.json:

Description

export function modifyConfig(config: Config): Config {
  config.models.push({
    options: {
      title: "My Custom LLM!",
      model: "mistral-7b",
    },
    streamCompletion: async function* (
      prompt: string,
      options: CompletionOptions,
      fetch
    ) {
      for (let i = 0; i < 10; i++) {
        yield `- ${i}\n`;
        await new Promise((resolve) => setTimeout(resolve, 1000));
      }
    },
  });
  config.systemMessage = "Always respond in spanish";
  return config;
}

To reproduce

export function modifyConfig(config: Config): Config {
  config.models.push({
    options: {
      title: "My Custom LLM!",
      model: "mistral-7b",
    },
    streamCompletion: async function* (
      prompt: string,
      options: CompletionOptions,
      fetch
    ) {
      for (let i = 0; i < 10; i++) {
        yield `- ${i}\n`;
        await new Promise((resolve) => setTimeout(resolve, 1000));
      }
    },
  });
  config.systemMessage = "Always respond in spanish";
  return config;
}

Use a config.ts like above. You will notice that while the system message is respected, the model doesn't appear in the model selection dropdown

Log output

No response

CON-256

sestinj avatar Aug 03 '24 18:08 sestinj