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

Fixing multi-part response parsing #165

Merged
merged 4 commits into from
Apr 18, 2024

Conversation

alx13
Copy link
Collaborator

@alx13 alx13 commented Apr 18, 2024

No description provided.

@alx13 alx13 force-pushed the alx13/multi-part-response branch from ddd7585 to 40237b2 Compare April 18, 2024 12:09

for part in response_candidate.content.parts:
try:
text = part.text
Copy link
Collaborator

Choose a reason for hiding this comment

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

nits: maybe if hasattr(part, "text") and part.text: ... instead

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a @property getter, it would not work

@alx13 alx13 force-pushed the alx13/multi-part-response branch 2 times, most recently from 6f88213 to e288305 Compare April 18, 2024 13:03
@alx13 alx13 force-pushed the alx13/multi-part-response branch from e288305 to e66b89b Compare April 18, 2024 13:12
@alx13 alx13 marked this pull request as ready for review April 18, 2024 13:12
@alx13 alx13 force-pushed the alx13/multi-part-response branch 7 times, most recently from 74c7af5 to 62e98af Compare April 18, 2024 13:41
@alx13 alx13 force-pushed the alx13/multi-part-response branch from 62e98af to 5ed6397 Compare April 18, 2024 14:02
@lkuligin lkuligin merged commit fc8e92d into langchain-ai:main Apr 18, 2024
13 checks passed
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