Support pre-serialized funcs in tool calling#67
Conversation
|
Found 1 changed notebook. Review the changes at https://app.gitnotebooks.com/AnswerDotAI/claudette/pull/67 |
|
I think this does an either-or. If we pass both some tools and some tools_serialized it'll only get tools_serialized I think... Maybe something like this: if tools or tools_serialized: kwargs['tools'] = [get_schema(o) for o in listify(tools)] + listify(tools_serialized)Not sure what we want or if I'm right, just flagging before I forget! |
|
In most cases if both are passed in there's probably a bug elsewhere so one solution is to encode that invariant (do something like only having a tools argument and faking type dispatch by doing isinstance(tools, List[str]) vs isinstance(tools, List[Dict]) and i except that isinstance doesn't play well with generics.). Keeping this as is, I think your suggestion is a reasonable behavior for that case. |
|
@jph00 I tried reclm but there is an issue with streaming responses. I want to go into reclm and fix this. I'm hoping to just make it work for streaming, but I also think it would be good to have a As for your suggestion above, what do you think about serializing |
Adding streaming support to reclm is proving to be a little tricky. Rather than rushing a solution, let's hold off on integrating reclm into claudette for now. |
|
serializing if the tool is callable seems like a good idea :)
… Message ID: ***@***.***>
|
|
With b0e0e66 + holding off on reclm for now, can we merge this? |
|
I think it's ready to merge. Will add reclm in a followup if I'm the first to it. |
In solveit I want to be able to send a request to claudette to perform a tool request, but I cannot send a raw function reference over a server call, so I'm allowing client to take in the schema-fied functions directly so they can be passed over a post request call.
https://github.com/AnswerDotAI/solveit/pull/352