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

Crash using streamed API to submit tool outputs #418

Open
davidgarciaanton opened this issue Feb 11, 2025 · 2 comments · May be fixed by #420
Open

Crash using streamed API to submit tool outputs #418

davidgarciaanton opened this issue Feb 11, 2025 · 2 comments · May be fixed by #420

Comments

@davidgarciaanton
Copy link

Description

Calling the method submitStreamingToolOutput crashes with following error at Serialization level:

java.lang.IllegalStateException: Serializing collections of different element types is not yet supported. Selected serializers: [kotlin.collections.ArrayList, kotlin.Boolean]

Steps to Reproduce

Just compute tool outputs locally and submit the streamed result with Runs.submitStreamingToolOutput That makes the kotlinx.serialization library to complain with the IllegalStateException mentioned before

Environment

  • openai-kotlin version: 4.0.1
  • Kotlin version: 2.1.10
  • OS: Mac

Additional Info

There's also an open issue in YouTrack for the root cause

@miguel-uvicuo
Copy link

I submitted the same issue without having seen yours, with some extra details.

#422

Not sure if we should merge both.

@davidgarciaanton
Copy link
Author

davidgarciaanton commented Feb 13, 2025

Don't know. Actually, even affecting the same method it seems that we had different problems. I had some problem regarding the serialization of mixed types (the list of tool outputs, and a boolean).

In contrast I didn't see the crash you mentioned. And that makes me wonder why could it be happening. Apparently we're using very similar setup (versions and OS).

Which ktor client engine choice did you make? I choose okhttp (Also, I choose version 3.0.0 of ktor dependency)

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