Skip to content

feat: add response_format param to OllamaChatGenerator #1282

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

Closed
wants to merge 53 commits into from

Conversation

Amnah199
Copy link
Contributor

@Amnah199 Amnah199 commented Jan 9, 2025

Related Issues

Proposed Changes:

Add a new param response_format to the OllamaChatGenerator to support structured outputs.

How did you test it?

Updated the tests

Notes for the reviewer

Checklist

@github-actions github-actions bot added integration:ollama type:documentation Improvements or additions to documentation labels Jan 9, 2025
@Amnah199 Amnah199 marked this pull request as ready for review January 10, 2025 15:09
@Amnah199 Amnah199 requested a review from a team as a code owner January 10, 2025 15:09
@Amnah199 Amnah199 requested review from mpangrazzi and removed request for a team January 10, 2025 15:09
@anakin87
Copy link
Member

Hey!
Since after the 2.9.0 release, we will replace (integrate?) the current implementation of OllamaChatGenerator with this, could you please check how response_format integrates with the new implementation and tools?

Copy link
Member

@anakin87 anakin87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice...

I found some potential improvements.

anakin87 and others added 16 commits January 28, 2025 11:37
…index (#1277)

* fix: Add schema name if dropping index in pgvector store

* fix: Remove check for deletion in src

* new integration test

---------

Co-authored-by: anakin87 <[email protected]>
* progress

* Ollama: add support for tools

* make generator tests run with llama

* PR feedback + simplification
* Add Secret handling in OpenSearchDocumentStore

* only serialize auth secrets when values are resolvable

* Update integrations/opensearch/src/haystack_integrations/document_stores/opensearch/document_store.py

Co-authored-by: tstadel <[email protected]>

* Fixes

* Revert accidental commit

* Special list of Secrets handling only, keep everything else as it was before

* Small improvement

* More simplifications

---------

Co-authored-by: tstadel <[email protected]>
vblagoje and others added 8 commits January 28, 2025 11:57
* AmazonBedrockChatGenerator - add tools support

* Remove test not needed

* Add actual pipeline integration test with tools

* Extract instance functions to free standing

* No need to test serde on all models

* Add serde test

* Fix serde test

* Lint

* Always pack thinking + tool call into single ChatMessage

* Revert accidental changes

* Method renaming for Python Zen

* Add class pydocs

* Don't run pipeline in serde test

* Update test_serde_in_pipeline test

* Lint
* AmazonBedrockGenerator - remove truncation

* Update tests

* Linting

* Remove deprecation test

* Update docs config

* Update integrations/amazon_bedrock/src/haystack_integrations/components/generators/amazon_bedrock/generator.py

Co-authored-by: Stefano Fiorucci <[email protected]>

* Lint

---------

Co-authored-by: Stefano Fiorucci <[email protected]>
… and Ranker in the type (#1320)

* updating amazon-bedrock readme

* alphabetical order
Bumps [fossas/fossa-action](https://github.com/fossas/fossa-action) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/fossas/fossa-action/releases)
- [Commits](fossas/fossa-action@v1.4.0...v1.5.0)

---
updated-dependencies:
- dependency-name: fossas/fossa-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@Amnah199
Copy link
Contributor Author

Created a replacement PR #1326 for this issue.

@Amnah199 Amnah199 closed this Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment