diff --git a/.changeset/orange-peaches-buy.md b/.changeset/orange-peaches-buy.md new file mode 100644 index 000000000000..7c4939f1d664 --- /dev/null +++ b/.changeset/orange-peaches-buy.md @@ -0,0 +1,5 @@ +--- +'@ai-sdk/azure': patch +--- + +Support idempotent doGenerate/doStream with pre-supplied result chunks in Responses API tests. diff --git a/packages/azure/src/__fixtures__/azure-code-interpreter-tool.1.chunks.txt b/packages/azure/src/__fixtures__/azure-code-interpreter-tool.1.chunks.txt new file mode 100644 index 000000000000..2e2a48d6a168 --- /dev/null +++ b/packages/azure/src/__fixtures__/azure-code-interpreter-tool.1.chunks.txt @@ -0,0 +1,341 @@ +{"type":"response.created","sequence_number":0,"response":{"id":"resp_0ad69c3c5fcb01f60068eba78cacd08193bf9a57724aa55ab8","object":"response","created_at":1760274316,"status":"in_progress","background":false,"content_filters":null,"error":null,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini","output":[],"parallel_tool_calls":true,"previous_response_id":null,"prompt_cache_key":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"code_interpreter","container":{"type":"auto"}}],"top_logprobs":0,"top_p":1,"truncation":"disabled","usage":null,"user":null,"metadata":{}}} +{"type":"response.in_progress","sequence_number":1,"response":{"id":"resp_0ad69c3c5fcb01f60068eba78cacd08193bf9a57724aa55ab8","object":"response","created_at":1760274316,"status":"in_progress","background":false,"content_filters":null,"error":null,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini","output":[],"parallel_tool_calls":true,"previous_response_id":null,"prompt_cache_key":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"code_interpreter","container":{"type":"auto"}}],"top_logprobs":0,"top_p":1,"truncation":"disabled","usage":null,"user":null,"metadata":{}}} +{"type":"response.output_item.added","sequence_number":2,"output_index":0,"item":{"id":"rs_0ad69c3c5fcb01f60068eba78f12588193872253fcce2ef954","type":"reasoning","summary":[]}} +{"type":"response.output_item.done","sequence_number":3,"output_index":0,"item":{"id":"rs_0ad69c3c5fcb01f60068eba78f12588193872253fcce2ef954","type":"reasoning","summary":[]}} +{"type":"response.output_item.added","sequence_number":4,"output_index":1,"item":{"id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","type":"code_interpreter_call","status":"in_progress","code":"","container_id":"cntr_68eba78d6dc081908116b7ad7a32f52d0050b146e60e47a9","outputs":[]}} +{"type":"response.code_interpreter_call.in_progress","sequence_number":5,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":6,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"#","obfuscation":"D8ywzbi7cfC5nlM"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":7,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" Program","obfuscation":"aCygqPNq"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":8,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":":","obfuscation":"BP9bQgOnXnDfWyH"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":9,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" generate","obfuscation":"IJl8OYg"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":10,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" five","obfuscation":"TS1mpXyNt0v"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":11,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" random","obfuscation":"7fRlPSD3Q"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":12,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" numbers","obfuscation":"mpWSgG9E"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":13,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" between","obfuscation":"ZLmtVe7l"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":14,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" ","obfuscation":"P7M0J3qs629CIOq"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":15,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"1","obfuscation":"xcY8St3jyIVRMvD"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":16,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" and","obfuscation":"nwCfIvhxDSb7"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":17,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" ","obfuscation":"gDimDSVPBv1l6LB"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":18,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"100","obfuscation":"7Li3tHgdxM5CT"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":19,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" with","obfuscation":"kxfGkb542Qf"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":20,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" two","obfuscation":"mgOaVqNN67MA"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":21,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" decimal","obfuscation":"i4XFI30q"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":22,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" places","obfuscation":"se0IR6Xw3"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":23,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"\n","obfuscation":"Mq9hezpUw8HrZcN"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":24,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"import","obfuscation":"BnrD05DnkF"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":25,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" random","obfuscation":"MU9JS16X6"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":26,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"\n\n","obfuscation":"U6ChBng2HKRE1l"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":27,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"#","obfuscation":"RzpDBytqxSUUVor"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":28,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" Generate","obfuscation":"E5x2cEw"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":29,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" five","obfuscation":"dV5JQQvUPKW"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":30,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" random","obfuscation":"LAKlMgrlw"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":31,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" numbers","obfuscation":"5fcS9AZM"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":32,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" and","obfuscation":"z28irx8ksEtR"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":33,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" round","obfuscation":"8KdM1slqHK"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":34,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" to","obfuscation":"dqVOPpgOUuLkm"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":35,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" two","obfuscation":"3h8bVSAt5vsQ"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":36,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" decimals","obfuscation":"WFVZjfD"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":37,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"\n","obfuscation":"OP9p8um8Ulfke1V"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":38,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"numbers","obfuscation":"UWPimJ2i4"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":39,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" =","obfuscation":"1KUGmRmfIxvZWR"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":40,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" [","obfuscation":"cYhgjitRrbMamg"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":41,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"round","obfuscation":"XFR2B7i66Cz"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":42,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"(random","obfuscation":"Y8WJnSfm5"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":43,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":".uniform","obfuscation":"TZ1HPIW6"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":44,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"(","obfuscation":"67uMipY0kBqnsiI"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":45,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"1","obfuscation":"sdNDu1FTwDWuBcF"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":46,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":",","obfuscation":"WE7Jeyc68UyZ2sW"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":47,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" ","obfuscation":"GR17niBPl6TXhQO"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":48,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"100","obfuscation":"UpO8f9qvZLCt4"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":49,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"),","obfuscation":"1Mo8RpFjdpePUH"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":50,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" ","obfuscation":"vZDpzQ2l8NC7zsQ"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":51,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"2","obfuscation":"eHDfNwGp84sAa7i"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":52,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":")","obfuscation":"LWswKAA5pQ4ZrSM"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":53,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" for","obfuscation":"YUnlNNS2zo8o"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":54,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" _","obfuscation":"Bax52Ksm3nMf1a"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":55,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" in","obfuscation":"Y3J3pSeI80alL"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":56,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" range","obfuscation":"O95ZFovIh9"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":57,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"(","obfuscation":"wWBTIvfhE3lXqzl"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":58,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"5","obfuscation":"W7knvK1qtSqNyJV"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":59,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":")]\n\n","obfuscation":"QeadUoVXfFns"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":60,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"#","obfuscation":"CCeQykKnwj1pN6p"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":61,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" Print","obfuscation":"c6DPBCrODX"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":62,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" the","obfuscation":"yekSDLzi6AwT"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":63,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" list","obfuscation":"vhgQkTSz4CX"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":64,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" and","obfuscation":"soC0ukyCprfP"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":65,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" a","obfuscation":"lm8DR5SZGc0UJ0"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":66,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" nicely","obfuscation":"LON4ZOqqm"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":67,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" formatted","obfuscation":"XQ7B1z"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":68,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" string","obfuscation":"zqj3fY5ak"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":69,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"\n","obfuscation":"T8Rr0EwAH1Xsofn"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":70,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"print","obfuscation":"BrZ0NhAMAeI"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":71,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"(\"","obfuscation":"XVMYnKp4lqwhSr"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":72,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"Generated","obfuscation":"LdN9efz"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":73,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" numbers","obfuscation":"RSvJoQdS"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":74,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" (","obfuscation":"3WwCoj27X927UT"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":75,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"as","obfuscation":"8wsJurRAAUqujF"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":76,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" floats","obfuscation":"mFHaTaSIy"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":77,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"):","obfuscation":"Q44oVqLFL84zfS"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":78,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"\",","obfuscation":"FqaVj4ihN4GCDw"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":79,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" numbers","obfuscation":"XuIY91v2"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":80,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":")\n","obfuscation":"zJDAEJWyzfXzxo"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":81,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"print","obfuscation":"7OppIcFveVb"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":82,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"(\"","obfuscation":"xhQCByeLa9Tg9N"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":83,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"Generated","obfuscation":"Gf1WgPO"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":84,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" numbers","obfuscation":"JQlSFgIN"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":85,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" (","obfuscation":"LSBf5aEn3W2r44"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":86,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"formatted","obfuscation":"IpC1bMD"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":87,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" to","obfuscation":"2vSFuWcho5VLz"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":88,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" ","obfuscation":"epEp6M3wEpWmQk2"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":89,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"2","obfuscation":"v5L78I6zGmUuuHX"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":90,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" decimal","obfuscation":"Dku0vwjL"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":91,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" places","obfuscation":"UXtccOlCb"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":92,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"):","obfuscation":"0YigPDgqm1wrfI"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":93,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"\",","obfuscation":"txnc8FzQFeWxOF"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":94,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" \",","obfuscation":"CVGB5XGJIqCMB"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":95,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" \".","obfuscation":"jmryp4af7yBtq"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":96,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"join","obfuscation":"dneOla5ViKXt"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":97,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"(f","obfuscation":"4MggcQGDVM1rIW"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":98,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"\"{","obfuscation":"4xhV1ZqYl9TGAo"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":99,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"n","obfuscation":"0p46ZuoATsfjYpp"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":100,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":":.","obfuscation":"zy54El2gqYwHf4"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":101,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"2","obfuscation":"5HCue3RL1ERccFf"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":102,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"f","obfuscation":"FiUIjhvRjz6Rnyd"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":103,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"}\"","obfuscation":"zfhukIdXN6Xb7j"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":104,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" for","obfuscation":"9bgSkDRN0KxK"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":105,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" n","obfuscation":"FzpD5yqqo2rGdT"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":106,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" in","obfuscation":"nX07cBeLC884E"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":107,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":" numbers","obfuscation":"b01DNXF6"} +{"type":"response.code_interpreter_call_code.delta","sequence_number":108,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","delta":"))","obfuscation":"GyLinlw1V6kDej"} +{"type":"response.code_interpreter_call_code.done","sequence_number":109,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","code":"# Program: generate five random numbers between 1 and 100 with two decimal places\nimport random\n\n# Generate five random numbers and round to two decimals\nnumbers = [round(random.uniform(1, 100), 2) for _ in range(5)]\n\n# Print the list and a nicely formatted string\nprint(\"Generated numbers (as floats):\", numbers)\nprint(\"Generated numbers (formatted to 2 decimal places):\", \", \".join(f\"{n:.2f}\" for n in numbers))"} +{"type":"response.code_interpreter_call.interpreting","sequence_number":110,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f"} +{"type":"response.code_interpreter_call.completed","sequence_number":111,"output_index":1,"item_id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f"} +{"type":"response.output_item.done","sequence_number":112,"output_index":1,"item":{"id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","type":"code_interpreter_call","status":"completed","code":"# Program: generate five random numbers between 1 and 100 with two decimal places\nimport random\n\n# Generate five random numbers and round to two decimals\nnumbers = [round(random.uniform(1, 100), 2) for _ in range(5)]\n\n# Print the list and a nicely formatted string\nprint(\"Generated numbers (as floats):\", numbers)\nprint(\"Generated numbers (formatted to 2 decimal places):\", \", \".join(f\"{n:.2f}\" for n in numbers))","container_id":"cntr_68eba78d6dc081908116b7ad7a32f52d0050b146e60e47a9","outputs":[{"type":"logs","logs":"Generated numbers (as floats): [88.99, 51.21, 89.85, 88.97, 7.73]\nGenerated numbers (formatted to 2 decimal places): 88.99, 51.21, 89.85, 88.97, 7.73\n"}]}} +{"type":"response.output_item.added","sequence_number":113,"output_index":2,"item":{"id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","type":"message","status":"in_progress","content":[],"role":"assistant"}} +{"type":"response.content_part.added","sequence_number":114,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":""}} +{"type":"response.output_text.delta","sequence_number":115,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"Here's","logprobs":[],"obfuscation":"z823ifMVbk"} +{"type":"response.output_text.delta","sequence_number":116,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" a","logprobs":[],"obfuscation":"zsPX59m7xf9diG"} +{"type":"response.output_text.delta","sequence_number":117,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" simple","logprobs":[],"obfuscation":"WEWRbnIHY"} +{"type":"response.output_text.delta","sequence_number":118,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" Python","logprobs":[],"obfuscation":"ve2qs5GDk"} +{"type":"response.output_text.delta","sequence_number":119,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" program","logprobs":[],"obfuscation":"Fms9QIfT"} +{"type":"response.output_text.delta","sequence_number":120,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" that","logprobs":[],"obfuscation":"siA9FLYkU6y"} +{"type":"response.output_text.delta","sequence_number":121,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" generates","logprobs":[],"obfuscation":"bQGOX6"} +{"type":"response.output_text.delta","sequence_number":122,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" five","logprobs":[],"obfuscation":"IbjenMxEKh3"} +{"type":"response.output_text.delta","sequence_number":123,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" random","logprobs":[],"obfuscation":"GpNXakLe8"} +{"type":"response.output_text.delta","sequence_number":124,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" numbers","logprobs":[],"obfuscation":"RkvVM51X"} +{"type":"response.output_text.delta","sequence_number":125,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" between","logprobs":[],"obfuscation":"XpgfmXJg"} +{"type":"response.output_text.delta","sequence_number":126,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" ","logprobs":[],"obfuscation":"7i4Goio4BWo0bc2"} +{"type":"response.output_text.delta","sequence_number":127,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"1","logprobs":[],"obfuscation":"jAIeeeGHYVn961G"} +{"type":"response.output_text.delta","sequence_number":128,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" and","logprobs":[],"obfuscation":"9JGei5ShHdk1"} +{"type":"response.output_text.delta","sequence_number":129,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" ","logprobs":[],"obfuscation":"G1m819thHe2Ud24"} +{"type":"response.output_text.delta","sequence_number":130,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"100","logprobs":[],"obfuscation":"Xp1Gdx4VaMf9s"} +{"type":"response.output_text.delta","sequence_number":131,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" with","logprobs":[],"obfuscation":"8rBkwmwoOj7"} +{"type":"response.output_text.delta","sequence_number":132,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" two","logprobs":[],"obfuscation":"9pD47SVBkpox"} +{"type":"response.output_text.delta","sequence_number":133,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" decimal","logprobs":[],"obfuscation":"QehroecH"} +{"type":"response.output_text.delta","sequence_number":134,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" places","logprobs":[],"obfuscation":"WvtzRNhYC"} +{"type":"response.output_text.delta","sequence_number":135,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":",","logprobs":[],"obfuscation":"qpVFto0LHHWpaxR"} +{"type":"response.output_text.delta","sequence_number":136,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" and","logprobs":[],"obfuscation":"Bs5INqnghTeP"} +{"type":"response.output_text.delta","sequence_number":137,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" the","logprobs":[],"obfuscation":"Rc9LkpJSPKZH"} +{"type":"response.output_text.delta","sequence_number":138,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" execution","logprobs":[],"obfuscation":"C4ZvoN"} +{"type":"response.output_text.delta","sequence_number":139,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" result","logprobs":[],"obfuscation":"RdlOpu64j"} +{"type":"response.output_text.delta","sequence_number":140,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" from","logprobs":[],"obfuscation":"fztyTpDne4g"} +{"type":"response.output_text.delta","sequence_number":141,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" running","logprobs":[],"obfuscation":"VhoGSvEJ"} +{"type":"response.output_text.delta","sequence_number":142,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" it","logprobs":[],"obfuscation":"774GbydLXjz0K"} +{"type":"response.output_text.delta","sequence_number":143,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":".\n\n","logprobs":[],"obfuscation":"z1NS0dK8Dx6eb"} +{"type":"response.output_text.delta","sequence_number":144,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"Program","logprobs":[],"obfuscation":"MZ5CpTQzw"} +{"type":"response.output_text.delta","sequence_number":145,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":":\n","logprobs":[],"obfuscation":"h2p7ZPi9tGPqqw"} +{"type":"response.output_text.delta","sequence_number":146,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"```","logprobs":[],"obfuscation":"v8PD0ZCer8mWF"} +{"type":"response.output_text.delta","sequence_number":147,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"python","logprobs":[],"obfuscation":"dPjDaZvX88"} +{"type":"response.output_text.delta","sequence_number":148,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"\n","logprobs":[],"obfuscation":"V5cH2Hh9o4HfKdd"} +{"type":"response.output_text.delta","sequence_number":149,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"import","logprobs":[],"obfuscation":"Fs9GlAjU0m"} +{"type":"response.output_text.delta","sequence_number":150,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" random","logprobs":[],"obfuscation":"2JedyQy9G"} +{"type":"response.output_text.delta","sequence_number":151,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"\n\n","logprobs":[],"obfuscation":"2CR2bFrxx71EB8"} +{"type":"response.output_text.delta","sequence_number":152,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"#","logprobs":[],"obfuscation":"LXZawe3CyEbvf2U"} +{"type":"response.output_text.delta","sequence_number":153,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" Generate","logprobs":[],"obfuscation":"VptMK8A"} +{"type":"response.output_text.delta","sequence_number":154,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" five","logprobs":[],"obfuscation":"s7hEtW4rgyt"} +{"type":"response.output_text.delta","sequence_number":155,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" random","logprobs":[],"obfuscation":"59w7YmkvA"} +{"type":"response.output_text.delta","sequence_number":156,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" numbers","logprobs":[],"obfuscation":"dOWel7VR"} +{"type":"response.output_text.delta","sequence_number":157,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" and","logprobs":[],"obfuscation":"UBVS7xUhIDOv"} +{"type":"response.output_text.delta","sequence_number":158,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" round","logprobs":[],"obfuscation":"0cTRB715Uv"} +{"type":"response.output_text.delta","sequence_number":159,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" to","logprobs":[],"obfuscation":"14EgMfMYWuh1a"} +{"type":"response.output_text.delta","sequence_number":160,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" two","logprobs":[],"obfuscation":"mHkmQTO3RLQh"} +{"type":"response.output_text.delta","sequence_number":161,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" decimals","logprobs":[],"obfuscation":"PiL8jXG"} +{"type":"response.output_text.delta","sequence_number":162,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"\n","logprobs":[],"obfuscation":"FL5CM7jzbKUF7fT"} +{"type":"response.output_text.delta","sequence_number":163,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"numbers","logprobs":[],"obfuscation":"09ZKhRHuW"} +{"type":"response.output_text.delta","sequence_number":164,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" =","logprobs":[],"obfuscation":"z36ubYaDWBsYxV"} +{"type":"response.output_text.delta","sequence_number":165,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" [","logprobs":[],"obfuscation":"QYw7oaNmnNtXmA"} +{"type":"response.output_text.delta","sequence_number":166,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"round","logprobs":[],"obfuscation":"izGI71LwIpz"} +{"type":"response.output_text.delta","sequence_number":167,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"(random","logprobs":[],"obfuscation":"gnhr1qpq8"} +{"type":"response.output_text.delta","sequence_number":168,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":".uniform","logprobs":[],"obfuscation":"FUVxDJFv"} +{"type":"response.output_text.delta","sequence_number":169,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"(","logprobs":[],"obfuscation":"M3xmknBRmifvX7T"} +{"type":"response.output_text.delta","sequence_number":170,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"1","logprobs":[],"obfuscation":"doCDQQAdAoAOM2D"} +{"type":"response.output_text.delta","sequence_number":171,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":",","logprobs":[],"obfuscation":"ft3kfKTVhXZO5xL"} +{"type":"response.output_text.delta","sequence_number":172,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" ","logprobs":[],"obfuscation":"0j7gaXTPE3D9DzR"} +{"type":"response.output_text.delta","sequence_number":173,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"100","logprobs":[],"obfuscation":"VZEO5KdR6TT8g"} +{"type":"response.output_text.delta","sequence_number":174,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"),","logprobs":[],"obfuscation":"Oh1iFUX4do07Tq"} +{"type":"response.output_text.delta","sequence_number":175,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" ","logprobs":[],"obfuscation":"J32ColB1tgcH4su"} +{"type":"response.output_text.delta","sequence_number":176,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"2","logprobs":[],"obfuscation":"ZPAaucHljuKtipI"} +{"type":"response.output_text.delta","sequence_number":177,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":")","logprobs":[],"obfuscation":"epsfRasBG8UHFWR"} +{"type":"response.output_text.delta","sequence_number":178,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" for","logprobs":[],"obfuscation":"vqr9Rg2kY5RE"} +{"type":"response.output_text.delta","sequence_number":179,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" _","logprobs":[],"obfuscation":"9TK7poynxtlS2p"} +{"type":"response.output_text.delta","sequence_number":180,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" in","logprobs":[],"obfuscation":"CXS7ssltAeje1"} +{"type":"response.output_text.delta","sequence_number":181,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" range","logprobs":[],"obfuscation":"2hEBKD6GzH"} +{"type":"response.output_text.delta","sequence_number":182,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"(","logprobs":[],"obfuscation":"R4kmYauM8yOLTMU"} +{"type":"response.output_text.delta","sequence_number":183,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"5","logprobs":[],"obfuscation":"n5Tp2qriuJkFSN7"} +{"type":"response.output_text.delta","sequence_number":184,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":")]\n\n","logprobs":[],"obfuscation":"g7IyPKRi031s"} +{"type":"response.output_text.delta","sequence_number":185,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"#","logprobs":[],"obfuscation":"74q4JoLaIkabHOT"} +{"type":"response.output_text.delta","sequence_number":186,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" Print","logprobs":[],"obfuscation":"e7lMNzNDbt"} +{"type":"response.output_text.delta","sequence_number":187,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" the","logprobs":[],"obfuscation":"jmSmHunVL4D7"} +{"type":"response.output_text.delta","sequence_number":188,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" list","logprobs":[],"obfuscation":"4afDAfm2eOn"} +{"type":"response.output_text.delta","sequence_number":189,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" and","logprobs":[],"obfuscation":"mc0vB1gQqSCv"} +{"type":"response.output_text.delta","sequence_number":190,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" a","logprobs":[],"obfuscation":"tp1SW0b9alMg5x"} +{"type":"response.output_text.delta","sequence_number":191,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" nicely","logprobs":[],"obfuscation":"WcSQB25ao"} +{"type":"response.output_text.delta","sequence_number":192,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" formatted","logprobs":[],"obfuscation":"9j3Xt4"} +{"type":"response.output_text.delta","sequence_number":193,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" string","logprobs":[],"obfuscation":"fXeW4hRnR"} +{"type":"response.output_text.delta","sequence_number":194,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"\n","logprobs":[],"obfuscation":"15RhwzeyYBHsYZf"} +{"type":"response.output_text.delta","sequence_number":195,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"print","logprobs":[],"obfuscation":"4pk5IttSATI"} +{"type":"response.output_text.delta","sequence_number":196,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"(\"","logprobs":[],"obfuscation":"PwM5qiLd6tdkik"} +{"type":"response.output_text.delta","sequence_number":197,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"Generated","logprobs":[],"obfuscation":"iwru4Rb"} +{"type":"response.output_text.delta","sequence_number":198,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" numbers","logprobs":[],"obfuscation":"k108lfVq"} +{"type":"response.output_text.delta","sequence_number":199,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" (","logprobs":[],"obfuscation":"nvFnySEFuPMQzc"} +{"type":"response.output_text.delta","sequence_number":200,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"as","logprobs":[],"obfuscation":"u7631PWrhkglqJ"} +{"type":"response.output_text.delta","sequence_number":201,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" floats","logprobs":[],"obfuscation":"I9VOuzGPX"} +{"type":"response.output_text.delta","sequence_number":202,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"):","logprobs":[],"obfuscation":"SP61FeNJfOyP6a"} +{"type":"response.output_text.delta","sequence_number":203,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"\",","logprobs":[],"obfuscation":"qEbfEfn7VLFLkk"} +{"type":"response.output_text.delta","sequence_number":204,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" numbers","logprobs":[],"obfuscation":"O8PZoyKk"} +{"type":"response.output_text.delta","sequence_number":205,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":")\n","logprobs":[],"obfuscation":"RWqH3YQAN60FkN"} +{"type":"response.output_text.delta","sequence_number":206,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"print","logprobs":[],"obfuscation":"r8rGITfaWs7"} +{"type":"response.output_text.delta","sequence_number":207,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"(\"","logprobs":[],"obfuscation":"LfqUejgZV78PN4"} +{"type":"response.output_text.delta","sequence_number":208,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"Generated","logprobs":[],"obfuscation":"GQfuBTg"} +{"type":"response.output_text.delta","sequence_number":209,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" numbers","logprobs":[],"obfuscation":"qRgdSR5S"} +{"type":"response.output_text.delta","sequence_number":210,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" (","logprobs":[],"obfuscation":"EeEQ23LF7CFZTZ"} +{"type":"response.output_text.delta","sequence_number":211,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"formatted","logprobs":[],"obfuscation":"nRjieaQ"} +{"type":"response.output_text.delta","sequence_number":212,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" to","logprobs":[],"obfuscation":"oI0ILTQKjxhum"} +{"type":"response.output_text.delta","sequence_number":213,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" ","logprobs":[],"obfuscation":"ciF4IgLoYXsQhrw"} +{"type":"response.output_text.delta","sequence_number":214,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"2","logprobs":[],"obfuscation":"EuGQg5iXRa07i1D"} +{"type":"response.output_text.delta","sequence_number":215,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" decimal","logprobs":[],"obfuscation":"ApTfpHZP"} +{"type":"response.output_text.delta","sequence_number":216,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" places","logprobs":[],"obfuscation":"EROxfBHTj"} +{"type":"response.output_text.delta","sequence_number":217,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"):","logprobs":[],"obfuscation":"3eUmSsLkZYZlmo"} +{"type":"response.output_text.delta","sequence_number":218,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"\",","logprobs":[],"obfuscation":"dkEgVhg7s6frea"} +{"type":"response.output_text.delta","sequence_number":219,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" \",","logprobs":[],"obfuscation":"bttTock0SivW5"} +{"type":"response.output_text.delta","sequence_number":220,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" \".","logprobs":[],"obfuscation":"8zfyvNKEQhhGY"} +{"type":"response.output_text.delta","sequence_number":221,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"join","logprobs":[],"obfuscation":"XIhKoiYMGwE8"} +{"type":"response.output_text.delta","sequence_number":222,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"(f","logprobs":[],"obfuscation":"7C6TeurUl24CDX"} +{"type":"response.output_text.delta","sequence_number":223,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"\"{","logprobs":[],"obfuscation":"40Xa8ptDw9ARiU"} +{"type":"response.output_text.delta","sequence_number":224,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"n","logprobs":[],"obfuscation":"vsaHWW79brmYcB7"} +{"type":"response.output_text.delta","sequence_number":225,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":":.","logprobs":[],"obfuscation":"VCkKoY4yqoq2qc"} +{"type":"response.output_text.delta","sequence_number":226,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"2","logprobs":[],"obfuscation":"nIEpklYYQhEcy8I"} +{"type":"response.output_text.delta","sequence_number":227,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"f","logprobs":[],"obfuscation":"Uu2rFDwZ3L9Glby"} +{"type":"response.output_text.delta","sequence_number":228,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"}\"","logprobs":[],"obfuscation":"E75qS6KEf8Chg1"} +{"type":"response.output_text.delta","sequence_number":229,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" for","logprobs":[],"obfuscation":"KKZccpba9Z1l"} +{"type":"response.output_text.delta","sequence_number":230,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" n","logprobs":[],"obfuscation":"cfPvQap9uX3VPJ"} +{"type":"response.output_text.delta","sequence_number":231,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" in","logprobs":[],"obfuscation":"RfV4fw6DRsE3V"} +{"type":"response.output_text.delta","sequence_number":232,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" numbers","logprobs":[],"obfuscation":"3WiLQTIH"} +{"type":"response.output_text.delta","sequence_number":233,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"))\n","logprobs":[],"obfuscation":"14ICysupc8pKe"} +{"type":"response.output_text.delta","sequence_number":234,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"``","logprobs":[],"obfuscation":"pnh093BlxAMkAD"} +{"type":"response.output_text.delta","sequence_number":235,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"`\n\n","logprobs":[],"obfuscation":"gyHKuc1aH3wQH"} +{"type":"response.output_text.delta","sequence_number":236,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"Execution","logprobs":[],"obfuscation":"EnAvr4d"} +{"type":"response.output_text.delta","sequence_number":237,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" result","logprobs":[],"obfuscation":"D3XapxFb1"} +{"type":"response.output_text.delta","sequence_number":238,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" (","logprobs":[],"obfuscation":"142iabsiDfUj7l"} +{"type":"response.output_text.delta","sequence_number":239,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"from","logprobs":[],"obfuscation":"aqnUucLBNOtb"} +{"type":"response.output_text.delta","sequence_number":240,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" this","logprobs":[],"obfuscation":"jRsZtMkxiBZ"} +{"type":"response.output_text.delta","sequence_number":241,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" run","logprobs":[],"obfuscation":"DxnJavlJEXv8"} +{"type":"response.output_text.delta","sequence_number":242,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"):\n","logprobs":[],"obfuscation":"7uONVdztSH5AF"} +{"type":"response.output_text.delta","sequence_number":243,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"Generated","logprobs":[],"obfuscation":"hssiv1A"} +{"type":"response.output_text.delta","sequence_number":244,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" numbers","logprobs":[],"obfuscation":"fNrvFhIh"} +{"type":"response.output_text.delta","sequence_number":245,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" (","logprobs":[],"obfuscation":"GyVzO7fqNT19uE"} +{"type":"response.output_text.delta","sequence_number":246,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"as","logprobs":[],"obfuscation":"VJwsRZF484UzrS"} +{"type":"response.output_text.delta","sequence_number":247,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" floats","logprobs":[],"obfuscation":"tC8qcrbut"} +{"type":"response.output_text.delta","sequence_number":248,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"):","logprobs":[],"obfuscation":"4yFRW7awnbG3Qs"} +{"type":"response.output_text.delta","sequence_number":249,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" [","logprobs":[],"obfuscation":"zBfot2qwFLo01R"} +{"type":"response.output_text.delta","sequence_number":250,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"88","logprobs":[],"obfuscation":"ek3FWBYs4eThhj"} +{"type":"response.output_text.delta","sequence_number":251,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":".","logprobs":[],"obfuscation":"iNWEdJj45ScXxSq"} +{"type":"response.output_text.delta","sequence_number":252,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"99","logprobs":[],"obfuscation":"RnQPtUxauB0lQJ"} +{"type":"response.output_text.delta","sequence_number":253,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":",","logprobs":[],"obfuscation":"BE5cotsqhVyCqHa"} +{"type":"response.output_text.delta","sequence_number":254,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" ","logprobs":[],"obfuscation":"0dTbqhMfDNwvZO4"} +{"type":"response.output_text.delta","sequence_number":255,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"51","logprobs":[],"obfuscation":"FafcDLNTwDZsnX"} +{"type":"response.output_text.delta","sequence_number":256,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":".","logprobs":[],"obfuscation":"Uig77YVj0hRZHz2"} +{"type":"response.output_text.delta","sequence_number":257,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"21","logprobs":[],"obfuscation":"J8XbKvpNlvrzqU"} +{"type":"response.output_text.delta","sequence_number":258,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":",","logprobs":[],"obfuscation":"bnqdo9B1UoukeQA"} +{"type":"response.output_text.delta","sequence_number":259,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" ","logprobs":[],"obfuscation":"bwRPNM3JIxDLW5c"} +{"type":"response.output_text.delta","sequence_number":260,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"89","logprobs":[],"obfuscation":"I8d10hVtZzkOue"} +{"type":"response.output_text.delta","sequence_number":261,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":".","logprobs":[],"obfuscation":"sjpGGdxz5sKhcCa"} +{"type":"response.output_text.delta","sequence_number":262,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"85","logprobs":[],"obfuscation":"fJ6OfF1k2c2JTp"} +{"type":"response.output_text.delta","sequence_number":263,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":",","logprobs":[],"obfuscation":"vJsfdhPJX6EaA5c"} +{"type":"response.output_text.delta","sequence_number":264,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" ","logprobs":[],"obfuscation":"eUjN3YjKFUxHiqC"} +{"type":"response.output_text.delta","sequence_number":265,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"88","logprobs":[],"obfuscation":"zeereUBYWsHphf"} +{"type":"response.output_text.delta","sequence_number":266,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":".","logprobs":[],"obfuscation":"wU13gthxq81xz7Z"} +{"type":"response.output_text.delta","sequence_number":267,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"97","logprobs":[],"obfuscation":"k05gKc9XYn5XT1"} +{"type":"response.output_text.delta","sequence_number":268,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":",","logprobs":[],"obfuscation":"9W10qmFwodEno5i"} +{"type":"response.output_text.delta","sequence_number":269,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" ","logprobs":[],"obfuscation":"Jgdu6xMO9K2574m"} +{"type":"response.output_text.delta","sequence_number":270,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"7","logprobs":[],"obfuscation":"YQJ1dC9BYHWJ8d3"} +{"type":"response.output_text.delta","sequence_number":271,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":".","logprobs":[],"obfuscation":"A8UAGYIRECWVgCF"} +{"type":"response.output_text.delta","sequence_number":272,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"73","logprobs":[],"obfuscation":"UgKPBe4Gk596uK"} +{"type":"response.output_text.delta","sequence_number":273,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"]\n","logprobs":[],"obfuscation":"Exy4rAx9AAl7LK"} +{"type":"response.output_text.delta","sequence_number":274,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"Generated","logprobs":[],"obfuscation":"AifRDYV"} +{"type":"response.output_text.delta","sequence_number":275,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" numbers","logprobs":[],"obfuscation":"dNO4ec5W"} +{"type":"response.output_text.delta","sequence_number":276,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" (","logprobs":[],"obfuscation":"8D8z0lfcS8cUqU"} +{"type":"response.output_text.delta","sequence_number":277,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"formatted","logprobs":[],"obfuscation":"c1ZoqQg"} +{"type":"response.output_text.delta","sequence_number":278,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" to","logprobs":[],"obfuscation":"SxVQh24dLZBTB"} +{"type":"response.output_text.delta","sequence_number":279,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" ","logprobs":[],"obfuscation":"RVMtqD1OVWyFIyO"} +{"type":"response.output_text.delta","sequence_number":280,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"2","logprobs":[],"obfuscation":"gHX676klk146Sjp"} +{"type":"response.output_text.delta","sequence_number":281,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" decimal","logprobs":[],"obfuscation":"hBEX1zND"} +{"type":"response.output_text.delta","sequence_number":282,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" places","logprobs":[],"obfuscation":"7ziRdYG6a"} +{"type":"response.output_text.delta","sequence_number":283,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"):","logprobs":[],"obfuscation":"VtERvrAmbZ3xGX"} +{"type":"response.output_text.delta","sequence_number":284,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" ","logprobs":[],"obfuscation":"rUbIlHmpk5GQLVS"} +{"type":"response.output_text.delta","sequence_number":285,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"88","logprobs":[],"obfuscation":"vIe1A5LFXov9d8"} +{"type":"response.output_text.delta","sequence_number":286,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":".","logprobs":[],"obfuscation":"JGuLusRbib2ojIQ"} +{"type":"response.output_text.delta","sequence_number":287,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"99","logprobs":[],"obfuscation":"fC1Ej0yfL00mNS"} +{"type":"response.output_text.delta","sequence_number":288,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":",","logprobs":[],"obfuscation":"AhBhwxI86mhL3P4"} +{"type":"response.output_text.delta","sequence_number":289,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" ","logprobs":[],"obfuscation":"5NmpsOGJC5s1mJj"} +{"type":"response.output_text.delta","sequence_number":290,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"51","logprobs":[],"obfuscation":"obFmIwLuTh69Yo"} +{"type":"response.output_text.delta","sequence_number":291,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":".","logprobs":[],"obfuscation":"QC3MQ8jtVz88rkb"} +{"type":"response.output_text.delta","sequence_number":292,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"21","logprobs":[],"obfuscation":"QNOp5n1osbLQad"} +{"type":"response.output_text.delta","sequence_number":293,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":",","logprobs":[],"obfuscation":"OmAnlJyYF1AQRsP"} +{"type":"response.output_text.delta","sequence_number":294,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" ","logprobs":[],"obfuscation":"QRhgdnNODM6W6PE"} +{"type":"response.output_text.delta","sequence_number":295,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"89","logprobs":[],"obfuscation":"SpzydMPDc9B3HM"} +{"type":"response.output_text.delta","sequence_number":296,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":".","logprobs":[],"obfuscation":"uEnVwZxWyhdw2w9"} +{"type":"response.output_text.delta","sequence_number":297,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"85","logprobs":[],"obfuscation":"H9kt3etemflo54"} +{"type":"response.output_text.delta","sequence_number":298,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":",","logprobs":[],"obfuscation":"pc1XTo9g3aMLxpz"} +{"type":"response.output_text.delta","sequence_number":299,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" ","logprobs":[],"obfuscation":"qys0AlLylXtJLah"} +{"type":"response.output_text.delta","sequence_number":300,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"88","logprobs":[],"obfuscation":"HAmRP7cagN4v7h"} +{"type":"response.output_text.delta","sequence_number":301,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":".","logprobs":[],"obfuscation":"IC0ZISTvxb3pk8W"} +{"type":"response.output_text.delta","sequence_number":302,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"97","logprobs":[],"obfuscation":"OfW1PckShrQKcx"} +{"type":"response.output_text.delta","sequence_number":303,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":",","logprobs":[],"obfuscation":"Eb20IY24q32KGel"} +{"type":"response.output_text.delta","sequence_number":304,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" ","logprobs":[],"obfuscation":"dQ9uy14B4HNyCVn"} +{"type":"response.output_text.delta","sequence_number":305,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"7","logprobs":[],"obfuscation":"qYklbEQAG2EQrds"} +{"type":"response.output_text.delta","sequence_number":306,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":".","logprobs":[],"obfuscation":"tXvwKMebinYN6SG"} +{"type":"response.output_text.delta","sequence_number":307,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"73","logprobs":[],"obfuscation":"pcGRZ6zKOrty8M"} +{"type":"response.output_text.delta","sequence_number":308,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"\n\n","logprobs":[],"obfuscation":"s7Wd0w9S1jd9tp"} +{"type":"response.output_text.delta","sequence_number":309,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"If","logprobs":[],"obfuscation":"KQaXTplq6g2GrA"} +{"type":"response.output_text.delta","sequence_number":310,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" you","logprobs":[],"obfuscation":"ulCznHs9Llbb"} +{"type":"response.output_text.delta","sequence_number":311,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" want","logprobs":[],"obfuscation":"F2IA9Q5Zn0Z"} +{"type":"response.output_text.delta","sequence_number":312,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" a","logprobs":[],"obfuscation":"Ou1frEiofkVBs0"} +{"type":"response.output_text.delta","sequence_number":313,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" reproduc","logprobs":[],"obfuscation":"2B8BK7O"} +{"type":"response.output_text.delta","sequence_number":314,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"ible","logprobs":[],"obfuscation":"r3dlw4zw1pEr"} +{"type":"response.output_text.delta","sequence_number":315,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" result","logprobs":[],"obfuscation":"P9gGuO7Hn"} +{"type":"response.output_text.delta","sequence_number":316,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":",","logprobs":[],"obfuscation":"rOejZspTPKbqtRZ"} +{"type":"response.output_text.delta","sequence_number":317,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" I","logprobs":[],"obfuscation":"G0jJIYU0GvEwOR"} +{"type":"response.output_text.delta","sequence_number":318,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" can","logprobs":[],"obfuscation":"lL79wIGmGhKw"} +{"type":"response.output_text.delta","sequence_number":319,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" add","logprobs":[],"obfuscation":"YUxEPP6bF89B"} +{"type":"response.output_text.delta","sequence_number":320,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" a","logprobs":[],"obfuscation":"UmVbwabgJd6j1r"} +{"type":"response.output_text.delta","sequence_number":321,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" fixed","logprobs":[],"obfuscation":"SvZT5jdpv6"} +{"type":"response.output_text.delta","sequence_number":322,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" random","logprobs":[],"obfuscation":"TMOboMcaI"} +{"type":"response.output_text.delta","sequence_number":323,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" seed","logprobs":[],"obfuscation":"HbU2h3LM9jb"} +{"type":"response.output_text.delta","sequence_number":324,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" or","logprobs":[],"obfuscation":"XsNohSkFqKTEo"} +{"type":"response.output_text.delta","sequence_number":325,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" save","logprobs":[],"obfuscation":"0uj8O6G4HvS"} +{"type":"response.output_text.delta","sequence_number":326,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" the","logprobs":[],"obfuscation":"AnEJQBRsjj8K"} +{"type":"response.output_text.delta","sequence_number":327,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" program","logprobs":[],"obfuscation":"Og1bkEOi"} +{"type":"response.output_text.delta","sequence_number":328,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" to","logprobs":[],"obfuscation":"idTMlFCmJMZ3r"} +{"type":"response.output_text.delta","sequence_number":329,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" a","logprobs":[],"obfuscation":"wxDDb3nCwnStDH"} +{"type":"response.output_text.delta","sequence_number":330,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" file","logprobs":[],"obfuscation":"NId4YQOvLNe"} +{"type":"response.output_text.delta","sequence_number":331,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" for","logprobs":[],"obfuscation":"OLcDiVhGUXmw"} +{"type":"response.output_text.delta","sequence_number":332,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" you","logprobs":[],"obfuscation":"G0hac4cbV8bm"} +{"type":"response.output_text.delta","sequence_number":333,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":".","logprobs":[],"obfuscation":"9lRW0tljfXafKT4"} +{"type":"response.output_text.delta","sequence_number":334,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" Want","logprobs":[],"obfuscation":"HyezNyqaJk8"} +{"type":"response.output_text.delta","sequence_number":335,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":" that","logprobs":[],"obfuscation":"4gUoCcTirUz"} +{"type":"response.output_text.delta","sequence_number":336,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"delta":"?","logprobs":[],"obfuscation":"35ceMznz6UQl0NY"} +{"type":"response.output_text.done","sequence_number":337,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"text":"Here's a simple Python program that generates five random numbers between 1 and 100 with two decimal places, and the execution result from running it.\n\nProgram:\n```python\nimport random\n\n# Generate five random numbers and round to two decimals\nnumbers = [round(random.uniform(1, 100), 2) for _ in range(5)]\n\n# Print the list and a nicely formatted string\nprint(\"Generated numbers (as floats):\", numbers)\nprint(\"Generated numbers (formatted to 2 decimal places):\", \", \".join(f\"{n:.2f}\" for n in numbers))\n```\n\nExecution result (from this run):\nGenerated numbers (as floats): [88.99, 51.21, 89.85, 88.97, 7.73]\nGenerated numbers (formatted to 2 decimal places): 88.99, 51.21, 89.85, 88.97, 7.73\n\nIf you want a reproducible result, I can add a fixed random seed or save the program to a file for you. Want that?","logprobs":[]} +{"type":"response.content_part.done","sequence_number":338,"item_id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","output_index":2,"content_index":0,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":"Here's a simple Python program that generates five random numbers between 1 and 100 with two decimal places, and the execution result from running it.\n\nProgram:\n```python\nimport random\n\n# Generate five random numbers and round to two decimals\nnumbers = [round(random.uniform(1, 100), 2) for _ in range(5)]\n\n# Print the list and a nicely formatted string\nprint(\"Generated numbers (as floats):\", numbers)\nprint(\"Generated numbers (formatted to 2 decimal places):\", \", \".join(f\"{n:.2f}\" for n in numbers))\n```\n\nExecution result (from this run):\nGenerated numbers (as floats): [88.99, 51.21, 89.85, 88.97, 7.73]\nGenerated numbers (formatted to 2 decimal places): 88.99, 51.21, 89.85, 88.97, 7.73\n\nIf you want a reproducible result, I can add a fixed random seed or save the program to a file for you. Want that?"}} +{"type":"response.output_item.done","sequence_number":339,"output_index":2,"item":{"id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"Here's a simple Python program that generates five random numbers between 1 and 100 with two decimal places, and the execution result from running it.\n\nProgram:\n```python\nimport random\n\n# Generate five random numbers and round to two decimals\nnumbers = [round(random.uniform(1, 100), 2) for _ in range(5)]\n\n# Print the list and a nicely formatted string\nprint(\"Generated numbers (as floats):\", numbers)\nprint(\"Generated numbers (formatted to 2 decimal places):\", \", \".join(f\"{n:.2f}\" for n in numbers))\n```\n\nExecution result (from this run):\nGenerated numbers (as floats): [88.99, 51.21, 89.85, 88.97, 7.73]\nGenerated numbers (formatted to 2 decimal places): 88.99, 51.21, 89.85, 88.97, 7.73\n\nIf you want a reproducible result, I can add a fixed random seed or save the program to a file for you. Want that?"}],"role":"assistant"}} +{"type":"response.completed","sequence_number":340,"response":{"id":"resp_0ad69c3c5fcb01f60068eba78cacd08193bf9a57724aa55ab8","object":"response","created_at":1760274316,"status":"completed","background":false,"content_filters":null,"error":null,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini","output":[{"id":"rs_0ad69c3c5fcb01f60068eba78f12588193872253fcce2ef954","type":"reasoning","summary":[]},{"id":"ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f","type":"code_interpreter_call","status":"completed","code":"# Program: generate five random numbers between 1 and 100 with two decimal places\nimport random\n\n# Generate five random numbers and round to two decimals\nnumbers = [round(random.uniform(1, 100), 2) for _ in range(5)]\n\n# Print the list and a nicely formatted string\nprint(\"Generated numbers (as floats):\", numbers)\nprint(\"Generated numbers (formatted to 2 decimal places):\", \", \".join(f\"{n:.2f}\" for n in numbers))","container_id":"cntr_68eba78d6dc081908116b7ad7a32f52d0050b146e60e47a9","outputs":[{"type":"logs","logs":"Generated numbers (as floats): [88.99, 51.21, 89.85, 88.97, 7.73]\nGenerated numbers (formatted to 2 decimal places): 88.99, 51.21, 89.85, 88.97, 7.73\n"}]},{"id":"msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"Here's a simple Python program that generates five random numbers between 1 and 100 with two decimal places, and the execution result from running it.\n\nProgram:\n```python\nimport random\n\n# Generate five random numbers and round to two decimals\nnumbers = [round(random.uniform(1, 100), 2) for _ in range(5)]\n\n# Print the list and a nicely formatted string\nprint(\"Generated numbers (as floats):\", numbers)\nprint(\"Generated numbers (formatted to 2 decimal places):\", \", \".join(f\"{n:.2f}\" for n in numbers))\n```\n\nExecution result (from this run):\nGenerated numbers (as floats): [88.99, 51.21, 89.85, 88.97, 7.73]\nGenerated numbers (formatted to 2 decimal places): 88.99, 51.21, 89.85, 88.97, 7.73\n\nIf you want a reproducible result, I can add a fixed random seed or save the program to a file for you. Want that?"}],"role":"assistant"}],"parallel_tool_calls":true,"previous_response_id":null,"prompt_cache_key":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"code_interpreter","container":{"type":"auto"}}],"top_logprobs":0,"top_p":1,"truncation":"disabled","usage":{"input_tokens":2143,"input_tokens_details":{"cached_tokens":1280},"output_tokens":919,"output_tokens_details":{"reasoning_tokens":576},"total_tokens":3062},"user":null,"metadata":{}}} diff --git a/packages/azure/src/__fixtures__/azure-code-interpreter-tool.1.json b/packages/azure/src/__fixtures__/azure-code-interpreter-tool.1.json new file mode 100644 index 000000000000..453fb8d26196 --- /dev/null +++ b/packages/azure/src/__fixtures__/azure-code-interpreter-tool.1.json @@ -0,0 +1,90 @@ +{ + "id": "resp_02ffbc38ae6fca1a0068ec87605cfc819793efdf27e5496675", + "object": "response", + "created_at": 1760331616, + "status": "completed", + "background": false, + "content_filters": null, + "error": null, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-mini", + "output": [ + { + "id": "rs_02ffbc38ae6fca1a0068ec8762f61881979bf5191564930c23", + "type": "reasoning", + "summary": [] + }, + { + "id": "ci_02ffbc38ae6fca1a0068ec876654a08197af4d648fe8bba210", + "type": "code_interpreter_call", + "status": "completed", + "code": "import random\n\n# Generate five random numbers between 1 and 100 with two decimal places\nnumbers = [round(random.uniform(1, 100), 2) for _ in range(5)]\n\n# Print the program and its execution results\nprint(\"Program: Generate five random numbers between 1 and 100 with two decimal places\")\nprint(\"Generated numbers:\")\nfor i, num in enumerate(numbers, start=1):\n print(f\"{i}: {num:.2f}\")", + "container_id": "cntr_68ec87613e58819097ec47888dc686d8088a1d37157e7565", + "outputs": [ + { + "type": "logs", + "logs": "Program: Generate five random numbers between 1 and 100 with two decimal places\nGenerated numbers:\n1: 74.07\n2: 94.14\n3: 53.74\n4: 77.29\n5: 87.68\n" + } + ] + }, + { + "id": "msg_02ffbc38ae6fca1a0068ec8768f35c81979428e19fa11468f1", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "I ran the program and produced five random numbers between 1 and 100 with two decimal places. Results shown above:\n\n1: 74.07\n2: 94.14\n3: 53.74\n4: 77.29\n5: 87.68\n\nIf you want the code to be saved to a file, run multiple sets, or use a fixed seed for reproducible results, tell me and I can adjust." + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "previous_response_id": null, + "prompt_cache_key": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "text" + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [ + { + "type": "code_interpreter", + "container": { + "type": "auto" + } + } + ], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 1750, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 400, + "output_tokens_details": { + "reasoning_tokens": 192 + }, + "total_tokens": 2150 + }, + "user": null, + "metadata": {} +} diff --git a/packages/azure/src/__fixtures__/openai-file-search-tool.1.chunks.txt b/packages/azure/src/__fixtures__/openai-file-search-tool.1.chunks.txt new file mode 100644 index 000000000000..914a434eb071 --- /dev/null +++ b/packages/azure/src/__fixtures__/openai-file-search-tool.1.chunks.txt @@ -0,0 +1,94 @@ +{"type":"response.created","sequence_number":0,"response":{"id":"resp_0459517ad68504ad0068cabfba22b88192836339640e9a765a","object":"response","created_at":1758117818,"status":"in_progress","background":false,"error":null,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[],"parallel_tool_calls":true,"previous_response_id":null,"prompt_cache_key":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"file_search","filters":null,"max_num_results":20,"ranking_options":{"ranker":"auto","score_threshold":0},"vector_store_ids":["vs_68caad8bd5d88191ab766cf043d89a18"]}],"top_logprobs":0,"top_p":1,"truncation":"disabled","usage":null,"user":null,"metadata":{}}} +{"type":"response.in_progress","sequence_number":1,"response":{"id":"resp_0459517ad68504ad0068cabfba22b88192836339640e9a765a","object":"response","created_at":1758117818,"status":"in_progress","background":false,"error":null,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[],"parallel_tool_calls":true,"previous_response_id":null,"prompt_cache_key":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"file_search","filters":null,"max_num_results":20,"ranking_options":{"ranker":"auto","score_threshold":0},"vector_store_ids":["vs_68caad8bd5d88191ab766cf043d89a18"]}],"top_logprobs":0,"top_p":1,"truncation":"disabled","usage":null,"user":null,"metadata":{}}} +{"type":"response.output_item.added","sequence_number":2,"output_index":0,"item":{"id":"rs_0459517ad68504ad0068cabfba951881929654a05214361b35","type":"reasoning","summary":[]}} +{"type":"response.output_item.done","sequence_number":3,"output_index":0,"item":{"id":"rs_0459517ad68504ad0068cabfba951881929654a05214361b35","type":"reasoning","summary":[]}} +{"type":"response.output_item.added","sequence_number":4,"output_index":1,"item":{"id":"fs_0459517ad68504ad0068cabfbd76888192a5dc4475fadabf8a","type":"file_search_call","status":"in_progress","queries":[],"results":null}} +{"type":"response.file_search_call.in_progress","sequence_number":5,"output_index":1,"item_id":"fs_0459517ad68504ad0068cabfbd76888192a5dc4475fadabf8a"} +{"type":"response.file_search_call.searching","sequence_number":6,"output_index":1,"item_id":"fs_0459517ad68504ad0068cabfbd76888192a5dc4475fadabf8a"} +{"type":"response.file_search_call.completed","sequence_number":7,"output_index":1,"item_id":"fs_0459517ad68504ad0068cabfbd76888192a5dc4475fadabf8a"} +{"type":"response.output_item.done","sequence_number":8,"output_index":1,"item":{"id":"fs_0459517ad68504ad0068cabfbd76888192a5dc4475fadabf8a","type":"file_search_call","status":"completed","queries":["What is an embedding model according to this document?","What is an embedding model defined as in the document?","definition of embedding model"],"results":null}} +{"type":"response.output_item.added","sequence_number":9,"output_index":2,"item":{"id":"rs_0459517ad68504ad0068cabfbf337881929cf5266be7a008a9","type":"reasoning","summary":[]}} +{"type":"response.output_item.done","sequence_number":10,"output_index":2,"item":{"id":"rs_0459517ad68504ad0068cabfbf337881929cf5266be7a008a9","type":"reasoning","summary":[]}} +{"type":"response.output_item.added","sequence_number":11,"output_index":3,"item":{"id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","type":"message","status":"in_progress","content":[],"role":"assistant"}} +{"type":"response.content_part.added","sequence_number":12,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":""}} +{"type":"response.output_text.delta","sequence_number":13,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":"According","logprobs":[],"obfuscation":"liJu2gE"} +{"type":"response.output_text.delta","sequence_number":14,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" to","logprobs":[],"obfuscation":"5HNu0x2oBP4DS"} +{"type":"response.output_text.delta","sequence_number":15,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" the","logprobs":[],"obfuscation":"oMCnjSTGpdPE"} +{"type":"response.output_text.delta","sequence_number":16,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" document","logprobs":[],"obfuscation":"NiZmPdD"} +{"type":"response.output_text.delta","sequence_number":17,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":",","logprobs":[],"obfuscation":"vlgD14WDda5lNTa"} +{"type":"response.output_text.delta","sequence_number":18,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" an","logprobs":[],"obfuscation":"ubOMhz6bqdOfs"} +{"type":"response.output_text.delta","sequence_number":19,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" embedding","logprobs":[],"obfuscation":"6OHQBe"} +{"type":"response.output_text.delta","sequence_number":20,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" model","logprobs":[],"obfuscation":"wE2FfjpXAl"} +{"type":"response.output_text.delta","sequence_number":21,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" converts","logprobs":[],"obfuscation":"cdIHT2o"} +{"type":"response.output_text.delta","sequence_number":22,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" complex","logprobs":[],"obfuscation":"0LIh8ijL"} +{"type":"response.output_text.delta","sequence_number":23,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" data","logprobs":[],"obfuscation":"XDDB8MMj7dQ"} +{"type":"response.output_text.delta","sequence_number":24,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" (","logprobs":[],"obfuscation":"xrOoDo1pxe8Sih"} +{"type":"response.output_text.delta","sequence_number":25,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":"e","logprobs":[],"obfuscation":"YrjNY3GNWvBvvtA"} +{"type":"response.output_text.delta","sequence_number":26,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":".g","logprobs":[],"obfuscation":"FfWwJ3WQRyPMOI"} +{"type":"response.output_text.delta","sequence_number":27,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":".,","logprobs":[],"obfuscation":"52FV9X2Y5LfzVW"} +{"type":"response.output_text.delta","sequence_number":28,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" words","logprobs":[],"obfuscation":"Qu3QkUBEwy"} +{"type":"response.output_text.delta","sequence_number":29,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" or","logprobs":[],"obfuscation":"Lb2zYunjo6tJp"} +{"type":"response.output_text.delta","sequence_number":30,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" images","logprobs":[],"obfuscation":"T0I6C2Ji0"} +{"type":"response.output_text.delta","sequence_number":31,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":")","logprobs":[],"obfuscation":"hLXFmqQJOpK7lmV"} +{"type":"response.output_text.delta","sequence_number":32,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" into","logprobs":[],"obfuscation":"shSSEWk9ZhS"} +{"type":"response.output_text.delta","sequence_number":33,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" a","logprobs":[],"obfuscation":"aBFr0xTdklDdiA"} +{"type":"response.output_text.delta","sequence_number":34,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" dense","logprobs":[],"obfuscation":"YfRRLmWPET"} +{"type":"response.output_text.delta","sequence_number":35,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" vector","logprobs":[],"obfuscation":"FvaquGcUw"} +{"type":"response.output_text.delta","sequence_number":36,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" —","logprobs":[],"obfuscation":"8PuGQrs29oeDLj"} +{"type":"response.output_text.delta","sequence_number":37,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" a","logprobs":[],"obfuscation":"gJpFvi1LcxcOtE"} +{"type":"response.output_text.delta","sequence_number":38,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" list","logprobs":[],"obfuscation":"xwPT69uDxS2"} +{"type":"response.output_text.delta","sequence_number":39,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" of","logprobs":[],"obfuscation":"vEKNu3upEN6T6"} +{"type":"response.output_text.delta","sequence_number":40,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" numbers","logprobs":[],"obfuscation":"YY7mOFEn"} +{"type":"response.output_text.delta","sequence_number":41,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" —","logprobs":[],"obfuscation":"4UBtB3i3LbiWrJ"} +{"type":"response.output_text.delta","sequence_number":42,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" called","logprobs":[],"obfuscation":"cnjAeV2A0"} +{"type":"response.output_text.delta","sequence_number":43,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" an","logprobs":[],"obfuscation":"COksnLu2vES9P"} +{"type":"response.output_text.delta","sequence_number":44,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" embedding","logprobs":[],"obfuscation":"w96Cn5"} +{"type":"response.output_text.delta","sequence_number":45,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" ","logprobs":[],"obfuscation":"1UseJlZiemBSPAg"} +{"type":"response.output_text.annotation.added","sequence_number":46,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"annotation_index":0,"annotation":{"type":"file_citation","file_id":"file-Ebzhf8H4DPGPr9pUhr7n7v","filename":"ai.pdf","index":154}} +{"type":"response.output_text.delta","sequence_number":47,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":".","logprobs":[],"obfuscation":"8aFRlmffIqtlfCt"} +{"type":"response.output_text.delta","sequence_number":48,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" Unlike","logprobs":[],"obfuscation":"xUqTw4yKa"} +{"type":"response.output_text.delta","sequence_number":49,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" gener","logprobs":[],"obfuscation":"NsFTmfGbff"} +{"type":"response.output_text.delta","sequence_number":50,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":"ative","logprobs":[],"obfuscation":"qBiTdJa2gyP"} +{"type":"response.output_text.delta","sequence_number":51,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" models","logprobs":[],"obfuscation":"PSKt3fxkM"} +{"type":"response.output_text.delta","sequence_number":52,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":",","logprobs":[],"obfuscation":"8e8Za1VVyteB4ds"} +{"type":"response.output_text.delta","sequence_number":53,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" embedding","logprobs":[],"obfuscation":"Gs3cTl"} +{"type":"response.output_text.delta","sequence_number":54,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" models","logprobs":[],"obfuscation":"xrC7jkFgt"} +{"type":"response.output_text.delta","sequence_number":55,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" do","logprobs":[],"obfuscation":"R7RQOJ17j1cpc"} +{"type":"response.output_text.delta","sequence_number":56,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" not","logprobs":[],"obfuscation":"HLUy8me4lqhJ"} +{"type":"response.output_text.delta","sequence_number":57,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" generate","logprobs":[],"obfuscation":"nVQusCL"} +{"type":"response.output_text.delta","sequence_number":58,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" new","logprobs":[],"obfuscation":"8p6C49tSUygH"} +{"type":"response.output_text.delta","sequence_number":59,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" text","logprobs":[],"obfuscation":"NAiFjEoDpi3"} +{"type":"response.output_text.delta","sequence_number":60,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" or","logprobs":[],"obfuscation":"exp5SVQ1bWj35"} +{"type":"response.output_text.delta","sequence_number":61,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" data","logprobs":[],"obfuscation":"mpWYgcEeCJG"} +{"type":"response.output_text.delta","sequence_number":62,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":";","logprobs":[],"obfuscation":"ugjrVmPsBQ0sBVM"} +{"type":"response.output_text.delta","sequence_number":63,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" instead","logprobs":[],"obfuscation":"5TuCbJBY"} +{"type":"response.output_text.delta","sequence_number":64,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" they","logprobs":[],"obfuscation":"7GfAc92ZRM0"} +{"type":"response.output_text.delta","sequence_number":65,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" produce","logprobs":[],"obfuscation":"LW1cSi08"} +{"type":"response.output_text.delta","sequence_number":66,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" vector","logprobs":[],"obfuscation":"vQvkU1Q0g"} +{"type":"response.output_text.delta","sequence_number":67,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" representations","logprobs":[],"obfuscation":""} +{"type":"response.output_text.delta","sequence_number":68,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" that","logprobs":[],"obfuscation":"H6ufQbaSbhr"} +{"type":"response.output_text.delta","sequence_number":69,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" capture","logprobs":[],"obfuscation":"G9rJM2Kb"} +{"type":"response.output_text.delta","sequence_number":70,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" semantic","logprobs":[],"obfuscation":"0C6xQkm"} +{"type":"response.output_text.delta","sequence_number":71,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" and","logprobs":[],"obfuscation":"gob8I5gbSO5U"} +{"type":"response.output_text.delta","sequence_number":72,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" synt","logprobs":[],"obfuscation":"U3SbSG7fMxc"} +{"type":"response.output_text.delta","sequence_number":73,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":"actic","logprobs":[],"obfuscation":"W4sXaF0Eyf7"} +{"type":"response.output_text.delta","sequence_number":74,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" relationships","logprobs":[],"obfuscation":"1g"} +{"type":"response.output_text.delta","sequence_number":75,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" and","logprobs":[],"obfuscation":"T8VvgtUNIhwm"} +{"type":"response.output_text.delta","sequence_number":76,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" can","logprobs":[],"obfuscation":"YlEDrBvI3rGk"} +{"type":"response.output_text.delta","sequence_number":77,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" be","logprobs":[],"obfuscation":"d2YAlk8o41VBn"} +{"type":"response.output_text.delta","sequence_number":78,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" used","logprobs":[],"obfuscation":"h4uUBaMut0Y"} +{"type":"response.output_text.delta","sequence_number":79,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" as","logprobs":[],"obfuscation":"Cu4PJZ54whk2T"} +{"type":"response.output_text.delta","sequence_number":80,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" input","logprobs":[],"obfuscation":"D2Py3Lykxm"} +{"type":"response.output_text.delta","sequence_number":81,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" for","logprobs":[],"obfuscation":"db4mrk4WThq1"} +{"type":"response.output_text.delta","sequence_number":82,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" other","logprobs":[],"obfuscation":"Yq7VkDPJKu"} +{"type":"response.output_text.delta","sequence_number":83,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" models","logprobs":[],"obfuscation":"yhKaHEHFm"} +{"type":"response.output_text.delta","sequence_number":84,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" or","logprobs":[],"obfuscation":"JXNpZ1gnAGSeJ"} +{"type":"response.output_text.delta","sequence_number":85,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" NLP","logprobs":[],"obfuscation":"XH6YlZrmr3mA"} +{"type":"response.output_text.delta","sequence_number":86,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" tasks","logprobs":[],"obfuscation":"Jotz6jyyyq"} +{"type":"response.output_text.delta","sequence_number":87,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":" ","logprobs":[],"obfuscation":"PbwW8c892lezp7M"} +{"type":"response.output_text.annotation.added","sequence_number":88,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"annotation_index":1,"annotation":{"type":"file_citation","file_id":"file-Ebzhf8H4DPGPr9pUhr7n7v","filename":"ai.pdf","index":382}} +{"type":"response.output_text.delta","sequence_number":89,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"delta":".","logprobs":[],"obfuscation":"brJFUhKp1ov7xs6"} +{"type":"response.output_text.done","sequence_number":90,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"text":"According to the document, an embedding model converts complex data (e.g., words or images) into a dense vector — a list of numbers — called an embedding . Unlike generative models, embedding models do not generate new text or data; instead they produce vector representations that capture semantic and syntactic relationships and can be used as input for other models or NLP tasks .","logprobs":[]} +{"type":"response.content_part.done","sequence_number":91,"item_id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","output_index":3,"content_index":0,"part":{"type":"output_text","annotations":[{"type":"file_citation","file_id":"file-Ebzhf8H4DPGPr9pUhr7n7v","filename":"ai.pdf","index":154},{"type":"file_citation","file_id":"file-Ebzhf8H4DPGPr9pUhr7n7v","filename":"ai.pdf","index":382}],"logprobs":[],"text":"According to the document, an embedding model converts complex data (e.g., words or images) into a dense vector — a list of numbers — called an embedding . Unlike generative models, embedding models do not generate new text or data; instead they produce vector representations that capture semantic and syntactic relationships and can be used as input for other models or NLP tasks ."}} +{"type":"response.output_item.done","sequence_number":92,"output_index":3,"item":{"id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","type":"message","status":"completed","content":[{"type":"output_text","annotations":[{"type":"file_citation","file_id":"file-Ebzhf8H4DPGPr9pUhr7n7v","filename":"ai.pdf","index":154},{"type":"file_citation","file_id":"file-Ebzhf8H4DPGPr9pUhr7n7v","filename":"ai.pdf","index":382}],"logprobs":[],"text":"According to the document, an embedding model converts complex data (e.g., words or images) into a dense vector — a list of numbers — called an embedding . Unlike generative models, embedding models do not generate new text or data; instead they produce vector representations that capture semantic and syntactic relationships and can be used as input for other models or NLP tasks ."}],"role":"assistant"}} +{"type":"response.completed","sequence_number":93,"response":{"id":"resp_0459517ad68504ad0068cabfba22b88192836339640e9a765a","object":"response","created_at":1758117818,"status":"completed","background":false,"error":null,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[{"id":"rs_0459517ad68504ad0068cabfba951881929654a05214361b35","type":"reasoning","summary":[]},{"id":"fs_0459517ad68504ad0068cabfbd76888192a5dc4475fadabf8a","type":"file_search_call","status":"completed","queries":["What is an embedding model according to this document?","What is an embedding model defined as in the document?","definition of embedding model"],"results":null},{"id":"rs_0459517ad68504ad0068cabfbf337881929cf5266be7a008a9","type":"reasoning","summary":[]},{"id":"msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1","type":"message","status":"completed","content":[{"type":"output_text","annotations":[{"type":"file_citation","file_id":"file-Ebzhf8H4DPGPr9pUhr7n7v","filename":"ai.pdf","index":154},{"type":"file_citation","file_id":"file-Ebzhf8H4DPGPr9pUhr7n7v","filename":"ai.pdf","index":382}],"logprobs":[],"text":"According to the document, an embedding model converts complex data (e.g., words or images) into a dense vector — a list of numbers — called an embedding . Unlike generative models, embedding models do not generate new text or data; instead they produce vector representations that capture semantic and syntactic relationships and can be used as input for other models or NLP tasks ."}],"role":"assistant"}],"parallel_tool_calls":true,"previous_response_id":null,"prompt_cache_key":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"file_search","filters":null,"max_num_results":20,"ranking_options":{"ranker":"auto","score_threshold":0},"vector_store_ids":["vs_68caad8bd5d88191ab766cf043d89a18"]}],"top_logprobs":0,"top_p":1,"truncation":"disabled","usage":{"input_tokens":3737,"input_tokens_details":{"cached_tokens":2304},"output_tokens":621,"output_tokens_details":{"reasoning_tokens":512},"total_tokens":4358},"user":null,"metadata":{}}} \ No newline at end of file diff --git a/packages/azure/src/__fixtures__/openai-file-search-tool.1.json b/packages/azure/src/__fixtures__/openai-file-search-tool.1.json new file mode 100644 index 000000000000..26d4b7addb1e --- /dev/null +++ b/packages/azure/src/__fixtures__/openai-file-search-tool.1.json @@ -0,0 +1,89 @@ +{ + "id": "resp_0a098396a8feca410068caae39e7648196b346e99fa8ec494c", + "object": "response", + "created_at": 1758113338, + "status": "completed", + "background": false, + "error": null, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-mini-2025-08-07", + "output": [ + { + "id": "rs_0a098396a8feca410068caae3b47208196957fe59419daad70", + "type": "reasoning", + "summary": [] + }, + { + "id": "fs_0a098396a8feca410068caae3cab5c8196a54fd00498464e62", + "type": "file_search_call", + "status": "completed", + "queries": [ + "What is an embedding model according to this document?", + "What is an embedding model?", + "definition of embedding model in the document", + "embedding model description" + ], + "results": null + }, + { + "id": "rs_0a098396a8feca410068caae3e21a081968e7ac588401c4a6a", + "type": "reasoning", + "summary": [] + }, + { + "id": "msg_0a098396a8feca410068caae457c508196b2fcd079d1d3ec74", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [ + { + "type": "file_citation", + "file_id": "file-Ebzhf8H4DPGPr9pUhr7n7v", + "filename": "ai.pdf", + "index": 438 + } + ], + "logprobs": [], + "text": "According to the document, an embedding model is used to convert complex data (like words or images) into a dense vector (a list of numbers) representation called an embedding, which captures semantic and syntactic relationships. Unlike generative models, embedding models do not generate new text or data; instead, they provide these vector representations to be used as input for other models or other natural language processing tasks ." + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "previous_response_id": null, + "prompt_cache_key": null, + "reasoning": { "effort": "medium", "summary": null }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { "format": { "type": "text" }, "verbosity": "medium" }, + "tool_choice": "auto", + "tools": [ + { + "type": "file_search", + "filters": null, + "max_num_results": 20, + "ranking_options": { "ranker": "auto", "score_threshold": 0 }, + "vector_store_ids": ["vs_68caad8bd5d88191ab766cf043d89a18"] + } + ], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 3700, + "input_tokens_details": { "cached_tokens": 2560 }, + "output_tokens": 741, + "output_tokens_details": { "reasoning_tokens": 640 }, + "total_tokens": 4441 + }, + "user": null, + "metadata": {} +} diff --git a/packages/azure/src/__fixtures__/openai-file-search-tool.2.chunks.txt b/packages/azure/src/__fixtures__/openai-file-search-tool.2.chunks.txt new file mode 100644 index 000000000000..0d5c1ab4f3c4 --- /dev/null +++ b/packages/azure/src/__fixtures__/openai-file-search-tool.2.chunks.txt @@ -0,0 +1,93 @@ +{"type":"response.created","sequence_number":0,"response":{"id":"resp_06456cb9918b63780068cacd710b0881a1b00b5fca56e7100b","object":"response","created_at":1758121329,"status":"in_progress","background":false,"error":null,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[],"parallel_tool_calls":true,"previous_response_id":null,"prompt_cache_key":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"file_search","filters":null,"max_num_results":20,"ranking_options":{"ranker":"auto","score_threshold":0},"vector_store_ids":["vs_68caad8bd5d88191ab766cf043d89a18"]}],"top_logprobs":0,"top_p":1,"truncation":"disabled","usage":null,"user":null,"metadata":{}}} +{"type":"response.in_progress","sequence_number":1,"response":{"id":"resp_06456cb9918b63780068cacd710b0881a1b00b5fca56e7100b","object":"response","created_at":1758121329,"status":"in_progress","background":false,"error":null,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[],"parallel_tool_calls":true,"previous_response_id":null,"prompt_cache_key":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"auto","store":true,"temperature":1,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"file_search","filters":null,"max_num_results":20,"ranking_options":{"ranker":"auto","score_threshold":0},"vector_store_ids":["vs_68caad8bd5d88191ab766cf043d89a18"]}],"top_logprobs":0,"top_p":1,"truncation":"disabled","usage":null,"user":null,"metadata":{}}} +{"type":"response.output_item.added","sequence_number":2,"output_index":0,"item":{"id":"rs_06456cb9918b63780068cacd717c3481a1b8c7094da5770b41","type":"reasoning","summary":[]}} +{"type":"response.output_item.done","sequence_number":3,"output_index":0,"item":{"id":"rs_06456cb9918b63780068cacd717c3481a1b8c7094da5770b41","type":"reasoning","summary":[]}} +{"type":"response.output_item.added","sequence_number":4,"output_index":1,"item":{"id":"fs_06456cb9918b63780068cacd74a1dc81a1bf68dd57f140b4b6","type":"file_search_call","status":"in_progress","queries":[],"results":null}} +{"type":"response.file_search_call.in_progress","sequence_number":5,"output_index":1,"item_id":"fs_06456cb9918b63780068cacd74a1dc81a1bf68dd57f140b4b6"} +{"type":"response.file_search_call.searching","sequence_number":6,"output_index":1,"item_id":"fs_06456cb9918b63780068cacd74a1dc81a1bf68dd57f140b4b6"} +{"type":"response.file_search_call.completed","sequence_number":7,"output_index":1,"item_id":"fs_06456cb9918b63780068cacd74a1dc81a1bf68dd57f140b4b6"} +{"type":"response.output_item.done","sequence_number":8,"output_index":1,"item":{"id":"fs_06456cb9918b63780068cacd74a1dc81a1bf68dd57f140b4b6","type":"file_search_call","status":"completed","queries":["What is an embedding model according to this document?","What is an embedding model definition in this document?","How does the document define an embedding model?"],"results":[{"attributes":{},"file_id":"file-Ebzhf8H4DPGPr9pUhr7n7v","filename":"ai.pdf","score":0.9312,"text":"AI 1\n\nAI\nGenerative artificial intelligence refers to models that predict and generate \nvarious types of outputs (such as text, images, or audio) based on whatʼs \nstatistically likely, pulling from patterns theyʼve learned from their training data. \nFor example:\n\nGiven a photo, a generative model can generate a caption.\n\nGiven an audio file, a generative model can generate a transcription.\n\nGiven a text description, a generative model can generate an image.\n\nA large language model LLM is a subset of generative models focused \nprimarily on text. An LLM takes a sequence of words as input and aims to \npredict the most likely sequence to follow. It assigns probabilities to potential \nnext sequences and then selects one. The model continues to generate \nsequences until it meets a specified stopping criterion.\n\nLLMs learn by training on massive collections of written text, which means they \nwill be better suited to some use cases than others. For example, a model \ntrained on GitHub data would understand the probabilities of sequences in \nsource code particularly well.\n\nHowever, it's crucial to understand LLMs' limitations. When asked about less \nknown or absent information, like the birthday of a personal relative, LLMs \nmight \"hallucinate\" or make up information. It's essential to consider how well-\nrepresented the information you need is in the model.\n\nAn embedding model is used to convert complex data (like words or images) \ninto a dense vector (a list of numbers) representation, known as an embedding. \nUnlike generative models, embedding models do not generate new text or data. \nInstead, they provide representations of semantic and synactic relationships \nbetween entities that can be used as input for other models or other natural \nlanguage processing tasks.\n\nIn the next section, you will learn about the difference between models \nproviders and models, and which ones are available in the AI SDK."}]}} +{"type":"response.output_item.added","sequence_number":9,"output_index":2,"item":{"id":"rs_06456cb9918b63780068cacd7663c481a191dd84333d842728","type":"reasoning","summary":[]}} +{"type":"response.output_item.done","sequence_number":10,"output_index":2,"item":{"id":"rs_06456cb9918b63780068cacd7663c481a191dd84333d842728","type":"reasoning","summary":[]}} +{"type":"response.output_item.added","sequence_number":11,"output_index":3,"item":{"id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","type":"message","status":"in_progress","content":[],"role":"assistant"}} +{"type":"response.content_part.added","sequence_number":12,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"part":{"type":"output_text","annotations":[],"logprobs":[],"text":""}} +{"type":"response.output_text.delta","sequence_number":13,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":"The","logprobs":[],"obfuscation":"yXJ7d69Qa0Xhg"} +{"type":"response.output_text.delta","sequence_number":14,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" document","logprobs":[],"obfuscation":"uRM0Xte"} +{"type":"response.output_text.delta","sequence_number":15,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" defines","logprobs":[],"obfuscation":"gqfYU8Gk"} +{"type":"response.output_text.delta","sequence_number":16,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" an","logprobs":[],"obfuscation":"sIOtpEg2ePgh9"} +{"type":"response.output_text.delta","sequence_number":17,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" embedding","logprobs":[],"obfuscation":"BL6ayz"} +{"type":"response.output_text.delta","sequence_number":18,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" model","logprobs":[],"obfuscation":"cOZxeAdcof"} +{"type":"response.output_text.delta","sequence_number":19,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" as","logprobs":[],"obfuscation":"33u4lzP2RCmBA"} +{"type":"response.output_text.delta","sequence_number":20,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" a","logprobs":[],"obfuscation":"tAdbvxKxU9Jt34"} +{"type":"response.output_text.delta","sequence_number":21,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" tool","logprobs":[],"obfuscation":"ToTXHZ3M1lZ"} +{"type":"response.output_text.delta","sequence_number":22,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" that","logprobs":[],"obfuscation":"yO9zzzFiEnB"} +{"type":"response.output_text.delta","sequence_number":23,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" converts","logprobs":[],"obfuscation":"NIS0KqN"} +{"type":"response.output_text.delta","sequence_number":24,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" complex","logprobs":[],"obfuscation":"8eyFBFah"} +{"type":"response.output_text.delta","sequence_number":25,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" data","logprobs":[],"obfuscation":"MXLSAE7Hciw"} +{"type":"response.output_text.delta","sequence_number":26,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" (","logprobs":[],"obfuscation":"KujSuxv3mVdafv"} +{"type":"response.output_text.delta","sequence_number":27,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":"e","logprobs":[],"obfuscation":"WQiFog0AB5WgHEX"} +{"type":"response.output_text.delta","sequence_number":28,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":".g","logprobs":[],"obfuscation":"EcWbFs0sP9xTCK"} +{"type":"response.output_text.delta","sequence_number":29,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":".,","logprobs":[],"obfuscation":"hyYzGk2OvxhNnC"} +{"type":"response.output_text.delta","sequence_number":30,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" words","logprobs":[],"obfuscation":"wMKwLlAkhz"} +{"type":"response.output_text.delta","sequence_number":31,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" or","logprobs":[],"obfuscation":"YCetLlQLYpljF"} +{"type":"response.output_text.delta","sequence_number":32,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" images","logprobs":[],"obfuscation":"iGIypDuiQ"} +{"type":"response.output_text.delta","sequence_number":33,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":")","logprobs":[],"obfuscation":"rlDCo94jSRrQ0Ku"} +{"type":"response.output_text.delta","sequence_number":34,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" into","logprobs":[],"obfuscation":"hqKnAHBodav"} +{"type":"response.output_text.delta","sequence_number":35,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" a","logprobs":[],"obfuscation":"l7Se5SpBVh2BpH"} +{"type":"response.output_text.delta","sequence_number":36,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" dense","logprobs":[],"obfuscation":"xfttmfQBKD"} +{"type":"response.output_text.delta","sequence_number":37,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" vector","logprobs":[],"obfuscation":"wPnUfyNXf"} +{"type":"response.output_text.delta","sequence_number":38,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" (","logprobs":[],"obfuscation":"5qP6M3c0mgjVkN"} +{"type":"response.output_text.delta","sequence_number":39,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":"a","logprobs":[],"obfuscation":"QaUxc9fnyinuNQ6"} +{"type":"response.output_text.delta","sequence_number":40,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" list","logprobs":[],"obfuscation":"DeEdqnfe944"} +{"type":"response.output_text.delta","sequence_number":41,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" of","logprobs":[],"obfuscation":"Bm7EpLyUCn2AN"} +{"type":"response.output_text.delta","sequence_number":42,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" numbers","logprobs":[],"obfuscation":"IKqcNUbi"} +{"type":"response.output_text.delta","sequence_number":43,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":")","logprobs":[],"obfuscation":"UQTvFE7bChKyFp5"} +{"type":"response.output_text.delta","sequence_number":44,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" called","logprobs":[],"obfuscation":"WTwiUhbHS"} +{"type":"response.output_text.delta","sequence_number":45,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" an","logprobs":[],"obfuscation":"kttPbHSNqmX0y"} +{"type":"response.output_text.delta","sequence_number":46,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" embedding","logprobs":[],"obfuscation":"Moo0yX"} +{"type":"response.output_text.delta","sequence_number":47,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":".","logprobs":[],"obfuscation":"EmvnJ4uA6NZ5ceE"} +{"type":"response.output_text.delta","sequence_number":48,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" Unlike","logprobs":[],"obfuscation":"TIMqttB6l"} +{"type":"response.output_text.delta","sequence_number":49,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" gener","logprobs":[],"obfuscation":"CWGu8UmkPE"} +{"type":"response.output_text.delta","sequence_number":50,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":"ative","logprobs":[],"obfuscation":"fZYGNftnexv"} +{"type":"response.output_text.delta","sequence_number":51,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" models","logprobs":[],"obfuscation":"NhiGZhiO1"} +{"type":"response.output_text.delta","sequence_number":52,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":",","logprobs":[],"obfuscation":"oct7t3SuU2oyXa8"} +{"type":"response.output_text.delta","sequence_number":53,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" embedding","logprobs":[],"obfuscation":"fhrQQu"} +{"type":"response.output_text.delta","sequence_number":54,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" models","logprobs":[],"obfuscation":"newAISHsy"} +{"type":"response.output_text.delta","sequence_number":55,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" don","logprobs":[],"obfuscation":"wgLqz59u8sBH"} +{"type":"response.output_text.delta","sequence_number":56,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":"’t","logprobs":[],"obfuscation":"3apfijLo4kchSy"} +{"type":"response.output_text.delta","sequence_number":57,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" generate","logprobs":[],"obfuscation":"NOB6Rt5"} +{"type":"response.output_text.delta","sequence_number":58,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" new","logprobs":[],"obfuscation":"7PhHJxzKxHAh"} +{"type":"response.output_text.delta","sequence_number":59,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" text","logprobs":[],"obfuscation":"XHE9N4Pci7r"} +{"type":"response.output_text.delta","sequence_number":60,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" or","logprobs":[],"obfuscation":"EdN3SzRu0FHE1"} +{"type":"response.output_text.delta","sequence_number":61,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" data","logprobs":[],"obfuscation":"F8WJ5dJC1le"} +{"type":"response.output_text.delta","sequence_number":62,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":";","logprobs":[],"obfuscation":"VO2swkknSS59gpy"} +{"type":"response.output_text.delta","sequence_number":63,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" they","logprobs":[],"obfuscation":"0dS8z4W1nya"} +{"type":"response.output_text.delta","sequence_number":64,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" provide","logprobs":[],"obfuscation":"zvMkHWTz"} +{"type":"response.output_text.delta","sequence_number":65,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" vector","logprobs":[],"obfuscation":"eLO2EBfHb"} +{"type":"response.output_text.delta","sequence_number":66,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" representations","logprobs":[],"obfuscation":""} +{"type":"response.output_text.delta","sequence_number":67,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" that","logprobs":[],"obfuscation":"U1OjtYxSGzH"} +{"type":"response.output_text.delta","sequence_number":68,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" capture","logprobs":[],"obfuscation":"1WNFLSPy"} +{"type":"response.output_text.delta","sequence_number":69,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" semantic","logprobs":[],"obfuscation":"W94qMwH"} +{"type":"response.output_text.delta","sequence_number":70,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" and","logprobs":[],"obfuscation":"yHXnkXLRkRiJ"} +{"type":"response.output_text.delta","sequence_number":71,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" synt","logprobs":[],"obfuscation":"yba7aRbW35i"} +{"type":"response.output_text.delta","sequence_number":72,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":"actic","logprobs":[],"obfuscation":"fBctDzgyXwp"} +{"type":"response.output_text.delta","sequence_number":73,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" relationships","logprobs":[],"obfuscation":"ij"} +{"type":"response.output_text.delta","sequence_number":74,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" and","logprobs":[],"obfuscation":"IkjQHX8UZAqw"} +{"type":"response.output_text.delta","sequence_number":75,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" can","logprobs":[],"obfuscation":"KeWSf6GIB255"} +{"type":"response.output_text.delta","sequence_number":76,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" be","logprobs":[],"obfuscation":"S9FqWtZQIVLyk"} +{"type":"response.output_text.delta","sequence_number":77,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" used","logprobs":[],"obfuscation":"LCbNtpBZ0e9"} +{"type":"response.output_text.delta","sequence_number":78,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" as","logprobs":[],"obfuscation":"wuOZSH4cQ3noT"} +{"type":"response.output_text.delta","sequence_number":79,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" input","logprobs":[],"obfuscation":"1T7tFOMhrM"} +{"type":"response.output_text.delta","sequence_number":80,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" for","logprobs":[],"obfuscation":"BdCcok8fktXY"} +{"type":"response.output_text.delta","sequence_number":81,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" other","logprobs":[],"obfuscation":"0wdxG2uVZP"} +{"type":"response.output_text.delta","sequence_number":82,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" models","logprobs":[],"obfuscation":"RAUycCDJu"} +{"type":"response.output_text.delta","sequence_number":83,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" or","logprobs":[],"obfuscation":"6iPHFYBL95P3E"} +{"type":"response.output_text.delta","sequence_number":84,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" NLP","logprobs":[],"obfuscation":"GBY2kZCP5O8j"} +{"type":"response.output_text.delta","sequence_number":85,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" tasks","logprobs":[],"obfuscation":"gf7oRS9CDZ"} +{"type":"response.output_text.delta","sequence_number":86,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":" ","logprobs":[],"obfuscation":"TojvmgJPmRBgDD4"} +{"type":"response.output_text.annotation.added","sequence_number":87,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"annotation_index":0,"annotation":{"type":"file_citation","file_id":"file-Ebzhf8H4DPGPr9pUhr7n7v","filename":"ai.pdf","index":379}} +{"type":"response.output_text.delta","sequence_number":88,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"delta":".","logprobs":[],"obfuscation":"UccCBPjfZeqM25q"} +{"type":"response.output_text.done","sequence_number":89,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"text":"The document defines an embedding model as a tool that converts complex data (e.g., words or images) into a dense vector (a list of numbers) called an embedding. Unlike generative models, embedding models don’t generate new text or data; they provide vector representations that capture semantic and syntactic relationships and can be used as input for other models or NLP tasks .","logprobs":[]} +{"type":"response.content_part.done","sequence_number":90,"item_id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","output_index":3,"content_index":0,"part":{"type":"output_text","annotations":[{"type":"file_citation","file_id":"file-Ebzhf8H4DPGPr9pUhr7n7v","filename":"ai.pdf","index":379}],"logprobs":[],"text":"The document defines an embedding model as a tool that converts complex data (e.g., words or images) into a dense vector (a list of numbers) called an embedding. Unlike generative models, embedding models don’t generate new text or data; they provide vector representations that capture semantic and syntactic relationships and can be used as input for other models or NLP tasks ."}} +{"type":"response.output_item.done","sequence_number":91,"output_index":3,"item":{"id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","type":"message","status":"completed","content":[{"type":"output_text","annotations":[{"type":"file_citation","file_id":"file-Ebzhf8H4DPGPr9pUhr7n7v","filename":"ai.pdf","index":379}],"logprobs":[],"text":"The document defines an embedding model as a tool that converts complex data (e.g., words or images) into a dense vector (a list of numbers) called an embedding. Unlike generative models, embedding models don’t generate new text or data; they provide vector representations that capture semantic and syntactic relationships and can be used as input for other models or NLP tasks ."}],"role":"assistant"}} +{"type":"response.completed","sequence_number":92,"response":{"id":"resp_06456cb9918b63780068cacd710b0881a1b00b5fca56e7100b","object":"response","created_at":1758121329,"status":"completed","background":false,"error":null,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-5-mini-2025-08-07","output":[{"id":"rs_06456cb9918b63780068cacd717c3481a1b8c7094da5770b41","type":"reasoning","summary":[]},{"id":"fs_06456cb9918b63780068cacd74a1dc81a1bf68dd57f140b4b6","type":"file_search_call","status":"completed","queries":["What is an embedding model according to this document?","What is an embedding model definition in this document?","How does the document define an embedding model?"],"results":[{"attributes":{},"file_id":"file-Ebzhf8H4DPGPr9pUhr7n7v","filename":"ai.pdf","score":0.9312,"text":"AI 1\n\nAI\nGenerative artificial intelligence refers to models that predict and generate \nvarious types of outputs (such as text, images, or audio) based on whatʼs \nstatistically likely, pulling from patterns theyʼve learned from their training data. \nFor example:\n\nGiven a photo, a generative model can generate a caption.\n\nGiven an audio file, a generative model can generate a transcription.\n\nGiven a text description, a generative model can generate an image.\n\nA large language model LLM is a subset of generative models focused \nprimarily on text. An LLM takes a sequence of words as input and aims to \npredict the most likely sequence to follow. It assigns probabilities to potential \nnext sequences and then selects one. The model continues to generate \nsequences until it meets a specified stopping criterion.\n\nLLMs learn by training on massive collections of written text, which means they \nwill be better suited to some use cases than others. For example, a model \ntrained on GitHub data would understand the probabilities of sequences in \nsource code particularly well.\n\nHowever, it's crucial to understand LLMs' limitations. When asked about less \nknown or absent information, like the birthday of a personal relative, LLMs \nmight \"hallucinate\" or make up information. It's essential to consider how well-\nrepresented the information you need is in the model.\n\nAn embedding model is used to convert complex data (like words or images) \ninto a dense vector (a list of numbers) representation, known as an embedding. \nUnlike generative models, embedding models do not generate new text or data. \nInstead, they provide representations of semantic and synactic relationships \nbetween entities that can be used as input for other models or other natural \nlanguage processing tasks.\n\nIn the next section, you will learn about the difference between models \nproviders and models, and which ones are available in the AI SDK."}]},{"id":"rs_06456cb9918b63780068cacd7663c481a191dd84333d842728","type":"reasoning","summary":[]},{"id":"msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f","type":"message","status":"completed","content":[{"type":"output_text","annotations":[{"type":"file_citation","file_id":"file-Ebzhf8H4DPGPr9pUhr7n7v","filename":"ai.pdf","index":379}],"logprobs":[],"text":"The document defines an embedding model as a tool that converts complex data (e.g., words or images) into a dense vector (a list of numbers) called an embedding. Unlike generative models, embedding models don’t generate new text or data; they provide vector representations that capture semantic and syntactic relationships and can be used as input for other models or NLP tasks ."}],"role":"assistant"}],"parallel_tool_calls":true,"previous_response_id":null,"prompt_cache_key":null,"reasoning":{"effort":"medium","summary":null},"safety_identifier":null,"service_tier":"default","store":true,"temperature":1,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[{"type":"file_search","filters":null,"max_num_results":20,"ranking_options":{"ranker":"auto","score_threshold":0},"vector_store_ids":["vs_68caad8bd5d88191ab766cf043d89a18"]}],"top_logprobs":0,"top_p":1,"truncation":"disabled","usage":{"input_tokens":3748,"input_tokens_details":{"cached_tokens":2304},"output_tokens":543,"output_tokens_details":{"reasoning_tokens":448},"total_tokens":4291},"user":null,"metadata":{}}} \ No newline at end of file diff --git a/packages/azure/src/__fixtures__/openai-file-search-tool.2.json b/packages/azure/src/__fixtures__/openai-file-search-tool.2.json new file mode 100644 index 000000000000..3a28b1fc87be --- /dev/null +++ b/packages/azure/src/__fixtures__/openai-file-search-tool.2.json @@ -0,0 +1,112 @@ +{ + "id": "resp_0365d26c32c64c650068cabb02fea4819495862c2bc58440ad", + "object": "response", + "created_at": 1758116611, + "status": "completed", + "background": false, + "error": null, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-mini-2025-08-07", + "output": [ + { + "id": "rs_0365d26c32c64c650068cabb03bcc48194bfbd973152bca8f6", + "type": "reasoning", + "summary": [] + }, + { + "id": "fs_0365d26c32c64c650068cabb04aa388194b53c59de50a3951e", + "type": "file_search_call", + "status": "completed", + "queries": [ + "What is an embedding model according to this document?", + "What is an embedding model in the document?", + "definition of embedding model", + "embedding model explanation 'embedding model'" + ], + "results": [ + { + "attributes": {}, + "file_id": "file-Ebzhf8H4DPGPr9pUhr7n7v", + "filename": "ai.pdf", + "score": 0.9311, + "text": "AI 1\n\nAI\nGenerative artificial intelligence refers to models that predict and generate \nvarious types of outputs (such as text, images, or audio) based on whatʼs \nstatistically likely, pulling from patterns theyʼve learned from their training data. \nFor example:\n\nGiven a photo, a generative model can generate a caption.\n\nGiven an audio file, a generative model can generate a transcription.\n\nGiven a text description, a generative model can generate an image.\n\nA large language model LLM is a subset of generative models focused \nprimarily on text. An LLM takes a sequence of words as input and aims to \npredict the most likely sequence to follow. It assigns probabilities to potential \nnext sequences and then selects one. The model continues to generate \nsequences until it meets a specified stopping criterion.\n\nLLMs learn by training on massive collections of written text, which means they \nwill be better suited to some use cases than others. For example, a model \ntrained on GitHub data would understand the probabilities of sequences in \nsource code particularly well.\n\nHowever, it's crucial to understand LLMs' limitations. When asked about less \nknown or absent information, like the birthday of a personal relative, LLMs \nmight \"hallucinate\" or make up information. It's essential to consider how well-\nrepresented the information you need is in the model.\n\nAn embedding model is used to convert complex data (like words or images) \ninto a dense vector (a list of numbers) representation, known as an embedding. \nUnlike generative models, embedding models do not generate new text or data. \nInstead, they provide representations of semantic and synactic relationships \nbetween entities that can be used as input for other models or other natural \nlanguage processing tasks.\n\nIn the next section, you will learn about the difference between models \nproviders and models, and which ones are available in the AI SDK." + } + ] + }, + { + "id": "rs_0365d26c32c64c650068cabb061740819491324d349d0f07ca", + "type": "reasoning", + "summary": [] + }, + { + "id": "msg_0365d26c32c64c650068cabb0e66b081949f66f61dacef39f3", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [ + { + "type": "file_citation", + "file_id": "file-Ebzhf8H4DPGPr9pUhr7n7v", + "filename": "ai.pdf", + "index": 350 + } + ], + "logprobs": [], + "text": "According to the document, an embedding model converts complex data (like words or images) into a dense vector — a list of numbers — called an embedding. It does not generate new text or data; instead it encodes semantic and syntactic relationships between entities so those vector representations can be used as inputs for other models or NLP tasks ." + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "previous_response_id": null, + "prompt_cache_key": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "text" + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [ + { + "type": "file_search", + "filters": null, + "max_num_results": 20, + "ranking_options": { + "ranker": "auto", + "score_threshold": 0 + }, + "vector_store_ids": ["vs_68caad8bd5d88191ab766cf043d89a18"] + } + ], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 3678, + "input_tokens_details": { + "cached_tokens": 2304 + }, + "output_tokens": 536, + "output_tokens_details": { + "reasoning_tokens": 448 + }, + "total_tokens": 4214 + }, + "user": null, + "metadata": {} +} diff --git a/packages/azure/src/__fixtures__/openai-image-generation-tool.1.json b/packages/azure/src/__fixtures__/openai-image-generation-tool.1.json new file mode 100644 index 000000000000..52e9ff9f7a90 --- /dev/null +++ b/packages/azure/src/__fixtures__/openai-image-generation-tool.1.json @@ -0,0 +1,96 @@ +{ + "id": "resp_0a33d15155cb126d0068c96c54970481958484dea31f07926d", + "object": "response", + "created_at": 1758030932, + "status": "completed", + "background": false, + "error": null, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [ + { + "id": "rs_0a33d15155cb126d0068c96c5527808195a933b468ccb5dfd9", + "type": "reasoning", + "summary": [] + }, + { + "id": "ig_0a33d15155cb126d0068c96c59bc14819599154c9988b82996", + "type": "image_generation_call", + "status": "completed", + "background": "opaque", + "output_format": "webp", + "quality": "low", + "result": "UklGRoitEQBXRUJQVlA4TEGzEAAv/8P/AM1AbNtGkITZhU4fH9J/wTOT+xIi+j8BuT4kABkCibNAZrlwIPyQ7W/bH5L2RHMzMBKgXmfZeYi9tLtrrQkZvN1yXHLLgG71gPkpDxmI/gc03YFulQR...AA9lhA0Y9rVdqQs/W4w/MOxeRW5+R1/UXmmNVi9yQ7x/vG0q2VRk01seZIuj5OmRYhD+yY82dZqMH1BCueTeOcNfGKxQ==", + "revised_prompt": "A cute fluffy cat sitting on a sunlit windowsill, warm sunlight, soft fur, expressive eyes, photorealistic style.", + "size": "1024x1024" + }, + { + "id": "rs_0a33d15155cb126d0068c96c6c0ef48195bc73e30faf832ba3", + "type": "reasoning", + "summary": [] + }, + { + "id": "msg_0a33d15155cb126d0068c96c723ed88195b1405bc370bb8a65", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "" + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "previous_response_id": null, + "prompt_cache_key": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "text" + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [ + { + "type": "image_generation", + "background": "auto", + "moderation": "auto", + "n": 1, + "output_compression": 100, + "output_format": "webp", + "quality": "low", + "size": "1024x1024" + } + ], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 3151, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 1970, + "output_tokens_details": { + "reasoning_tokens": 1920 + }, + "total_tokens": 5121 + }, + "user": null, + "metadata": {} +} diff --git a/packages/azure/src/__snapshots__/azure-openai-provider.test.ts.snap b/packages/azure/src/__snapshots__/azure-openai-provider.test.ts.snap new file mode 100644 index 000000000000..ce1bbb95dd01 --- /dev/null +++ b/packages/azure/src/__snapshots__/azure-openai-provider.test.ts.snap @@ -0,0 +1,3098 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`responses > doGenerate > code interpreter tool > should include code interpreter tool call and result in content 1`] = ` +[ + { + "providerMetadata": { + "openai": { + "itemId": "rs_02ffbc38ae6fca1a0068ec8762f61881979bf5191564930c23", + "reasoningEncryptedContent": null, + }, + }, + "text": "", + "type": "reasoning", + }, + { + "input": "{"code":"import random\\n\\n# Generate five random numbers between 1 and 100 with two decimal places\\nnumbers = [round(random.uniform(1, 100), 2) for _ in range(5)]\\n\\n# Print the program and its execution results\\nprint(\\"Program: Generate five random numbers between 1 and 100 with two decimal places\\")\\nprint(\\"Generated numbers:\\")\\nfor i, num in enumerate(numbers, start=1):\\n print(f\\"{i}: {num:.2f}\\")","containerId":"cntr_68ec87613e58819097ec47888dc686d8088a1d37157e7565"}", + "providerExecuted": true, + "toolCallId": "ci_02ffbc38ae6fca1a0068ec876654a08197af4d648fe8bba210", + "toolName": "code_interpreter", + "type": "tool-call", + }, + { + "providerExecuted": true, + "result": { + "outputs": [ + { + "logs": "Program: Generate five random numbers between 1 and 100 with two decimal places +Generated numbers: +1: 74.07 +2: 94.14 +3: 53.74 +4: 77.29 +5: 87.68 +", + "type": "logs", + }, + ], + }, + "toolCallId": "ci_02ffbc38ae6fca1a0068ec876654a08197af4d648fe8bba210", + "toolName": "code_interpreter", + "type": "tool-result", + }, + { + "providerMetadata": { + "openai": { + "itemId": "msg_02ffbc38ae6fca1a0068ec8768f35c81979428e19fa11468f1", + }, + }, + "text": "I ran the program and produced five random numbers between 1 and 100 with two decimal places. Results shown above: + +1: 74.07 +2: 94.14 +3: 53.74 +4: 77.29 +5: 87.68 + +If you want the code to be saved to a file, run multiple sets, or use a fixed seed for reproducible results, tell me and I can adjust.", + "type": "text", + }, +] +`; + +exports[`responses > doGenerate > file search tool > with results include > should include file search tool call and result in content 1`] = ` +[ + { + "providerMetadata": { + "openai": { + "itemId": "rs_0365d26c32c64c650068cabb03bcc48194bfbd973152bca8f6", + "reasoningEncryptedContent": null, + }, + }, + "text": "", + "type": "reasoning", + }, + { + "input": "{}", + "providerExecuted": true, + "toolCallId": "fs_0365d26c32c64c650068cabb04aa388194b53c59de50a3951e", + "toolName": "file_search", + "type": "tool-call", + }, + { + "providerExecuted": true, + "result": { + "queries": [ + "What is an embedding model according to this document?", + "What is an embedding model in the document?", + "definition of embedding model", + "embedding model explanation 'embedding model'", + ], + "results": [ + { + "attributes": {}, + "fileId": "file-Ebzhf8H4DPGPr9pUhr7n7v", + "filename": "ai.pdf", + "score": 0.9311, + "text": "AI 1 + +AI +Generative artificial intelligence refers to models that predict and generate +various types of outputs (such as text, images, or audio) based on whatʼs +statistically likely, pulling from patterns theyʼve learned from their training data. +For example: + +Given a photo, a generative model can generate a caption. + +Given an audio file, a generative model can generate a transcription. + +Given a text description, a generative model can generate an image. + +A large language model LLM is a subset of generative models focused +primarily on text. An LLM takes a sequence of words as input and aims to +predict the most likely sequence to follow. It assigns probabilities to potential +next sequences and then selects one. The model continues to generate +sequences until it meets a specified stopping criterion. + +LLMs learn by training on massive collections of written text, which means they +will be better suited to some use cases than others. For example, a model +trained on GitHub data would understand the probabilities of sequences in +source code particularly well. + +However, it's crucial to understand LLMs' limitations. When asked about less +known or absent information, like the birthday of a personal relative, LLMs +might "hallucinate" or make up information. It's essential to consider how well- +represented the information you need is in the model. + +An embedding model is used to convert complex data (like words or images) +into a dense vector (a list of numbers) representation, known as an embedding. +Unlike generative models, embedding models do not generate new text or data. +Instead, they provide representations of semantic and synactic relationships +between entities that can be used as input for other models or other natural +language processing tasks. + +In the next section, you will learn about the difference between models +providers and models, and which ones are available in the AI SDK.", + }, + ], + }, + "toolCallId": "fs_0365d26c32c64c650068cabb04aa388194b53c59de50a3951e", + "toolName": "file_search", + "type": "tool-result", + }, + { + "providerMetadata": { + "openai": { + "itemId": "rs_0365d26c32c64c650068cabb061740819491324d349d0f07ca", + "reasoningEncryptedContent": null, + }, + }, + "text": "", + "type": "reasoning", + }, + { + "providerMetadata": { + "openai": { + "itemId": "msg_0365d26c32c64c650068cabb0e66b081949f66f61dacef39f3", + }, + }, + "text": "According to the document, an embedding model converts complex data (like words or images) into a dense vector — a list of numbers — called an embedding. It does not generate new text or data; instead it encodes semantic and syntactic relationships between entities so those vector representations can be used as inputs for other models or NLP tasks .", + "type": "text", + }, + { + "filename": "ai.pdf", + "id": "id-0", + "mediaType": "text/plain", + "providerMetadata": { + "openai": { + "fileId": "file-Ebzhf8H4DPGPr9pUhr7n7v", + }, + }, + "sourceType": "document", + "title": "ai.pdf", + "type": "source", + }, +] +`; + +exports[`responses > doGenerate > file search tool > without results include > should include file search tool call and result in content 1`] = ` +[ + { + "providerMetadata": { + "openai": { + "itemId": "rs_0a098396a8feca410068caae3b47208196957fe59419daad70", + "reasoningEncryptedContent": null, + }, + }, + "text": "", + "type": "reasoning", + }, + { + "input": "{}", + "providerExecuted": true, + "toolCallId": "fs_0a098396a8feca410068caae3cab5c8196a54fd00498464e62", + "toolName": "file_search", + "type": "tool-call", + }, + { + "providerExecuted": true, + "result": { + "queries": [ + "What is an embedding model according to this document?", + "What is an embedding model?", + "definition of embedding model in the document", + "embedding model description", + ], + "results": null, + }, + "toolCallId": "fs_0a098396a8feca410068caae3cab5c8196a54fd00498464e62", + "toolName": "file_search", + "type": "tool-result", + }, + { + "providerMetadata": { + "openai": { + "itemId": "rs_0a098396a8feca410068caae3e21a081968e7ac588401c4a6a", + "reasoningEncryptedContent": null, + }, + }, + "text": "", + "type": "reasoning", + }, + { + "providerMetadata": { + "openai": { + "itemId": "msg_0a098396a8feca410068caae457c508196b2fcd079d1d3ec74", + }, + }, + "text": "According to the document, an embedding model is used to convert complex data (like words or images) into a dense vector (a list of numbers) representation called an embedding, which captures semantic and syntactic relationships. Unlike generative models, embedding models do not generate new text or data; instead, they provide these vector representations to be used as input for other models or other natural language processing tasks .", + "type": "text", + }, + { + "filename": "ai.pdf", + "id": "id-0", + "mediaType": "text/plain", + "providerMetadata": { + "openai": { + "fileId": "file-Ebzhf8H4DPGPr9pUhr7n7v", + }, + }, + "sourceType": "document", + "title": "ai.pdf", + "type": "source", + }, +] +`; + +exports[`responses > doStream > should send code interpreter calls 1`] = ` +[ + { + "type": "stream-start", + "warnings": [], + }, + { + "id": "resp_0ad69c3c5fcb01f60068eba78cacd08193bf9a57724aa55ab8", + "modelId": "gpt-5-mini", + "timestamp": 2025-10-12T13:05:16.000Z, + "type": "response-metadata", + }, + { + "id": "rs_0ad69c3c5fcb01f60068eba78f12588193872253fcce2ef954:0", + "providerMetadata": { + "openai": { + "itemId": "rs_0ad69c3c5fcb01f60068eba78f12588193872253fcce2ef954", + "reasoningEncryptedContent": null, + }, + }, + "type": "reasoning-start", + }, + { + "id": "rs_0ad69c3c5fcb01f60068eba78f12588193872253fcce2ef954:0", + "providerMetadata": { + "openai": { + "itemId": "rs_0ad69c3c5fcb01f60068eba78f12588193872253fcce2ef954", + "reasoningEncryptedContent": null, + }, + }, + "type": "reasoning-end", + }, + { + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "providerExecuted": true, + "toolName": "code_interpreter", + "type": "tool-input-start", + }, + { + "delta": "{"containerId":"cntr_68eba78d6dc081908116b7ad7a32f52d0050b146e60e47a9","code":"", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "#", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " Program", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": ":", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " generate", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " five", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " random", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " numbers", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " between", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " ", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "1", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " and", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " ", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "100", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " with", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " two", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " decimal", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " places", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "\\n", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "import", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " random", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "\\n\\n", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "#", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " Generate", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " five", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " random", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " numbers", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " and", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " round", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " to", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " two", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " decimals", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "\\n", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "numbers", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " =", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " [", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "round", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "(random", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": ".uniform", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "(", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "1", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": ",", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " ", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "100", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "),", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " ", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "2", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": ")", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " for", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " _", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " in", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " range", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "(", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "5", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": ")]\\n\\n", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "#", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " Print", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " the", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " list", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " and", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " a", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " nicely", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " formatted", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " string", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "\\n", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "print", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "(\\"", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "Generated", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " numbers", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " (", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "as", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " floats", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "):", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "\\",", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " numbers", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": ")\\n", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "print", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "(\\"", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "Generated", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " numbers", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " (", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "formatted", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " to", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " ", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "2", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " decimal", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " places", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "):", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "\\",", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " \\",", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " \\".", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "join", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "(f", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "\\"{", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "n", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": ":.", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "2", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "f", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "}\\"", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " for", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " n", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " in", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": " numbers", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": "))", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "delta": ""}", + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-delta", + }, + { + "id": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "type": "tool-input-end", + }, + { + "input": "{"code":"# Program: generate five random numbers between 1 and 100 with two decimal places\\nimport random\\n\\n# Generate five random numbers and round to two decimals\\nnumbers = [round(random.uniform(1, 100), 2) for _ in range(5)]\\n\\n# Print the list and a nicely formatted string\\nprint(\\"Generated numbers (as floats):\\", numbers)\\nprint(\\"Generated numbers (formatted to 2 decimal places):\\", \\", \\".join(f\\"{n:.2f}\\" for n in numbers))","containerId":"cntr_68eba78d6dc081908116b7ad7a32f52d0050b146e60e47a9"}", + "providerExecuted": true, + "toolCallId": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "toolName": "code_interpreter", + "type": "tool-call", + }, + { + "providerExecuted": true, + "result": { + "outputs": [ + { + "logs": "Generated numbers (as floats): [88.99, 51.21, 89.85, 88.97, 7.73] +Generated numbers (formatted to 2 decimal places): 88.99, 51.21, 89.85, 88.97, 7.73 +", + "type": "logs", + }, + ], + }, + "toolCallId": "ci_0ad69c3c5fcb01f60068eba7939b2c8193b42d4d517ca5d25f", + "toolName": "code_interpreter", + "type": "tool-result", + }, + { + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "providerMetadata": { + "openai": { + "itemId": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + }, + }, + "type": "text-start", + }, + { + "delta": "Here's", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " a", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " simple", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " Python", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " program", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " that", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " generates", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " five", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " random", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " numbers", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " between", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " ", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "1", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " and", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " ", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "100", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " with", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " two", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " decimal", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " places", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ",", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " and", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " the", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " execution", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " result", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " from", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " running", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " it", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ". + +", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "Program", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ": +", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "\`\`\`", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "python", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " +", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "import", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " random", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " + +", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "#", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " Generate", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " five", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " random", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " numbers", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " and", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " round", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " to", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " two", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " decimals", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " +", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "numbers", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " =", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " [", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "round", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "(random", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ".uniform", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "(", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "1", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ",", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " ", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "100", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "),", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " ", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "2", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ")", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " for", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " _", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " in", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " range", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "(", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "5", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ")] + +", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "#", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " Print", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " the", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " list", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " and", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " a", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " nicely", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " formatted", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " string", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " +", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "print", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "("", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "Generated", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " numbers", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " (", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "as", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " floats", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "):", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "",", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " numbers", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ") +", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "print", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "("", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "Generated", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " numbers", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " (", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "formatted", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " to", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " ", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "2", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " decimal", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " places", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "):", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "",", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " ",", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " ".", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "join", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "(f", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ""{", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "n", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ":.", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "2", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "f", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "}"", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " for", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " n", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " in", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " numbers", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ")) +", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "\`\`", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "\` + +", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "Execution", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " result", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " (", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "from", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " this", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " run", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "): +", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "Generated", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " numbers", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " (", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "as", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " floats", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "):", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " [", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "88", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ".", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "99", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ",", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " ", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "51", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ".", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "21", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ",", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " ", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "89", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ".", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "85", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ",", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " ", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "88", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ".", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "97", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ",", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " ", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "7", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ".", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "73", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "] +", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "Generated", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " numbers", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " (", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "formatted", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " to", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " ", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "2", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " decimal", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " places", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "):", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " ", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "88", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ".", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "99", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ",", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " ", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "51", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ".", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "21", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ",", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " ", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "89", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ".", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "85", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ",", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " ", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "88", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ".", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "97", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ",", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " ", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "7", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ".", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "73", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " + +", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "If", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " you", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " want", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " a", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " reproduc", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "ible", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " result", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ",", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " I", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " can", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " add", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " a", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " fixed", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " random", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " seed", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " or", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " save", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " the", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " program", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " to", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " a", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " file", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " for", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " you", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": ".", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " Want", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": " that", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "delta": "?", + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-delta", + }, + { + "id": "msg_0ad69c3c5fcb01f60068eba7956c948193be6ab573376051d6", + "type": "text-end", + }, + { + "error": [AI_JSONParseError: JSON parsing failed: Text: . +Error message: Unexpected end of JSON input], + "type": "error", + }, + { + "finishReason": "error", + "providerMetadata": { + "openai": { + "responseId": "resp_0ad69c3c5fcb01f60068eba78cacd08193bf9a57724aa55ab8", + "serviceTier": "default", + }, + }, + "type": "finish", + "usage": { + "cachedInputTokens": 1280, + "inputTokens": 2143, + "outputTokens": 919, + "reasoningTokens": 576, + "totalTokens": 3062, + }, + }, +] +`; + +exports[`responses > file search tool > should stream file search results with results include 1`] = ` +[ + { + "type": "stream-start", + "warnings": [], + }, + { + "id": "resp_06456cb9918b63780068cacd710b0881a1b00b5fca56e7100b", + "modelId": "gpt-5-mini-2025-08-07", + "timestamp": 2025-09-17T15:02:09.000Z, + "type": "response-metadata", + }, + { + "id": "rs_06456cb9918b63780068cacd717c3481a1b8c7094da5770b41:0", + "providerMetadata": { + "openai": { + "itemId": "rs_06456cb9918b63780068cacd717c3481a1b8c7094da5770b41", + "reasoningEncryptedContent": null, + }, + }, + "type": "reasoning-start", + }, + { + "id": "rs_06456cb9918b63780068cacd717c3481a1b8c7094da5770b41:0", + "providerMetadata": { + "openai": { + "itemId": "rs_06456cb9918b63780068cacd717c3481a1b8c7094da5770b41", + "reasoningEncryptedContent": null, + }, + }, + "type": "reasoning-end", + }, + { + "input": "{}", + "providerExecuted": true, + "toolCallId": "fs_06456cb9918b63780068cacd74a1dc81a1bf68dd57f140b4b6", + "toolName": "file_search", + "type": "tool-call", + }, + { + "providerExecuted": true, + "result": { + "queries": [ + "What is an embedding model according to this document?", + "What is an embedding model definition in this document?", + "How does the document define an embedding model?", + ], + "results": [ + { + "attributes": {}, + "fileId": "file-Ebzhf8H4DPGPr9pUhr7n7v", + "filename": "ai.pdf", + "score": 0.9312, + "text": "AI 1 + +AI +Generative artificial intelligence refers to models that predict and generate +various types of outputs (such as text, images, or audio) based on whatʼs +statistically likely, pulling from patterns theyʼve learned from their training data. +For example: + +Given a photo, a generative model can generate a caption. + +Given an audio file, a generative model can generate a transcription. + +Given a text description, a generative model can generate an image. + +A large language model LLM is a subset of generative models focused +primarily on text. An LLM takes a sequence of words as input and aims to +predict the most likely sequence to follow. It assigns probabilities to potential +next sequences and then selects one. The model continues to generate +sequences until it meets a specified stopping criterion. + +LLMs learn by training on massive collections of written text, which means they +will be better suited to some use cases than others. For example, a model +trained on GitHub data would understand the probabilities of sequences in +source code particularly well. + +However, it's crucial to understand LLMs' limitations. When asked about less +known or absent information, like the birthday of a personal relative, LLMs +might "hallucinate" or make up information. It's essential to consider how well- +represented the information you need is in the model. + +An embedding model is used to convert complex data (like words or images) +into a dense vector (a list of numbers) representation, known as an embedding. +Unlike generative models, embedding models do not generate new text or data. +Instead, they provide representations of semantic and synactic relationships +between entities that can be used as input for other models or other natural +language processing tasks. + +In the next section, you will learn about the difference between models +providers and models, and which ones are available in the AI SDK.", + }, + ], + }, + "toolCallId": "fs_06456cb9918b63780068cacd74a1dc81a1bf68dd57f140b4b6", + "toolName": "file_search", + "type": "tool-result", + }, + { + "id": "rs_06456cb9918b63780068cacd7663c481a191dd84333d842728:0", + "providerMetadata": { + "openai": { + "itemId": "rs_06456cb9918b63780068cacd7663c481a191dd84333d842728", + "reasoningEncryptedContent": null, + }, + }, + "type": "reasoning-start", + }, + { + "id": "rs_06456cb9918b63780068cacd7663c481a191dd84333d842728:0", + "providerMetadata": { + "openai": { + "itemId": "rs_06456cb9918b63780068cacd7663c481a191dd84333d842728", + "reasoningEncryptedContent": null, + }, + }, + "type": "reasoning-end", + }, + { + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "providerMetadata": { + "openai": { + "itemId": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + }, + }, + "type": "text-start", + }, + { + "delta": "The", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " document", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " defines", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " an", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " embedding", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " model", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " as", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " a", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " tool", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " that", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " converts", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " complex", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " data", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " (", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": "e", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": ".g", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": ".,", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " words", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " or", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " images", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": ")", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " into", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " a", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " dense", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " vector", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " (", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": "a", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " list", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " of", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " numbers", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": ")", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " called", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " an", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " embedding", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": ".", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " Unlike", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " gener", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": "ative", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " models", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": ",", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " embedding", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " models", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " don", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": "’t", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " generate", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " new", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " text", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " or", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " data", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": ";", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " they", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " provide", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " vector", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " representations", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " that", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " capture", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " semantic", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " and", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " synt", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": "actic", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " relationships", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " and", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " can", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " be", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " used", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " as", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " input", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " for", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " other", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " models", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " or", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " NLP", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " tasks", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "delta": " ", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "filename": "ai.pdf", + "id": "id-0", + "mediaType": "text/plain", + "providerMetadata": { + "openai": { + "fileId": "file-Ebzhf8H4DPGPr9pUhr7n7v", + }, + }, + "sourceType": "document", + "title": "ai.pdf", + "type": "source", + }, + { + "delta": ".", + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-delta", + }, + { + "id": "msg_06456cb9918b63780068cacd7c922081a1ae15f2672a51980f", + "type": "text-end", + }, + { + "finishReason": "stop", + "providerMetadata": { + "openai": { + "responseId": "resp_06456cb9918b63780068cacd710b0881a1b00b5fca56e7100b", + "serviceTier": "default", + }, + }, + "type": "finish", + "usage": { + "cachedInputTokens": 2304, + "inputTokens": 3748, + "outputTokens": 543, + "reasoningTokens": 448, + "totalTokens": 4291, + }, + }, +] +`; + +exports[`responses > file search tool > should stream file search results without results include 1`] = ` +[ + { + "type": "stream-start", + "warnings": [], + }, + { + "id": "resp_0459517ad68504ad0068cabfba22b88192836339640e9a765a", + "modelId": "gpt-5-mini-2025-08-07", + "timestamp": 2025-09-17T14:03:38.000Z, + "type": "response-metadata", + }, + { + "id": "rs_0459517ad68504ad0068cabfba951881929654a05214361b35:0", + "providerMetadata": { + "openai": { + "itemId": "rs_0459517ad68504ad0068cabfba951881929654a05214361b35", + "reasoningEncryptedContent": null, + }, + }, + "type": "reasoning-start", + }, + { + "id": "rs_0459517ad68504ad0068cabfba951881929654a05214361b35:0", + "providerMetadata": { + "openai": { + "itemId": "rs_0459517ad68504ad0068cabfba951881929654a05214361b35", + "reasoningEncryptedContent": null, + }, + }, + "type": "reasoning-end", + }, + { + "input": "{}", + "providerExecuted": true, + "toolCallId": "fs_0459517ad68504ad0068cabfbd76888192a5dc4475fadabf8a", + "toolName": "file_search", + "type": "tool-call", + }, + { + "providerExecuted": true, + "result": { + "queries": [ + "What is an embedding model according to this document?", + "What is an embedding model defined as in the document?", + "definition of embedding model", + ], + "results": null, + }, + "toolCallId": "fs_0459517ad68504ad0068cabfbd76888192a5dc4475fadabf8a", + "toolName": "file_search", + "type": "tool-result", + }, + { + "id": "rs_0459517ad68504ad0068cabfbf337881929cf5266be7a008a9:0", + "providerMetadata": { + "openai": { + "itemId": "rs_0459517ad68504ad0068cabfbf337881929cf5266be7a008a9", + "reasoningEncryptedContent": null, + }, + }, + "type": "reasoning-start", + }, + { + "id": "rs_0459517ad68504ad0068cabfbf337881929cf5266be7a008a9:0", + "providerMetadata": { + "openai": { + "itemId": "rs_0459517ad68504ad0068cabfbf337881929cf5266be7a008a9", + "reasoningEncryptedContent": null, + }, + }, + "type": "reasoning-end", + }, + { + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "providerMetadata": { + "openai": { + "itemId": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + }, + }, + "type": "text-start", + }, + { + "delta": "According", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " to", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " the", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " document", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": ",", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " an", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " embedding", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " model", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " converts", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " complex", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " data", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " (", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": "e", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": ".g", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": ".,", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " words", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " or", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " images", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": ")", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " into", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " a", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " dense", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " vector", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " —", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " a", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " list", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " of", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " numbers", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " —", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " called", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " an", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " embedding", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " ", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "filename": "ai.pdf", + "id": "id-0", + "mediaType": "text/plain", + "providerMetadata": { + "openai": { + "fileId": "file-Ebzhf8H4DPGPr9pUhr7n7v", + }, + }, + "sourceType": "document", + "title": "ai.pdf", + "type": "source", + }, + { + "delta": ".", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " Unlike", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " gener", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": "ative", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " models", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": ",", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " embedding", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " models", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " do", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " not", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " generate", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " new", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " text", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " or", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " data", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": ";", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " instead", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " they", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " produce", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " vector", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " representations", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " that", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " capture", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " semantic", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " and", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " synt", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": "actic", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " relationships", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " and", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " can", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " be", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " used", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " as", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " input", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " for", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " other", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " models", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " or", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " NLP", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " tasks", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "delta": " ", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "filename": "ai.pdf", + "id": "id-1", + "mediaType": "text/plain", + "providerMetadata": { + "openai": { + "fileId": "file-Ebzhf8H4DPGPr9pUhr7n7v", + }, + }, + "sourceType": "document", + "title": "ai.pdf", + "type": "source", + }, + { + "delta": ".", + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-delta", + }, + { + "id": "msg_0459517ad68504ad0068cabfc6b5c48192a15ac773668537f1", + "type": "text-end", + }, + { + "finishReason": "stop", + "providerMetadata": { + "openai": { + "responseId": "resp_0459517ad68504ad0068cabfba22b88192836339640e9a765a", + "serviceTier": "default", + }, + }, + "type": "finish", + "usage": { + "cachedInputTokens": 2304, + "inputTokens": 3737, + "outputTokens": 621, + "reasoningTokens": 512, + "totalTokens": 4358, + }, + }, +] +`; + +exports[`responses > image generation tool > should include generate image tool call and result in content 1`] = ` +[ + { + "providerMetadata": { + "openai": { + "itemId": "rs_0a33d15155cb126d0068c96c5527808195a933b468ccb5dfd9", + "reasoningEncryptedContent": null, + }, + }, + "text": "", + "type": "reasoning", + }, + { + "input": "{}", + "providerExecuted": true, + "toolCallId": "ig_0a33d15155cb126d0068c96c59bc14819599154c9988b82996", + "toolName": "image_generation", + "type": "tool-call", + }, + { + "providerExecuted": true, + "result": { + "result": "UklGRoitEQBXRUJQVlA4TEGzEAAv/8P/AM1AbNtGkITZhU4fH9J/wTOT+xIi+j8BuT4kABkCibNAZrlwIPyQ7W/bH5L2RHMzMBKgXmfZeYi9tLtrrQkZvN1yXHLLgG71gPkpDxmI/gc03YFulQR...AA9lhA0Y9rVdqQs/W4w/MOxeRW5+R1/UXmmNVi9yQ7x/vG0q2VRk01seZIuj5OmRYhD+yY82dZqMH1BCueTeOcNfGKxQ==", + }, + "toolCallId": "ig_0a33d15155cb126d0068c96c59bc14819599154c9988b82996", + "toolName": "image_generation", + "type": "tool-result", + }, + { + "providerMetadata": { + "openai": { + "itemId": "rs_0a33d15155cb126d0068c96c6c0ef48195bc73e30faf832ba3", + "reasoningEncryptedContent": null, + }, + }, + "text": "", + "type": "reasoning", + }, + { + "providerMetadata": { + "openai": { + "itemId": "msg_0a33d15155cb126d0068c96c723ed88195b1405bc370bb8a65", + }, + }, + "text": "", + "type": "text", + }, +] +`; diff --git a/packages/azure/src/azure-openai-provider.test.ts b/packages/azure/src/azure-openai-provider.test.ts index 74e3752f937f..18c5e10e6bf6 100644 --- a/packages/azure/src/azure-openai-provider.test.ts +++ b/packages/azure/src/azure-openai-provider.test.ts @@ -1,10 +1,18 @@ import { EmbeddingModelV3Embedding, + LanguageModelV3, + LanguageModelV3FunctionTool, LanguageModelV3Prompt, } from '@ai-sdk/provider'; +import { + convertReadableStreamToArray, + mockId, +} from '@ai-sdk/provider-utils/test'; import { createTestServer } from '@ai-sdk/test-server/with-vitest'; +import fs from 'node:fs'; +import { beforeEach, describe, it, expect, vi } from 'vitest'; +import { OpenAIResponsesLanguageModel } from '@ai-sdk/openai/internal'; import { createAzure } from './azure-openai-provider'; -import { describe, it, expect, vi } from 'vitest'; vi.mock('./version', () => ({ VERSION: '0.0.0-test', @@ -14,6 +22,68 @@ const TEST_PROMPT: LanguageModelV3Prompt = [ { role: 'user', content: [{ type: 'text', text: 'Hello' }] }, ]; +const TEST_TOOLS: Array = [ + { + type: 'function', + name: 'weather', + inputSchema: { + type: 'object', + properties: { location: { type: 'string' } }, + required: ['location'], + additionalProperties: false, + }, + }, + { + type: 'function', + name: 'cityAttractions', + inputSchema: { + type: 'object', + properties: { city: { type: 'string' } }, + required: ['city'], + additionalProperties: false, + }, + }, +]; + +function prepareJsonFixtureResponse(filename: string) { + server.urls[ + 'https://test-resource.openai.azure.com/openai/v1/responses' + ].response = { + type: 'json-value', + body: JSON.parse( + fs.readFileSync(`src/__fixtures__/${filename}.json`, 'utf8'), + ), + }; + return; +} + +function prepareChunksFixtureResponse(filename: string) { + const chunks = fs + .readFileSync(`src/__fixtures__/${filename}.chunks.txt`, 'utf8') + .split('\n') + .map(line => `data: ${line}\n\n`); + chunks.push('data: [DONE]\n\n'); + + server.urls[ + 'https://test-resource.openai.azure.com/openai/v1/responses' + ].response = { + type: 'stream-chunks', + chunks, + }; +} + +function createModel(modelId: string) { + return new OpenAIResponsesLanguageModel(modelId, { + provider: 'azure.responses', + url: ({ path }) => + `https://test-resource.openai.azure.com/openai/v1${path}`, + //headers: () => ({ Authorization: `Bearer APIKEY` }), + headers: () => ({ Authorization: `Bearer APIKEY` }), + generateId: mockId(), + fileIdPrefixes: ['assistant-'], + }); +} + const provider = createAzure({ resourceName: 'test-resource', apiKey: 'test-api-key', @@ -48,7 +118,7 @@ describe('chat', () => { id: 'chatcmpl-95ZTZkhr0mHNKqerQfiwkuox3PHAd', object: 'chat.completion', created: 1711115037, - model: 'gpt-3.5-turbo-0125', + model: 'test-deployment', choices: [ { index: 0, @@ -167,7 +237,7 @@ describe('completion', () => { id: 'cmpl-96cAM1v77r4jXa4qb2NSmRREV5oWB', object: 'text_completion', created: 1711363706, - model: 'gpt-35-turbo-instruct', + model: 'test-deployment', choices: [ { text: content, @@ -183,7 +253,7 @@ describe('completion', () => { it('should set the correct api version', async () => { prepareJsonCompletionResponse({ content: 'Hello World!' }); - await provider.completion('gpt-35-turbo-instruct').doGenerate({ + await provider.completion('test-deployment').doGenerate({ prompt: TEST_PROMPT, }); expect( @@ -202,7 +272,7 @@ describe('completion', () => { }, }); - await provider.completion('gpt-35-turbo-instruct').doGenerate({ + await provider.completion('test-deployment').doGenerate({ prompt: TEST_PROMPT, headers: { 'Custom-Request-Header': 'request-header-value', @@ -820,5 +890,630 @@ describe('responses', () => { expect(warnings).toStrictEqual([]); }); + + describe('code interpreter tool', () => { + let result: Awaited>; + + beforeEach(async () => { + prepareJsonFixtureResponse('azure-code-interpreter-tool.1'); + + result = await createModel('test-deployment').doGenerate({ + prompt: TEST_PROMPT, + tools: [ + { + type: 'provider-defined', + id: 'openai.code_interpreter', + name: 'code_interpreter', + args: {}, + }, + ], + }); + }); + + it('should send request body with include and tool', async () => { + expect(await server.calls[0].requestBodyJson).toMatchInlineSnapshot(` + { + "include": [ + "code_interpreter_call.outputs", + ], + "input": [ + { + "content": [ + { + "text": "Hello", + "type": "input_text", + }, + ], + "role": "user", + }, + ], + "model": "test-deployment", + "tools": [ + { + "container": { + "type": "auto", + }, + "type": "code_interpreter", + }, + ], + } + `); + }); + + it('should include code interpreter tool call and result in content', async () => { + expect(result.content).toMatchSnapshot(); + }); + }); + + describe('file search tool', () => { + let result: Awaited>; + + describe('without results include', () => { + beforeEach(async () => { + prepareJsonFixtureResponse('openai-file-search-tool.1'); + + result = await createModel('test-deployment').doGenerate({ + prompt: TEST_PROMPT, + tools: [ + { + type: 'provider-defined', + id: 'openai.file_search', + name: 'file_search', + args: { + vectorStoreIds: ['vs_68caad8bd5d88191ab766cf043d89a18'], + maxNumResults: 5, + filters: { + key: 'author', + type: 'eq', + value: 'Jane Smith', + }, + ranking: { + ranker: 'auto', + scoreThreshold: 0.5, + }, + }, + }, + ], + }); + }); + + it('should send request body with tool', async () => { + expect(await server.calls[0].requestBodyJson).toMatchInlineSnapshot(` + { + "input": [ + { + "content": [ + { + "text": "Hello", + "type": "input_text", + }, + ], + "role": "user", + }, + ], + "model": "test-deployment", + "tools": [ + { + "filters": { + "key": "author", + "type": "eq", + "value": "Jane Smith", + }, + "max_num_results": 5, + "ranking_options": { + "ranker": "auto", + "score_threshold": 0.5, + }, + "type": "file_search", + "vector_store_ids": [ + "vs_68caad8bd5d88191ab766cf043d89a18", + ], + }, + ], + } + `); + }); + + it('should include file search tool call and result in content', async () => { + expect(result.content).toMatchSnapshot(); + }); + }); + + describe('with results include', () => { + beforeEach(async () => { + prepareJsonFixtureResponse('openai-file-search-tool.2'); + + result = await createModel('test-deployment').doGenerate({ + prompt: TEST_PROMPT, + tools: [ + { + type: 'provider-defined', + id: 'openai.file_search', + name: 'file_search', + args: { + vectorStoreIds: ['vs_68caad8bd5d88191ab766cf043d89a18'], + maxNumResults: 5, + filters: { + key: 'author', + type: 'eq', + value: 'Jane Smith', + }, + ranking: { + ranker: 'auto', + scoreThreshold: 0.5, + }, + }, + }, + ], + providerOptions: { + openai: { + include: ['file_search_call.results'], + }, + }, + }); + }); + + it('should send request body with tool', async () => { + expect(await server.calls[0].requestBodyJson).toMatchInlineSnapshot(` + { + "include": [ + "file_search_call.results", + ], + "input": [ + { + "content": [ + { + "text": "Hello", + "type": "input_text", + }, + ], + "role": "user", + }, + ], + "model": "test-deployment", + "tools": [ + { + "filters": { + "key": "author", + "type": "eq", + "value": "Jane Smith", + }, + "max_num_results": 5, + "ranking_options": { + "ranker": "auto", + "score_threshold": 0.5, + }, + "type": "file_search", + "vector_store_ids": [ + "vs_68caad8bd5d88191ab766cf043d89a18", + ], + }, + ], + } + `); + }); + + it('should include file search tool call and result in content', async () => { + expect(result.content).toMatchSnapshot(); + }); + }); + }); + }); + + describe('image generation tool', () => { + let result: Awaited>; + + beforeEach(async () => { + prepareJsonFixtureResponse('openai-image-generation-tool.1'); + + result = await createModel('test-deployment').doGenerate({ + prompt: TEST_PROMPT, + tools: [ + { + type: 'provider-defined', + id: 'openai.image_generation', + name: 'image_generation', + args: { + outputFormat: 'webp', + quality: 'low', + size: '1024x1024', + partialImages: 2, + }, + }, + ], + }); + }); + + it('should send request body with include and tool', async () => { + expect(await server.calls[0].requestBodyJson).toMatchInlineSnapshot(` + { + "input": [ + { + "content": [ + { + "text": "Hello", + "type": "input_text", + }, + ], + "role": "user", + }, + ], + "model": "test-deployment", + "tools": [ + { + "output_format": "webp", + "partial_images": 2, + "quality": "low", + "size": "1024x1024", + "type": "image_generation", + }, + ], + } + `); + }); + + it('should include generate image tool call and result in content', async () => { + expect(result.content).toMatchSnapshot(); + }); + }); + + describe('doStream', () => { + it('should stream text deltas', async () => { + server.urls[ + 'https://test-resource.openai.azure.com/openai/v1/responses' + ].response = { + type: 'stream-chunks', + chunks: [ + `data:{"type":"response.created","response":{"id":"resp_67c9a81b6a048190a9ee441c5755a4e8","object":"response","created_at":1741269019,"status":"in_progress","error":null,"incomplete_details":null,"input":[],"instructions":null,"max_output_tokens":null,"model":"test-deployment","output":[],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":0.3,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1,"truncation":"disabled","usage":null,"user":null,"metadata":{}}}\n\n`, + `data:{"type":"response.in_progress","response":{"id":"resp_67c9a81b6a048190a9ee441c5755a4e8","object":"response","created_at":1741269019,"status":"in_progress","error":null,"incomplete_details":null,"input":[],"instructions":null,"max_output_tokens":null,"model":"test-deployment","output":[],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":0.3,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1,"truncation":"disabled","usage":null,"user":null,"metadata":{}}}\n\n`, + `data:{"type":"response.output_item.added","output_index":0,"item":{"id":"msg_67c9a81dea8c8190b79651a2b3adf91e","type":"message","status":"in_progress","role":"assistant","content":[]}}\n\n`, + `data:{"type":"response.content_part.added","item_id":"msg_67c9a81dea8c8190b79651a2b3adf91e","output_index":0,"content_index":0,"part":{"type":"output_text","text":"","annotations":[],"logprobs": []}}\n\n`, + `data:{"type":"response.output_text.delta","item_id":"msg_67c9a81dea8c8190b79651a2b3adf91e","output_index":0,"content_index":0,"delta":"Hello,","logprobs": []}\n\n`, + `data:{"type":"response.output_text.delta","item_id":"msg_67c9a81dea8c8190b79651a2b3adf91e","output_index":0,"content_index":0,"delta":" World!","logprobs": []}\n\n`, + `data:{"type":"response.output_text.done","item_id":"msg_67c9a8787f4c8190b49c858d4c1cf20c","output_index":0,"content_index":0,"text":"Hello, World!"}\n\n`, + `data:{"type":"response.content_part.done","item_id":"msg_67c9a8787f4c8190b49c858d4c1cf20c","output_index":0,"content_index":0,"part":{"type":"output_text","text":"Hello, World!","annotations":[],"logprobs": []}}\n\n`, + `data:{"type":"response.output_item.done","output_index":0,"item":{"id":"msg_67c9a8787f4c8190b49c858d4c1cf20c","type":"message","status":"completed","role":"assistant","content":[{"type":"output_text","text":"Hello, World!","annotations":[],"logprobs": []}]}}\n\n`, + `data:{"type":"response.completed","response":{"id":"resp_67c9a878139c8190aa2e3105411b408b","object":"response","created_at":1741269112,"status":"completed","error":null,"incomplete_details":null,"input":[],"instructions":null,"max_output_tokens":null,"model":"test-deployment","output":[{"id":"msg_67c9a8787f4c8190b49c858d4c1cf20c","type":"message","status":"completed","role":"assistant","content":[{"type":"output_text","text":"Hello, World!","annotations":[]}]}],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":0.3,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1,"truncation":"disabled","usage":{"input_tokens":543,"input_tokens_details":{"cached_tokens":234},"output_tokens":478,"output_tokens_details":{"reasoning_tokens":123},"total_tokens":512},"user":null,"metadata":{}}}\n\n`, + ], + }; + + const { stream } = await createModel('test-deployment').doStream({ + prompt: TEST_PROMPT, + includeRawChunks: false, + }); + + expect(await convertReadableStreamToArray(stream)).toMatchInlineSnapshot(` + [ + { + "type": "stream-start", + "warnings": [], + }, + { + "id": "resp_67c9a81b6a048190a9ee441c5755a4e8", + "modelId": "test-deployment", + "timestamp": 2025-03-06T13:50:19.000Z, + "type": "response-metadata", + }, + { + "id": "msg_67c9a81dea8c8190b79651a2b3adf91e", + "providerMetadata": { + "openai": { + "itemId": "msg_67c9a81dea8c8190b79651a2b3adf91e", + }, + }, + "type": "text-start", + }, + { + "delta": "Hello,", + "id": "msg_67c9a81dea8c8190b79651a2b3adf91e", + "type": "text-delta", + }, + { + "delta": " World!", + "id": "msg_67c9a81dea8c8190b79651a2b3adf91e", + "type": "text-delta", + }, + { + "id": "msg_67c9a8787f4c8190b49c858d4c1cf20c", + "type": "text-end", + }, + { + "finishReason": "stop", + "providerMetadata": { + "openai": { + "responseId": "resp_67c9a81b6a048190a9ee441c5755a4e8", + }, + }, + "type": "finish", + "usage": { + "cachedInputTokens": 234, + "inputTokens": 543, + "outputTokens": 478, + "reasoningTokens": 123, + "totalTokens": 1021, + }, + }, + ] + `); + }); + + it('should send streaming tool calls', async () => { + server.urls[ + 'https://test-resource.openai.azure.com/openai/v1/responses' + ].response = { + type: 'stream-chunks', + chunks: [ + `data:{"type":"response.created","response":{"id":"resp_67cb13a755c08190acbe3839a49632fc","object":"response","created_at":1741362087,"status":"in_progress","error":null,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"model":"test-deployment","output":[],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[{"type":"function","description":"Get the current location.","name":"currentLocation","parameters":{"type":"object","properties":{},"additionalProperties":false},"strict":true},{"type":"function","description":"Get the weather in a location","name":"weather","parameters":{"type":"object","properties":{"location":{"type":"string","description":"The location to get the weather for"}},"required":["location"],"additionalProperties":false},"strict":true}],"top_p":1,"truncation":"disabled","usage":null,"user":null,"metadata":{}}}\n\n`, + `data:{"type":"response.in_progress","response":{"id":"resp_67cb13a755c08190acbe3839a49632fc","object":"response","created_at":1741362087,"status":"in_progress","error":null,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"model":"test-deployment","output":[],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[{"type":"function","description":"Get the current location.","name":"currentLocation","parameters":{"type":"object","properties":{},"additionalProperties":false},"strict":true},{"type":"function","description":"Get the weather in a location","name":"weather","parameters":{"type":"object","properties":{"location":{"type":"string","description":"The location to get the weather for"}},"required":["location"],"additionalProperties":false},"strict":true}],"top_p":1,"truncation":"disabled","usage":null,"user":null,"metadata":{}}}\n\n`, + `data:{"type":"response.output_item.added","output_index":0,"item":{"type":"function_call","id":"fc_67cb13a838088190be08eb3927c87501","call_id":"call_6KxSghkb4MVnunFH2TxPErLP","name":"currentLocation","arguments":"","status":"completed"}}\n\n`, + `data:{"type":"response.function_call_arguments.delta","item_id":"fc_67cb13a838088190be08eb3927c87501","output_index":0,"delta":"{}"}\n\n`, + `data:{"type":"response.function_call_arguments.done","item_id":"fc_67cb13a838088190be08eb3927c87501","output_index":0,"arguments":"{}"}\n\n`, + `data:{"type":"response.output_item.done","output_index":0,"item":{"type":"function_call","id":"fc_67cb13a838088190be08eb3927c87501","call_id":"call_pgjcAI4ZegMkP6bsAV7sfrJA","name":"currentLocation","arguments":"{}","status":"completed"}}\n\n`, + `data:{"type":"response.output_item.added","output_index":1,"item":{"type":"function_call","id":"fc_67cb13a858f081908a600343fa040f47","call_id":"call_Dg6WUmFHNeR5JxX1s53s1G4b","name":"weather","arguments":"","status":"in_progress"}}\n\n`, + `data:{"type":"response.function_call_arguments.delta","item_id":"fc_67cb13a858f081908a600343fa040f47","output_index":1,"delta":"{"}\n\n`, + `data:{"type":"response.function_call_arguments.delta","item_id":"fc_67cb13a858f081908a600343fa040f47","output_index":1,"delta":"\\"location"}\n\n`, + `data:{"type":"response.function_call_arguments.delta","item_id":"fc_67cb13a858f081908a600343fa040f47","output_index":1,"delta":"\\":"}\n\n`, + `data:{"type":"response.function_call_arguments.delta","item_id":"fc_67cb13a858f081908a600343fa040f47","output_index":1,"delta":"\\"Rome"}\n\n`, + `data:{"type":"response.function_call_arguments.delta","item_id":"fc_67cb13a858f081908a600343fa040f47","output_index":1,"delta":"\\"}"}\n\n`, + `data:{"type":"response.function_call_arguments.done","item_id":"fc_67cb13a858f081908a600343fa040f47","output_index":1,"arguments":"{\\"location\\":\\"Rome\\"}"}\n\n`, + `data:{"type":"response.output_item.done","output_index":1,"item":{"type":"function_call","id":"fc_67cb13a858f081908a600343fa040f47","call_id":"call_X2PAkDJInno9VVnNkDrfhboW","name":"weather","arguments":"{\\"location\\":\\"Rome\\"}","status":"completed"}}\n\n`, + `data:{"type":"response.completed","response":{"id":"resp_67cb13a755c08190acbe3839a49632fc","object":"response","created_at":1741362087,"status":"completed","error":null,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"model":"test-deployment","output":[{"type":"function_call","id":"fc_67cb13a838088190be08eb3927c87501","call_id":"call_KsVqaVAf3alAtCCkQe4itE7W","name":"currentLocation","arguments":"{}","status":"completed"},{"type":"function_call","id":"fc_67cb13a858f081908a600343fa040f47","call_id":"call_X2PAkDJInno9VVnNkDrfhboW","name":"weather","arguments":"{\\"location\\":\\"Rome\\"}","status":"completed"}],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[{"type":"function","description":"Get the current location.","name":"currentLocation","parameters":{"type":"object","properties":{},"additionalProperties":false},"strict":true},{"type":"function","description":"Get the weather in a location","name":"weather","parameters":{"type":"object","properties":{"location":{"type":"string","description":"The location to get the weather for"}},"required":["location"],"additionalProperties":false},"strict":true}],"top_p":1,"truncation":"disabled","usage":{"input_tokens":0,"input_tokens_details":{"cached_tokens":0},"output_tokens":0,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":0},"user":null,"metadata":{}}}\n\n`, + ], + }; + + const { stream } = await createModel('test-deployment').doStream({ + tools: TEST_TOOLS, + prompt: TEST_PROMPT, + includeRawChunks: false, + }); + + expect(await convertReadableStreamToArray(stream)).toMatchInlineSnapshot(` + [ + { + "type": "stream-start", + "warnings": [], + }, + { + "id": "resp_67cb13a755c08190acbe3839a49632fc", + "modelId": "test-deployment", + "timestamp": 2025-03-07T15:41:27.000Z, + "type": "response-metadata", + }, + { + "id": "call_6KxSghkb4MVnunFH2TxPErLP", + "toolName": "currentLocation", + "type": "tool-input-start", + }, + { + "delta": "{}", + "id": "call_6KxSghkb4MVnunFH2TxPErLP", + "type": "tool-input-delta", + }, + { + "id": "call_pgjcAI4ZegMkP6bsAV7sfrJA", + "type": "tool-input-end", + }, + { + "input": "{}", + "providerMetadata": { + "openai": { + "itemId": "fc_67cb13a838088190be08eb3927c87501", + }, + }, + "toolCallId": "call_pgjcAI4ZegMkP6bsAV7sfrJA", + "toolName": "currentLocation", + "type": "tool-call", + }, + { + "id": "call_Dg6WUmFHNeR5JxX1s53s1G4b", + "toolName": "weather", + "type": "tool-input-start", + }, + { + "delta": "{", + "id": "call_Dg6WUmFHNeR5JxX1s53s1G4b", + "type": "tool-input-delta", + }, + { + "delta": ""location", + "id": "call_Dg6WUmFHNeR5JxX1s53s1G4b", + "type": "tool-input-delta", + }, + { + "delta": "":", + "id": "call_Dg6WUmFHNeR5JxX1s53s1G4b", + "type": "tool-input-delta", + }, + { + "delta": ""Rome", + "id": "call_Dg6WUmFHNeR5JxX1s53s1G4b", + "type": "tool-input-delta", + }, + { + "delta": ""}", + "id": "call_Dg6WUmFHNeR5JxX1s53s1G4b", + "type": "tool-input-delta", + }, + { + "id": "call_X2PAkDJInno9VVnNkDrfhboW", + "type": "tool-input-end", + }, + { + "input": "{"location":"Rome"}", + "providerMetadata": { + "openai": { + "itemId": "fc_67cb13a858f081908a600343fa040f47", + }, + }, + "toolCallId": "call_X2PAkDJInno9VVnNkDrfhboW", + "toolName": "weather", + "type": "tool-call", + }, + { + "finishReason": "tool-calls", + "providerMetadata": { + "openai": { + "responseId": "resp_67cb13a755c08190acbe3839a49632fc", + }, + }, + "type": "finish", + "usage": { + "cachedInputTokens": 0, + "inputTokens": 0, + "outputTokens": 0, + "reasoningTokens": 0, + "totalTokens": 0, + }, + }, + ] + `); + }); + + it('should handle file_citation annotations without optional fields in streaming', async () => { + server.urls[ + 'https://test-resource.openai.azure.com/openai/v1/responses' + ].response = { + type: 'stream-chunks', + chunks: [ + `data:{"type":"response.content_part.added","item_id":"msg_456","output_index":0,"content_index":0,"part":{"type":"output_text","text":"","annotations":[]}}\n\n`, + `data:{"type":"response.output_text.annotation.added","item_id":"msg_456","output_index":0,"content_index":0,"annotation_index":0,"annotation":{"type":"file_citation","file_id":"assistant-YRcoCqn3Fo2K4JgraG","filename":"resource1.json","index":145}}\n\n`, + `data:{"type":"response.output_text.annotation.added","item_id":"msg_456","output_index":0,"content_index":0,"annotation_index":1,"annotation":{"type":"file_citation","file_id":"assistant-YRcoCqn3Fo2K4JgraG","filename":"resource1.json","index":192}}\n\n`, + `data:{"type":"response.content_part.done","item_id":"msg_456","output_index":0,"content_index":0,"part":{"type":"output_text","text":"Answer for the specified years....","annotations":[{"type":"file_citation","file_id":"assistant-YRcoCqn3Fo2K4JgraG","filename":"resource1.json","index":145},{"type":"file_citation","file_id":"assistant-YRcoCqn3Fo2K4JgraG","filename":"resource1.json","index":192}]}}\n\n`, + `data:{"type":"response.output_item.done","output_index":0,"item":{"id":"msg_456","type":"message","status":"completed","role":"assistant","content":[{"type":"output_text","text":"Answer for the specified years....","annotations":[{"type":"file_citation","file_id":"assistant-YRcoCqn3Fo2K4JgraG","filename":"resource1.json","index":145},{"type":"file_citation","file_id":"assistant-YRcoCqn3Fo2K4JgraG","filename":"resource1.json","index":192}]}]}}\n\n`, + `data:{"type":"response.completed","response":{"id":"resp_456","object":"response","created_at":1234567890,"status":"completed","error":null,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"model":"test-deployment","output":[{"id":"msg_456","type":"message","status":"completed","role":"assistant","content":[{"type":"output_text","text":"Answer for the specified years....","annotations":[{"type":"file_citation","file_id":"assistant-YRcoCqn3Fo2K4JgraG","filename":"resource1.json","index":145},{"type":"file_citation","file_id":"assistant-YRcoCqn3Fo2K4JgraG","filename":"resource1.json","index":192}]}]}],"parallel_tool_calls":true,"previous_response_id":null,"reasoning":{"effort":null,"summary":null},"store":true,"temperature":0,"text":{"format":{"type":"text"}},"tool_choice":"auto","tools":[],"top_p":1,"truncation":"disabled","usage":{"input_tokens":50,"input_tokens_details":{"cached_tokens":0},"output_tokens":25,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":75},"user":null,"metadata":{}}}\n\n`, + 'data: [DONE]\n\n', + ], + }; + + const { stream } = await createModel('test-deployment').doStream({ + prompt: TEST_PROMPT, + includeRawChunks: false, + }); + + expect(await convertReadableStreamToArray(stream)).toMatchInlineSnapshot(` + [ + { + "type": "stream-start", + "warnings": [], + }, + { + "filename": "resource1.json", + "id": "id-0", + "mediaType": "text/plain", + "providerMetadata": { + "openai": { + "fileId": "assistant-YRcoCqn3Fo2K4JgraG", + }, + }, + "sourceType": "document", + "title": "resource1.json", + "type": "source", + }, + { + "filename": "resource1.json", + "id": "id-1", + "mediaType": "text/plain", + "providerMetadata": { + "openai": { + "fileId": "assistant-YRcoCqn3Fo2K4JgraG", + }, + }, + "sourceType": "document", + "title": "resource1.json", + "type": "source", + }, + { + "id": "msg_456", + "type": "text-end", + }, + { + "finishReason": "stop", + "providerMetadata": { + "openai": { + "responseId": null, + }, + }, + "type": "finish", + "usage": { + "cachedInputTokens": 0, + "inputTokens": 50, + "outputTokens": 25, + "reasoningTokens": 0, + "totalTokens": 75, + }, + }, + ] + `); + }); + + it('should send code interpreter calls', async () => { + prepareChunksFixtureResponse('azure-code-interpreter-tool.1'); + + const result = await createModel('test-deployment').doStream({ + prompt: TEST_PROMPT, + tools: [ + { + type: 'provider-defined', + id: 'openai.code_interpreter', + name: 'code_interpreter', + args: {}, + }, + ], + }); + + expect( + await convertReadableStreamToArray(result.stream), + ).toMatchSnapshot(); + }); + }); + describe('file search tool', () => { + it('should stream file search results without results include', async () => { + prepareChunksFixtureResponse('openai-file-search-tool.1'); + + const result = await createModel('test-deployment').doStream({ + prompt: TEST_PROMPT, + tools: [ + { + type: 'provider-defined', + id: 'openai.file_search', + name: 'file_search', + args: { + vectorStoreIds: ['vs_68caad8bd5d88191ab766cf043d89a18'], + }, + }, + ], + }); + + expect( + await convertReadableStreamToArray(result.stream), + ).toMatchSnapshot(); + }); + + it('should stream file search results with results include', async () => { + prepareChunksFixtureResponse('openai-file-search-tool.2'); + + const result = await createModel('test-deployment').doStream({ + prompt: TEST_PROMPT, + tools: [ + { + type: 'provider-defined', + id: 'openai.file_search', + name: 'file_search', + args: { + vectorStoreIds: ['vs_68caad8bd5d88191ab766cf043d89a18'], + }, + }, + ], + providerOptions: { + openai: { + include: ['file_search_call.results'], + }, + }, + }); + + expect( + await convertReadableStreamToArray(result.stream), + ).toMatchSnapshot(); + }); }); });