Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

describegpt: add compatibility for other (local) LLMs (Ollama, Jan, etc.) #1761

Merged
merged 4 commits into from
Apr 20, 2024

Conversation

rzmk
Copy link
Collaborator

@rzmk rzmk commented Apr 19, 2024

describegpt is limited to using the OpenAI API. This PR has several changes to allow for compatibility with other APIs including local LLMs:

  • Add --base-url to replace https://api.openai.com/v1 with either an Ollama endpoint (by default it's http://localhost:11434) or another API compatible with the OpenAI API specification (for now just requiring the correct implementations of the /models and /chat/completions endpoints).
  • Rename --openai-key to --api-key.
  • Update usage text, README.md, docs/Describegpt.md, and tests/test_describegpt.rs to reflect changes.
  • Add required --ollama flag when using Ollama.
    • This is because of an issue where the /v1/models endpoint doesn't exist yet. Once this issue is resolved and the solution works as expected then the code may be refactored and the --ollama flag may
      be removed.

@jqnatividad jqnatividad merged commit cc0fbe3 into master Apr 20, 2024
2 checks passed
@rzmk rzmk deleted the local-llm branch June 21, 2024 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants