Skip to content

fix: Handle tool_file content in conversation response parsing#83

Open
petarbasic wants to merge 1 commit intopartITech:mainfrom
petarbasic:fix/tool-file-response-parsing
Open

fix: Handle tool_file content in conversation response parsing#83
petarbasic wants to merge 1 commit intopartITech:mainfrom
petarbasic:fix/tool-file-response-parsing

Conversation

@petarbasic
Copy link
Contributor

Closes #82

Response::updateFromArray() handles text and tool_reference content types within message.output entries but silently drops tool_file entries. This makes it impossible to retrieve the file_id of images generated via the image_generation built-in tool.

This PR stores tool_file entries as references (via addReference()), consistent with how tool_reference is handled. Covers both non-streaming and streaming paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Response parser drops tool_file content from conversation outputs (image generation)

1 participant