continue icon indicating copy to clipboard operation
continue copied to clipboard

Specify the output language

Open 980468094 opened this issue 1 year ago • 2 comments

Validations

  • [X] I believe this is a way to improve. I'll try to join the Continue Discord for questions
  • [ ] I'm not able to find an open issue that requests the same enhancement

Problem

The current default model outputs answers in English by default. It is recommended to add a language that can be specified for output, such as supporting Chinese or Japanese

Solution

No response

980468094 avatar Aug 17 '24 11:08 980468094

@980468094 you can adjust the preferred language by setting a systemMessage in config.json. For example,

{
  ...
  "systemMessage": "Always respond in Japanese"
}

sestinj avatar Aug 17 '24 17:08 sestinj

file config.json

{
  ...
  "models": [
    {
      "title": ...,
      "model": ...,
      "provider": ...,
      "apiBase": ...,
      "apiKey": ...,
      "systemMessage": "You are an expert software developer. You give helpful and concise responses. Always respond in Chinese."
    }
  ],
  "experimental": {
    "contextMenuPrompts": {
      "docstring": "Write a docstring for this code in Chinese. Do not change anything about the code itself.",
      "comment": "Write comments for this code in Chinese. Do not change anything about the code itself.",
      "fix": "Fix this code and explain the fixes in Chinese.",
      "optimize": "Optimize this code and explain the optimizations in Chinese.",
      "fixGrammar": "If there are any grammar or spelling mistakes in this writing, fix them and explain the corrections in Chinese. Do not make other large changes to the writing."
    }
  },
  ...
}

jussker avatar Sep 09 '24 12:09 jussker

This works for practically everything, but at least for me, it does not work when "Use Cmd+I to generate code".

Would you know how to add also the choice of output language when using this option?

file config.json

{
  ...
  "models": [
    {
      "title": ...,
      "model": ...,
      "provider": ...,
      "apiBase": ...,
      "apiKey": ...,
      "systemMessage": "You are an expert software developer. You give helpful and concise responses. Always respond in Chinese."
    }
  ],
  "experimental": {
    "contextMenuPrompts": {
      "docstring": "Write a docstring for this code in Chinese. Do not change anything about the code itself.",
      "comment": "Write comments for this code in Chinese. Do not change anything about the code itself.",
      "fix": "Fix this code and explain the fixes in Chinese.",
      "optimize": "Optimize this code and explain the optimizations in Chinese.",
      "fixGrammar": "If there are any grammar or spelling mistakes in this writing, fix them and explain the corrections in Chinese. Do not make other large changes to the writing."
    }
  },
  ...
}

juanfcocontreras avatar Nov 02 '24 19:11 juanfcocontreras

This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.

github-actions[bot] avatar Mar 03 '25 04:03 github-actions[bot]

There is still no way to customize the language when using the "Use Cmd+I to generate code" option.

juanfcocontreras avatar Mar 03 '25 07:03 juanfcocontreras

This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.

github-actions[bot] avatar Jun 06 '25 02:06 github-actions[bot]

This issue was closed because it wasn't updated for 10 days after being marked stale. If it's still important, please reopen + comment and we'll gladly take another look!

github-actions[bot] avatar Jun 16 '25 02:06 github-actions[bot]