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

[BUGFIX] Fix value.startsWith is not a function error #3747

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

simsketch
Copy link

There is an issue in 2.2.1 where using AnthropicChat in an agent flow with a tool was causing an error because it wasn't setup to handle an array.

@simsketch simsketch changed the title Fix value.startsWith is not a function error [BUGFIX] Fix value.startsWith is not a function error Dec 20, 2024
// if messageOutput.content is a string, set value to the content
if (typeof messageOutput.content === 'string') value = messageOutput.content
// if messageOutput.content is an array
else if (Array.isArray(messageOutput.content)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

should we also check if the array is not empty?

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