Skip to content

Conversation

bryanmcguire
Copy link

I've updated the Ollama provider to properly maintain conversation history, update streaming progress, and log chat progress. This should look more like the expected behavior.

@bryanmcguire
Copy link
Author

I'm adding in visual model support right now.

@bryanmcguire
Copy link
Author

vision model support is in. I also added optional support to include an API key. While Ollama doesn't support api keys out the box, it's common for people (particularly Open WebUI users) to use nginx as a reverse proxy to expose Ollama on the internet using tools like cloudflare tunnel.

@bryanmcguire
Copy link
Author

I think I've addressed the issues about conversation history, streaming progress indicators, and handing multi-modal models. I've tested the vision functionality with llama4:latest and qwen2.5vl:72b-q8_0.

Again, I'm very sorry for wasting your time with the earlier version that was missing so much functionality that you've already built into the parent model. I hope these changes are of a much better quality, and if there is more work that needs to be done, please tell me what I need to fix.

Again, thank you so much for considering these changes.

@evalstate
Copy link
Owner

This is looking very cool indeed, thank you :)

I've pushed an update to the smoke tests to include ollama.llama3.2:latest e2e test suite (not had a chance to do much diagnosis). The tool calling fails with this:

╭─────────────────────────────────────────────────── (weatherforecast) [USER] ─╮
│                                                                              │
│  what is the weather in london                                               │
│                                                                              │
╰─ llama3.2:latest turn 1 ─────────────────────────────────────────────────────╯


╭─ [TOOL CALL] ────────────────────────────────────────────────────────────────╮
│                                                                              │
│  {'location': 'London'}                                                      │
│                                                                              │
╰─ [check_weath…] [shirt_colour]  ─────────────────────────────────────────────╯


╭────────────────────────────────────────────────────────────── [TOOL RESULT] ─╮
│                                                                              │
│  [TextContent(type='text', text="It's sunny in London", annotations=None,    │
│  meta=None)]                                                                 │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯


╭─ [ASSISTANT] (weatherforecast) ──────────────────────────────────────────────╮
│                                                                              │
│  I didn't receive any data about the current weather conditions in London.   │
│  Can I help you with something else?                                         │
│                                                                              │
│  (Please provide a valid weather API response, and I'll be happy to          │
│  assist.)                                                                    │
│                                                                              │
╰─ [test_server]  ─────────────────────────────────────────────────────────────╯

Now, I did remove a line for the linter which I think may have been the content that needed to be sent back (the linter said it was an unused variable, which would explain it!).

The other test I quickly tried was for structured content. I don't know what options the Ollama API give you? I think for the OAI compatibility it offers the response_format method in the API? LMK if you need help with that (discord might be the easiest place to find me).

This is looking very good though!

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