guywaldman / magic-cli

Command line utility to make you a magician in the terminal
https://guywaldman.com/posts/introducing-magic-cli
MIT License
720 stars 18 forks source link

FR: allow changing openai URL and port #28

Closed thiswillbeyourgithub closed 3 months ago

thiswillbeyourgithub commented 3 months ago

Hi,

Supporting openai's api is good, but allowing to change the base URL and port allows using things like openrouter or litellm proxy whoc is even better!

It would allow using anthropic etc right away for those of us that already use LLMs extensively

yuankunzhang commented 3 months ago

This is definitely a good thing to have. In the meantime, you can change it by setting the OPENAI_API_BASE environment variable (ref).

guywaldman commented 3 months ago

Resolved in 0.0.6 (pushed out soon), which adds support for a custom OpenAI endpoint and Anthropic as an LLM provider.

cc @yuankunzhang @thiswillbeyourgithub @Ronbalt