ddworken / hishtory

Your shell history: synced, queryable, and in context
https://hishtory.dev
MIT License
2.43k stars 41 forks source link

Support for custom OpenAI endpoint? #186

Closed artivis closed 3 months ago

artivis commented 4 months ago

Hello,

Would it be possible to extend the AI support? Especially to offer the possibility to hit self-hosted instances. I guess the first low hanging fruit would be to make the OpenAI endpoint and model parameterizable. This would allow to hit OpenAI compatible projects such as ollama.

Thanks.

ddworken commented 3 months ago

Thanks for opening this issue! This has now been implemented and released (run hishtory update to get the latest version). You can configure a custom AI API endpoint via hishtory config-set ai-completion-endpoint https://your-openai-compatible-endpoint.example/path. If you run into any issues with this, please let me know