fumito-ito / AnthropicSwiftSDK

Yet another Anthropic API client for Swift.
3 stars 1 forks source link

Support `Tool Use` #26

Closed fumito-ito closed 3 weeks ago

fumito-ito commented 3 weeks ago

fixes #3

Supports Tool Use.

You can call Swift functions from a Claude response by taking as an argument a ToolContainer that can be used from the @FunctionCalling macro.

This change supports Tool Use in both Message / Stream APIs. It also automatically calls the function and resends the result when Tool Use is detected.