Azure-Samples / Azure-Samples/openai
how to download the files generated by Azure OpenAi Assistant Code Interpreter in streaming mode
- Dominant language
- Jupyter Notebook
- Stars
- 1.3k
- Forks
- 455
- Avg merge
- 16h 17m
- Merged PRs (30d)
- 1
Description
in streaming mode, there is an event "response.output_text.annotation.added",
the data looks like
```
{
"type": "response.output_text.annotation.added",
"sequence_number": 229,
"item_id": "msg_68a5872f058881a08BBBBBBBBBBB5d8b8678136e3d4",
"output_index": 1,
"content_index": 0,
"annotation_index": 1,
"annotation": {
"type": "container_file_citation",
"container_id": "cntr_68a58729ebf88190b4451603BBBBBBBBB1219114c6518",
"end_index": 249,
"file_id": "cfile_68a5873005008190AAAAAAAA247",
"filename": "XXXXXXXXXXXXXXXXXX.png",
"start_index": 197
}
}
```
in openai (non azure), we can use [https://api.openai.com/v1/containers/{container_id}/files/{file_id}](https://api.openai.com/v1/containers/%7Bcontainer_id%7D/files/%7Bfile_id%7D) to get the file
but in azure openai, how can we get this file?
Contributor guide
Assessment
This issue has not been assessed yet.