vanna-ai / vanna

🤖 Chat with your SQL database 📊. Accurate Text-to-SQL Generation via LLMs using RAG 🔄.
https://vanna.ai/docs/
MIT License
11.04k stars 862 forks source link

[Scalabrese] Improved Ollama integration #361

Closed scalabreseGD closed 5 months ago

scalabreseGD commented 5 months ago
  1. Improved Ollama a. Added Ollama Python client b. Fixed function for SQL extraction c. Improved extraction in case of Mistral with squared bracket d. Improved extraction making it case insensitive e. Pulled the model in case is not existing f. Added parameters such as keep_alive, num_ctx and additional parameters to be passed to the ollama server
  2. Added Ollama as extra dependency
zainhoda commented 5 months ago

Thanks @scalabreseGD ! This is looking pretty good. One thing I've been encountering is that if model is set to something like mistral, the model_lists contains mistral:latest, so it pulls the model on every call. Do you have any thoughts on the best way to handle that?

scalabreseGD commented 5 months ago

@zainhoda changed the codebase pulling it only at the startup. Is not necessary to check it every time :)