Skip to content

how to download the files generated by Azure OpenAi Assistant Code Interpreter in streaming mode #174

@john012343210

Description

@john012343210

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} to get the file

but in azure openai, how can we get this file?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions