yakGPT / yakGPT

Locally running, hands-free ChatGPT UI
https://yakgpt.vercel.app
MIT License
1.6k stars 257 forks source link

Feature Request: Add support for custom API endpoints #51

Open xfrose opened 1 year ago

xfrose commented 1 year ago

Besides the official OpenAI API, there are also other providers like Azure OpenAI. In some regions where the official API is not accessible, users heavily rely on these third-party APIs. Adding support for custom OpenAI keys and URLs would play a crucial role in such scenarios.

There are only a handful of projects that currently offer this feature, one such example is BetterChatGPT.

I apologize for any confusion caused in the previous issue. I mistakenly referred to Azure's Speech API as its OpenAI API.

kiwizznz commented 1 year ago

Would be great. That or support for one of the OpenAI proxy services such as https://github.com/diemus/azure-openai-proxy if you didn't want to rewrite to support Azure.

yakGPT commented 1 year ago

Interesting. I would definitely be open to PRs implementing this! <3 Which regions are affected?

wesbragagt commented 1 year ago

We might need to build an adapter to house all the different implementations of these APIs. Not sure how different they would be as far as input to output but worth exploring.

Clueed commented 1 year ago

There are only a handful of projects that currently offer this feature, one such example is BetterChatGPT.

As far as I can tell, there is no special handling of alternative ChatGPT APIs required. The BetterChatGPT implementation allows one to pick an arbitrary URL. If it's just about replacing the URL that can be done by extracting them into environment variables without the need for a UI. Do you actually need to change endpoints frequently during usage?

okdas commented 1 year ago

That would be great. More and more projects that support to self-host LLMs now ship with OpenAPI-compatible API. Examples:

sam1am commented 1 year ago

Many APIs act as drop in replacements for OpenAI's api with the same schema and a different URL.