yetone / avante.nvim

Use your Neovim like using Cursor AI IDE!
Apache License 2.0
6.45k stars 234 forks source link

can not config deepseek api #109

Closed zhaopengme closed 2 months ago

zhaopengme commented 2 months ago

image

the window for configuring ANTHROPIC_API_KEY is always displayed,hwo can i switch to anthoer service? I have configured the DEEPSEEK_API_KEY.

carlesoctav commented 2 months ago

setup the provider in the opts table.

return {
  "yetone/avante.nvim",
  event = "VeryLazy",
  build = "make lua51",
  opts = {
    provider = "deepseek"
  },
  dependencies = {
    "nvim-tree/nvim-web-devicons",
    "stevearc/dressing.nvim",
    "nvim-lua/plenary.nvim",
    {
      "grapp-dev/nui-components.nvim",
      dependencies = {
        "MunifTanjim/nui.nvim"
      }
    },
    --- The below is optional, make sure to setup it properly if you have lazy=true
    {
      'MeanderingProgrammer/render-markdown.nvim',
      opts = {
        file_types = { "markdown", "Avante" },
      },
      ft = { "markdown", "Avante" },
    },
  },
}
zhaopengme commented 2 months ago

‌‌‌‌‌Very good.

zeroaddresss commented 2 months ago

setup the provider in the opts table.

return {
  "yetone/avante.nvim",
  event = "VeryLazy",
  build = "make lua51",
  opts = {
    provider = "deepseek"
  },
  dependencies = {
    "nvim-tree/nvim-web-devicons",
    "stevearc/dressing.nvim",
    "nvim-lua/plenary.nvim",
    {
      "grapp-dev/nui-components.nvim",
      dependencies = {
        "MunifTanjim/nui.nvim"
      }
    },
    --- The below is optional, make sure to setup it properly if you have lazy=true
    {
      'MeanderingProgrammer/render-markdown.nvim',
      opts = {
        file_types = { "markdown", "Avante" },
      },
      ft = { "markdown", "Avante" },
    },
  },
}

aren't you supposed to specify endpoint and model as well? like so:

opts = {
      provider = "deepseek",
      deepseek = {
        endpoint = "https://api.deepseek.com",
        model = "deepseek-coder",
        temperature = 0,
        max_tokens = 4096,
      },
    },