You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, I want to thank you for developing this library! I'm quite new to using instructor and appreciate the thoughtful design behind it.
I'm currently working on tool calling and noticed a change in behavior starting from version 1.5.2, specifically after the multimodal support was added. Previously, I was able to pass tool responses back to the LLM as structured tool messages like the example below:
Since convert_messages now only retains role and content fields, other custom attributes like tool_call_id are not included, causing issues in workflows that rely on structured tool messages.
To address this, I modified the convert_messages function as follows:
This change ensures that all fields in the original message, like tool_call_id, are preserved. I wanted to ask if this approach is appropriate or if there’s a better way to handle this scenario? Is there a reason convert_messages only processes role and content fields?
Any guidance or recommendations would be greatly appreciated!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello all,
First of all, I want to thank you for developing this library! I'm quite new to using
instructor
and appreciate the thoughtful design behind it.I'm currently working on tool calling and noticed a change in behavior starting from version 1.5.2, specifically after the multimodal support was added. Previously, I was able to pass tool responses back to the LLM as structured tool messages like the example below:
Since
convert_messages
now only retainsrole
andcontent
fields, other custom attributes liketool_call_id
are not included, causing issues in workflows that rely on structured tool messages.To address this, I modified the
convert_messages
function as follows:This change ensures that all fields in the original message, like
tool_call_id
, are preserved. I wanted to ask if this approach is appropriate or if there’s a better way to handle this scenario? Is there a reasonconvert_messages
only processesrole
andcontent
fields?Any guidance or recommendations would be greatly appreciated!
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions