yGuy / chatgpt-mattermost-bot

A very simple implementation of a service for a mattermost bot that uses ChatGPT in the backend.
MIT License
145 stars 50 forks source link

specify custom URL for openai compatible APIs? #67

Closed bozakov closed 6 months ago

bozakov commented 7 months ago

It would be great if it would it be possible to specify an environment variable for an alternative, openai compatible API. This would allow the use of locally hosted llm servers. Would this be feasible?

Basically setting basePath to the Configuration in: https://github.com/yGuy/chatgpt-mattermost-bot/blob/c6e547125f7bfb24efe14ac990ee05dbac5d6564/src/openai-wrapper.ts#L16

yGuy commented 7 months ago

Yes, that could be helpful. It would be very easy to implement. I would be happy to merge a corresponding PR.

bozakov commented 7 months ago

Hi @yGuy any feedback on #68?

yGuy commented 7 months ago

This LGTM, thanks! I am currently swamped with work. Might be able to merge this at the weekend!

yGuy commented 6 months ago

merged in v2.2.0