plugins.chatgpt.settings

Options provided to the require('chatgpt').setup function.

Type: attribute set of anything

Default: { }

Example:

{
  answer_sign = "ﮧ";
  chat_layout = {
    position = "50%";
    relative = "editor";
  };
  keymaps = {
    close = [
      "<C-c>"
    ];
    submit = "<C-s>";
  };
  loading_text = "loading";
  max_line_length = 120;
  openai_edit_params = {
    model = "code-davinci-edit-001";
    temperature = 0;
  };
  openai_params = {
    frequency_penalty = 0;
    max_tokens = 300;
    model = "gpt-3.5-turbo";
    presence_penalty = 0;
  };
  question_sign = "";
  welcome_message = "Hello world";
  yank_register = "+";
}

Declared by:

plugins.chatgpt.settings.api_key_cmd

The path and arguments to an executable that returns the API key via stdout.

Type: null or string or raw lua code

Default: null

Plugin default: null

Declared by:

plugins.chatgpt.settings.extra_curl_params

Custom cURL parameters can be passed using this option. It can be useful if you need to include additional headers for requests.

Type: null or (list of (string or raw lua code))

Default: null

Plugin default: null

Example:

[
  "-H"
  "Origin: https://example.com"
]

Declared by:

plugins.chatgpt.settings.show_line_numbers

Whether to show line numbers in the ChatGPT window.

Type: null or boolean or raw lua code

Default: null

Plugin default: true

Declared by:

plugins.chatgpt.settings.yank_register

Which register to use for copying.

Type: null or string or raw lua code

Default: null

Plugin default: "+"

Declared by: