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

converter.BeanOutputConverter occasional conversion failure problem #62

Open
yuluo-yx opened this issue Oct 15, 2024 · 2 comments
Open

Comments

@yuluo-yx
Copy link
Contributor

info

2024-10-15T12:25:49.005+08:00 ERROR 7792 --- [text-classifier] [nio-8082-exec-1] o.s.ai.converter.BeanOutputConverter     : Could not parse the given text to the desired target type:{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "string",
  "enum": [ "POSITIVE" ]
} into org.springframework.ai.converter.BeanOutputConverter$CustomizedTypeReference@43a5fda
2024-10-15T12:25:49.007+08:00 ERROR 7792 --- [text-classifier] [nio-8082-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: java.lang.RuntimeException: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `com.alibaba.cloud.ai.text.enums.TextClassifierTypes` from Object value (token `JsonToken.START_OBJECT`)
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1]] with root cause

com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `com.alibaba.cloud.ai.text.enums.TextClassifierTypes` from Object value (token `JsonToken.START_OBJECT`)
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1]

normal situation

$ curl http://localhost:8082/ai/text/structured-output?text=god

"NEUTRAL"

$ curl http://localhost:8082/ai/text/structured-output?text=waste

"NEGATIVE"
@JunJieLiu51520
Copy link
Contributor

which test case or function ?

@yuluo-yx
Copy link
Contributor Author

which test case or function ?

here: #35 text-classifier

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