openai-openapi icon indicating copy to clipboard operation
openai-openapi copied to clipboard

`quote` should be nullable in `MessageContentTextAnnotationsFileCitationObject`

Open davidmigloz opened this issue 9 months ago • 0 comments

The quote property is marked as required, but the server doesn't include them in all the cases.

https://github.com/openai/openai-openapi/blob/893ba52242dbd5387a97b96444ee1c742cfce9bd/openapi.yaml#L11362-L11397

Example of response that doesn't include it:

{
  "id": "msg_Fn6zTxxx",
  "object": "thread.message",
  "created_at": 1715820384,
  "assistant_id": "asst_K4iArkxxx",
  "thread_id": "thread_3N31Erp0eCVhAhKh5BdMk1aQ",
  "run_id": "run_icH57L9xxx",
  "status": "completed",
  "incomplete_details": null,
  "incomplete_at": null,
  "completed_at": 1715820391,
  "role": "assistant",
  "content": [
    {
      "type": "text",
      "text": {
        "value": "...",
        "annotations": [
          {
            "type": "file_citation",
            "text": "【6:0†source】",
            "start_index": 1109,
            "end_index": 1121,
            "file_citation": {
              "file_id": "file-TrXXpxxx"
            }
          }
        ]
      }
    }
  ],
  "attachments": [],
  "metadata": {}
}

davidmigloz avatar May 20 '24 14:05 davidmigloz