Skip to content
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

chore: Google-AI - gently handle the removal of FUNCTION role and ChatMessage.from_function #1297

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

anakin87
Copy link
Member

@anakin87 anakin87 commented Jan 16, 2025

Related Issues

Nightly tests with Haystack main are failing due to the removal of FUNCTION role and ChatMessage.from_function in deepset-ai/haystack#8725

failing test: https://github.com/deepset-ai/haystack-core-integrations/actions/runs/12799530567/job/35685749382

Proposed Changes:

  • Gently handle the removal, checking if FUNCTION role is available
  • avoid using ChatMessage.from_function in tests - if not available

How did you test it?

CI; local tests with Haystack main branch

Notes for the reviewer

You may notice how this PR is doing some workarounds to avoid tests failing.
I'll soon create an issue to keep track of proper implementation of Tool support in Google AI.

Checklist

@@ -56,7 +56,7 @@ cov = ["test-cov", "cov-report"]
cov-retry = ["test-cov-retry", "cov-report"]
docs = ["pydoc-markdown pydoc/config.yml"]
[[tool.hatch.envs.all.matrix]]
python = ["3.8", "3.9", "3.10", "3.11"]
python = ["3.9", "3.10", "3.11"]
Copy link
Member Author

Choose a reason for hiding this comment

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

unrelated: we are not declaring compatibility with python 3.8 for this package, so testing it with 3.8 makes little sense

@anakin87 anakin87 changed the title chore: Google-Ai - gently handle the removal of FUNCTION role and ChatMessage.from_function chore: Google-AI - gently handle the removal of FUNCTION role and ChatMessage.from_function Jan 16, 2025
@anakin87 anakin87 marked this pull request as ready for review January 16, 2025 11:48
@anakin87 anakin87 requested a review from a team as a code owner January 16, 2025 11:48
@anakin87 anakin87 requested review from Amnah199 and removed request for a team January 16, 2025 11:48
Copy link
Contributor

@Amnah199 Amnah199 left a comment

Choose a reason for hiding this comment

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

Looks fine as a temporary solution 👍 .
Agree with having an issue for required updates for Tool usage so we don't miss this.

@anakin87
Copy link
Member Author

Thanks!
Support for Tool in Google AI ChatGenerator is now tracked in deepset-ai/haystack#8735

@anakin87 anakin87 merged commit 501f31c into main Jan 16, 2025
11 checks passed
@anakin87 anakin87 deleted the fix-googleai-removed-function-role branch January 16, 2025 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants