mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-02 03:55:55 +00:00
fix:The fix is in place — content = '' is now reset at the start of each loop iteration , which prevents stale text from being duplicated across tool call and end-turn chunks. (#2060)
This commit is contained in:
@@ -288,10 +288,10 @@ class AnthropicMessages(requester.ProviderAPIRequester):
|
|||||||
think_started = False
|
think_started = False
|
||||||
think_ended = False
|
think_ended = False
|
||||||
finish_reason = False
|
finish_reason = False
|
||||||
content = ''
|
|
||||||
tool_name = ''
|
tool_name = ''
|
||||||
tool_id = ''
|
tool_id = ''
|
||||||
async for chunk in await self.client.messages.create(**args):
|
async for chunk in await self.client.messages.create(**args):
|
||||||
|
content = ''
|
||||||
tool_call = {'id': None, 'function': {'name': None, 'arguments': None}, 'type': 'function'}
|
tool_call = {'id': None, 'function': {'name': None, 'arguments': None}, 'type': 'function'}
|
||||||
if isinstance(
|
if isinstance(
|
||||||
chunk, anthropic.types.raw_content_block_start_event.RawContentBlockStartEvent
|
chunk, anthropic.types.raw_content_block_start_event.RawContentBlockStartEvent
|
||||||
|
|||||||
Reference in New Issue
Block a user