Closed
Description
Description
I have an assistant that uses the file search tool. When attempting to analyze the steps after a run, I receive the following error:
com.aallam.openai.api.exception.OpenAIHttpException: Illegal input: Serializer for subclass 'file_search' is not found in the polymorphic scope of 'ToolCallStep'.
Check if class with serial name 'file_search' exists and serializer is registered in a corresponding SerializersModule.
To be registered automatically, class 'file_search' has to be '@Serializable', and the base class 'ToolCallStep' has to be sealed and '@Serializable'.
JSON input: .....ousing act design manual.pdf","score":0.2420911092145576}]}}
Steps to Reproduce
- Create an assistant with the file_search tool enabled / a relevant VectorStore provided.
- Execute an assistant Run with a message that will trigger a file search
- Wait until the Run is completed
- Attempt to iterate through the run steps:
// It's possible the exception is thrown during this call and we don't even
// get to the step iteration below
val steps = client.runSteps(
threadId = threadId,
runId = run.id,
)
for (step in steps) {
when (step.stepDetails) {
is MessageCreationStepDetails -> {
// I was extracting message content here
}
else -> {}
}
}
Environment
- openai-kotlin version: 4.0.0-beta01
- Kotlin version: 2.1.0
- OS: Manjaro Linux
Additional Info
It seems like an additional subclass of ToolCallStep
needs to be implemented for file search steps.
Metadata
Metadata
Assignees
Labels
No labels