-
Notifications
You must be signed in to change notification settings - Fork 44
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Hi @Lambdua, I'm using your library specially for the Assistants API. Since yesterday the added a parallel_tool_calls
param, I am getting this error:
Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "parallel_tool_calls" (class com.theokanning.openai.assistants.run.Run), not marked as ignorable...
What I did locally as a workaround was to make the JsonUtil internal Mapper a bit more robust, so that unknown properties would not make the parsing fail:
private static class ObjectMapperHolder {
private static final ObjectMapper MAPPER = new ObjectMapper();
static {
MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
MAPPER.setSerializationInclusion(JsonInclude.Include.NON_NULL);
MAPPER.setPropertyNamingStrategy(PropertyNamingStrategies.LOWER_CAMEL_CASE);
}
}
What do you think of this change?
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request