Closed hyperlink closed 7 months ago
Hi @hyperlink. Thanks for the feedback.
When I look the usage (on .messageDelta type) it appears to always be nil.
I have checked your point, and the Anthropic documentation explains that the response to a message_delta
event has the following type.
event: message_delta
data: {"type": "message_delta", "delta": {"stop_reason": "end_turn", "stop_sequence":null, "usage":{"output_tokens": 15}}}
However, when I checked the actual response, I found the following
event: message_delta
data: {"type": "message_delta", "delta": {"stop_reason": "end_turn", "stop_sequence":null}, "usage":{"output_tokens": 15}}
The difference between the two is whether usage
is under delta
or not. Perhaps the documentation is wrong, but we are reserving our response at this time to contact Anthropic.
Yes @fumito-ito I also see the same the console. Appears to be a bug in their documentation!
I reported the issue to Anthropic's support. I have it fixed locally and I'll try to create a PR.
Fixed by #8
Hello!
I have a question about and would appreciate any help.
According to Anthropic's docs the message delta is supposed to have a usage with the
message_delta
event.event: message_delta data: {"type": "message_delta", "delta": {"stop_reason": "end_turn", "stop_sequence":null, "usage":{"output_tokens": 15}}}
When I look the usage (on .messageDelta type) it appears to always be nil.
Any ideas why that would happen?