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

🎞️ add json format to OllamaCommon class #13848

Closed
wants to merge 10 commits into from

Conversation

shroominic
Copy link
Contributor

The Ollama Client now allows a pure json mode which I just added to the OllamaCommon class.

This allows using it like in this example:
Screenshot 2023-11-25 at 14 11 19

Copy link

vercel bot commented Nov 25, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchain ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 27, 2023 11:17pm

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. Ɑ: models Related to LLMs or chat model modules 🤖:improvement Medium size change to existing code to handle new use-cases labels Nov 25, 2023
@baskaryan
Copy link
Collaborator

cc @jmorganca

@baskaryan baskaryan added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Nov 27, 2023
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. lgtm PR looks good. Use to confirm that a PR is ready for merging. labels Nov 27, 2023
@shroominic
Copy link
Contributor Author

Additionally, I added ChatLlamaCpp now. Not sure if this was the right move to add it to the same PR but its booth similar.

@baskaryan
Copy link
Collaborator

Additionally, I added ChatLlamaCpp now. Not sure if this was the right move to add it to the same PR but its booth similar.

preference would be to make two separate pr's. also llama cpp has a chat interface that we should probably use for chat model https://github.com/abetlen/llama-cpp-python#chat-completion

@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Nov 27, 2023
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels Nov 27, 2023
@shroominic
Copy link
Contributor Author

I tried to use create_chat_completion but i realized that its a bit more complex because the Dict Messages Schema changed because of the new multimodal interface and didn't know how to handle this best because LlamaCpp supports multimodal stuff but there is not a lot documentation on this...

Reverted and caused a git chaos but a squash should solve this :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:improvement Medium size change to existing code to handle new use-cases Ɑ: models Related to LLMs or chat model modules size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants