sublayer icon indicating copy to clipboard operation
sublayer copied to clipboard

Supporting native claude tools

Open drnic opened this issue 1 year ago • 2 comments

https://docs.anthropic.com/claude/docs/tool-use

Claude now has native tools/functions. Theoretically we could rip out the Providers::Claude implementation and rewrite it to look similarly to the ::OpenAi provider.

Except the schema of claude3 tools looks different to openai functions.

Suggestion: OutputProviders rename to_hash to to_openai_hash; and then we add to_claude3_hash to be used for Claude provider? Fingers crossed there isn't a distinct tool/function OutputProvider schema for every LLM. My suggestion won't last the test of time.

drnic avatar Apr 16 '24 05:04 drnic

Yeah, that's a really great point! I think your PR hints at a really nice solution to this problem that lets us avoid having to make big changes to adapters any time a provider updates their API

swerner avatar Apr 16 '24 14:04 swerner

Will primarily share potential code examples over there to see if we can get to a solution that solves this

swerner avatar Apr 16 '24 14:04 swerner

Just merged function calling into the 0.1 branch. I just realized this branching/versioning plan was a little backwards. Going to be working through merging these PRs into the 0.1 branch and merging that into main and have all new feature work and releases done on main, with a release cut once we start working on breaking changes. Created a new 0.0 branch to add bugfixes and minor changes to, similar to how Rails does it.

swerner avatar May 15 '24 21:05 swerner