jackMort / ChatGPT.nvim

ChatGPT Neovim Plugin: Effortless Natural Language Generation with OpenAI's ChatGPT API
Apache License 2.0
3.71k stars 310 forks source link

README default configuration sync with code #296

Closed S1M0N38 closed 1 year ago

S1M0N38 commented 1 year ago

Make use of GitHub snippet rendering of permalink to show default configuration directly from code. This avoid error prone copy and paste.

For example the default configuration in README states that

    openai_edit_params = {
      model = "code-davinci-edit-001",
      temperature = 0,
      top_p = 1,
      n = 1,
    }

however in the default config in the code

    openai_edit_params = {
      model = "gpt-3.5-turbo",
      frequency_penalty = 0,
      presence_penalty = 0,
      temperature = 0,
      top_p = 1,
      n = 1,
    }

Although the default configuration should not be explicitly copied into the README, the permalink should be updated in case of changes (commit hash and lines numbers).

For more information about snippets rendering in Markdown using permalink read this short post.