Skip to content

How to use the http API POST chat/completions #3745

Answered by Dronakurl
Dronakurl asked this question in Q&A
Discussion options

You must be logged in to vote

Great, thank you, I managed to configure codecompanion.nvim for usage with chat using this configuration:

{
	"olimorris/codecompanion.nvim",
	dependencies = {
		"nvim-lua/plenary.nvim",
		"nvim-treesitter/nvim-treesitter",
	},
	config = function()
		require("codecompanion").setup({
			strategies = {
				chat = { adapter = "tabby" },
				inline = { adapter = "tabby" },
			},
			adapters = {
				tabby = function()
					return require("codecompanion.adapters").extend("openai_compatible", {
						env = {
							url = "http://localhost:8080", -- optional: default value is ollama url http://127.0.0.1:11434
							api_key = "auth_881a958cbb454e1aa87a3fa17e8e9649", -- optional: if your endpoint i…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by wsxiaoys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants