Closed yujonglee closed 5 months ago
Thanks! I like the fix. Can you update the PR to not include the formatting changes? Yes, they are valid formatting changes, however, they are not related to the 1 line fix.
@brainlid makes sense. just did that!
Thanks! ❤️💛💙💜
I ended up solving it a different way by updating Utils.fire_callback
. The spec for fire_callback
should allow for a non-list, and I think that's right. I didn't want converting a single message to return a list of 1 messages either.
But this pointed out that I was missing some test coverage, which I've also addressed.
This line cause problem for current Anthropic implementation:
https://github.com/brainlid/langchain/blob/1dab891c48d26f0127991c784e6a2bb7f1050188/lib/utils.ex#L109
This PR fix it by wrapping message.