Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify the output language #2032

Open
1 of 2 tasks
980468094 opened this issue Aug 17, 2024 · 3 comments
Open
1 of 2 tasks

Specify the output language #2032

980468094 opened this issue Aug 17, 2024 · 3 comments
Labels
kind:enhancement Indicates a new feature request, imrovement, or extension

Comments

@980468094
Copy link

Validations

  • 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

@dosubot dosubot bot added the kind:enhancement Indicates a new feature request, imrovement, or extension label Aug 17, 2024
@sestinj
Copy link
Contributor

sestinj commented Aug 17, 2024

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

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

@jussker
Copy link

jussker commented Sep 9, 2024

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
Copy link

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."
    }
  },
  ...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:enhancement Indicates a new feature request, imrovement, or extension
Projects
None yet
Development

No branches or pull requests

6 participants