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: remove everything related to ChatMessage and Tool #169

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

anakin87
Copy link
Member

Related Issues

Proposed Changes:

  • now that the refactored ChatMessage and Tool work has been migrated to Haystack and core-integrations, remove everything related to this experiment
  • small adaptations to make sure that other classes keep working

How did you test it?

CI

Checklist

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@coveralls
Copy link

coveralls commented Jan 17, 2025

Pull Request Test Coverage Report for Build 12833107261

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 22 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-4.9%) to 78.679%

Files with Coverage Reduction New Missed Lines %
components/generators/chat/openai.py 22 88.42%
Totals Coverage Status
Change from base Build 12738332626: -4.9%
Covered Lines: 1358
Relevant Lines: 1726

💛 - Coveralls

@@ -53,18 +52,11 @@ dependencies = [

[tool.hatch.envs.test]
extra-dependencies = [
"transformers<4.46.0", # https://github.com/huggingface/transformers/issues/34370
"transformers>=4.47.0, <4.48.0", # https://github.com/huggingface/transformers/issues/35639
Copy link
Member Author

Choose a reason for hiding this comment

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

bug in transformers

],
"tools_strict": True,
},
}

def test_to_dict_with_lambda_streaming_callback(self, monkeypatch):
Copy link
Member Author

Choose a reason for hiding this comment

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

we no longer allow serialization of lambdas

@@ -733,7 +733,7 @@ def run(self, prompt_source: List[ChatMessage]):
class MessageMerger:
@component.output_types(merged_message=str)
def run(self, messages: List[ChatMessage], metadata: dict = None):
return {"merged_message": "\n".join(t.content for t in messages)}
return {"merged_message": "\n".join(t.text for t in messages)}
Copy link
Member Author

Choose a reason for hiding this comment

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

new ChatMessage API

@@ -1,276 +0,0 @@
# SPDX-FileCopyrightText: 2022-present deepset GmbH <info@deepset.ai>
Copy link
Member Author

Choose a reason for hiding this comment

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

this was only implemented to support the new ChatMessage (now integrated in Haystack)

@anakin87 anakin87 marked this pull request as ready for review January 17, 2025 16:35
@anakin87 anakin87 requested review from a team as code owners January 17, 2025 16:35
@anakin87 anakin87 requested review from dfokina, davidsbatista and vblagoje and removed request for a team January 17, 2025 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants