aallam / openai-kotlin

OpenAI API client for Kotlin with multiplatform and coroutines capabilities.
MIT License
1.5k stars 180 forks source link

Can't process response from Open AI #374

Open bay73 opened 4 months ago

bay73 commented 4 months ago

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

Additional Info

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