j178 / chatgpt

An elegant interactive CLI for ChatGPT
694 stars 52 forks source link

feat: support customize model and parameters #23

Closed j178 closed 1 year ago

j178 commented 1 year ago

Closes #22

Support customize model and parameters through a config file in ~/.config/chatgpt.json, default configuration:

{
  "api_key": "sk-xxxxxx",
  "endpoint": "https://api.openai.com/v1",
  "prompt": "You are ChatGPT, a large language model trained by OpenAI. Answer as concisely as possible.",
  "model": "gpt-3.5-turbo",
  "context_length": 6,
  "stream": true,
  "temperature": 0,
  "max_tokens": 1024
}

TODO: