Abraxas-365 / langchain-rust

🦜️🔗LangChain for Rust, the easiest way to write LLM-based programs in Rust
MIT License
491 stars 63 forks source link

Use batch requests for embeddings for Ollama #185

Open prabirshrestha opened 1 month ago

prabirshrestha commented 1 month ago

Currently Ollama loops and manually calls embedding endpoint one at a time.

Ollama has added native support for batch embeddings. https://github.com/ollama/ollama/pull/5127

Update langchain-rust to directly use batch embeddings api when ollama-rs supports it. https://github.com/pepperoni21/ollama-rs/issues/58