Skip to content

Commit

Permalink
Reset functionJson after its been used once (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
baalimago authored Jun 24, 2024
1 parent c1c401c commit f566d2a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/vendors/anthropic/claude_stream_block_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func (c *Claude) handleContentBlockStop(blockStop string) models.CompletionEvent
if err := json.Unmarshal([]byte(c.functionJson), &inputs); err != nil {
return fmt.Errorf("failed to unmarshal functionJson: %v, error is: %w", c.functionJson, err)
}
c.functionJson = ""
return tools.Call{
Name: c.functionName,
Inputs: inputs,
Expand Down

0 comments on commit f566d2a

Please sign in to comment.