Files
langchain/libs/partners/ollama
Sanchay Singh cdb4a8aeb0 fix(ollama): avoid leading newline in multimodal text content (#37481)
Fixes #37480 

---

Avoid prepending a leading newline when converting multimodal message
text content in `ChatOllama`. Previously, the first text segment in
list-format message content was always prefixed with `\n`, which could
break formatting-sensitive vision/OCR models.

Also adds a regression test to ensure multimodal message content does
not start with an unintended leading newline.

Verified by running:

- make format
- make lint
- make test
2026-05-17 14:34:31 -07:00
..

langchain-ollama

PyPI - Version PyPI - License PyPI - Downloads Twitter

Looking for the JS/TS version? Check out LangChain.js.

Quick Install

pip install langchain-ollama

🤔 What is this?

This package contains the LangChain integration with Ollama

📖 Documentation

For full documentation, see the API reference. For conceptual guides, tutorials, and examples on using these classes, see the LangChain Docs.

📕 Releases & Versioning

See our Releases and Versioning policies.

💁 Contributing

As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.

For detailed information on how to contribute, see the Contributing Guide.