jamesrochabrun / SwiftAnthropic

An open-source Swift package for interacting with Anthropic's public API.
90 stars 29 forks source link

Tools with streaming not working #20

Closed paulotaylor closed 3 months ago

paulotaylor commented 3 months ago

Claude already supports tools use with streaming but it doesn't seem to work with this library - https://www.anthropic.com/news/tool-use-ga

jamesrochabrun commented 3 months ago

Can you share your api request? thanks

jamesrochabrun commented 3 months ago

Did you saw this demo? https://github.com/jamesrochabrun/SwiftAnthropic/blob/main/Examples/SwiftAnthropicExample/SwiftAnthropicExample/FunctionCalling/MessageFunctionCallingDemoView.swift

sakeven commented 3 months ago

@jamesrochabrun The demo you provided does not seem to extract the toolResponse when calling streamMessage, so how do you obtain tool_use?

jamesrochabrun commented 3 months ago

Got it, this adds support for it https://github.com/jamesrochabrun/SwiftAnthropic/releases/tag/v1.7