jackMort/ChatGPT.nvim

Make it compatible with deepinfra

Ouverte

#438 ouverte le 16 mai 2024

 (0 commentaire) (0 réaction) (0 personne assignée)Lua (319 forks)batch import
enhancementgood first issue

Métriques du dépôt

Stars
 (3 997 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

I am trying to use thsi plugin with deepinfra which offers llama3b-70b on the cheap and a openAI compatible api, how ever its api endpoints has "openai" in the middle like this

https://api.deepinfra.com/v1/openai/chat/completions

And current code hard-coded to add /v1/chat/completions path to api base address, and this makes it not able to make api calls correctly to deepinfra api endpoint.

Would it be possible to make "v1" part of api base url? I know this is a breaking change, but it does not make a lot of sense to hard-code an api version in request paths, right?

Guide contributeur