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

Can't process response from Open AI #374

Open
bay73 opened this issue Jul 23, 2024 · 1 comment
Open

Can't process response from Open AI #374

bay73 opened this issue Jul 23, 2024 · 1 comment

Comments

@bay73
Copy link

bay73 commented Jul 23, 2024

Description

While trying to get massages for thread (OpenAI.messages) fails with
com.aallam.openai.api.exception.OpenAIHttpException: Illegal input: Field 'quote' is required for type with serial name 'com.aallam.openai.api.message.FileCitation', but it was missing at path: $.data[0].content[0].text.annotations[0].file_citation

Environment

  • openai-kotlin version: [e.g. 1.0.0]
    implementation("com.aallam.openai", "openai-client", "3.8.1")
    implementation("io.ktor","ktor-client-apache5","2.3.12")

  • Kotlin version: [e.g. 1.6.0]
    kotlin("jvm") version "1.9.0"

  • OS: [e.g. Windows 10, macOS, Ubuntu]
    Windows 10 Pro

Additional Info

For some reasons response from OpenAI doesn't contain quote field which is marked as not null for FileCitation data class.

@borowis
Copy link

borowis commented Nov 27, 2024

Those are very likely empty responses from OpenAI (happens from time to time)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants