Kav-K / GPTDiscord

A robust, all-in-one GPT interface for Discord. ChatGPT-style conversations, image generation, AI-moderation, custom indexes/knowledgebase, youtube summarizer, and more!
MIT License
1.82k stars 305 forks source link

Is it possible to add custom proxy? #461

Open OmiiiDev opened 9 months ago

OmiiiDev commented 9 months ago

Can I use this with a custom OpenAI api proxy URL?

AndrewsPanda commented 9 months ago

It would be good. It would allow for more llm's from HF or openrouter to be used with this bot, making it a lot more versatile.

I know you can modify the urls in, /models/opennai_model.py, into f-string values and have them pull 'https://api.openai.com/v1' from .env.

The langchain requests also need to be updated.

I know how to do that much but there are other functions that generally break.

@Kav-K im happy to do a PR request for the changes i know how to do.

Its basically the same request as my ticket below.

https://github.com/Kav-K/GPTDiscord/issues/454

Kav-K commented 9 months ago

@AndrewsPanda Yeah sounds great! If you want to get started on a PR with what you can do, I will build on top of it and finish/polish it up!

This is definitely something that I've wanted to implement, added this to the roadmap and prioritized it.