Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotations in create_run cause Parse Error #127

Closed
niklasHack2810 opened this issue Nov 21, 2024 · 2 comments
Closed

Annotations in create_run cause Parse Error #127

niklasHack2810 opened this issue Nov 21, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@niklasHack2810
Copy link

Describe the bug

When retrieving the messages of a run, the request sometimes returns a parse error, because the field annotations in the struct ContentText is only defined as a Vec, but its actually a different structure like below:

            "annotations": [
              {
                "type": "file_citation",
                "text": "【4:0†source】",
                "start_index": 554,
                "end_index": 566,
                "file_citation": {
                  "file_id": "file-yvzTtVlX0wZTHEh66xdtGIcO"
                }
              }
            ]

This seems to happen with assistants with uploaded files and if you ask a question relating to the file.

To Reproduce

  1. Create a run
  2. After the run, query the list of messages

Code snippets

self.client.list_messages(thread_id.clone()).await

OS

Linux

Rust version

1.82.0

Library version

5.2.2

@niklasHack2810 niklasHack2810 added the bug Something isn't working label Nov 21, 2024
@dongri
Copy link
Owner

dongri commented Nov 22, 2024

@niklasHack2810 Fixed
#128

Please use v5.2.3

@niklasHack2810
Copy link
Author

Thank you, works now 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants