How to create tool responses or serialize conversations? #190
-
I need to serialize a conversation in a custom format that includes tool uses - is there currently a way? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yes, at the moment we don't support this. But we could, and it's a reasonable functionality request. That said, there's some amount of incompatibility with how tool use happens among certain providers that might make this challenging. For example, some allow multiple tools uses, some don't. What would happen if we tried to move the conversation from a provider that did allow this to one that didn't? I'd recommend seeing if you can communicate the back and forth with JSON, just telling the model on the |
Beta Was this translation helpful? Give feedback.
Yes, at the moment we don't support this. But we could, and it's a reasonable functionality request. That said, there's some amount of incompatibility with how tool use happens among certain providers that might make this challenging. For example, some allow multiple tools uses, some don't. What would happen if we tried to move the conversation from a provider that did allow this to one that didn't?
I'd recommend seeing if you can communicate the back and forth with JSON, just telling the model on the
assistant
turn that it is returning this tool call response, with a note that this was an actual tool call at the time. This solution may work for your purposes.