tom-doerr / zsh_codex

This is a ZSH plugin that enables you to use OpenAI's Codex AI in the command line.
MIT License
1.42k stars 72 forks source link

Add ability to choose `base_url` for Ollama support #40

Closed KevinBalkoski closed 7 months ago

KevinBalkoski commented 7 months ago

Ollama now supports using the OpenAI API. This change allows the user to choose the base url used by the OpenAI library, allowing the user to use a local or self-hosted model. This can be used by updating the openaipirc config file like (key must be a non-empty string):

[openai]
secret_key = llamasarepeopletoo
model = mistral
base_url = http://localhost:11434/v1
chyld commented 7 months ago

Nice work adding the ability to use a local model for inference.

tom-doerr commented 7 months ago

Thank you for adding this!