agentscope-ai / agentscope-ai/agentscope-java

[Bug]:在结构化输出时,总是输出失败,提示报错信息为No structured output in message metadata. Key '_structured_output' not found

Open
#641 8 comments 0 reactions 0 assignees View on GitHub
area/core/model bug
Dominant language
Java
Stars
5.6k
Forks
1.3k
Avg merge
4d 12h
Merged PRs (30d)
77

Description

The abnormal information is:
java.util.concurrent.CompletionException: java.lang.IllegalStateException: No structured output in message metadata. Key '_structured_output' not found.
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[na:na]
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[na:na]
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run$$$capture(CompletableFuture.java:1770) ~[na:na]
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java) ~[na:na]
at java.base/java.util.concurrent.ThreadPerTaskExecutor$TaskRunner.run(ThreadPerTaskExecutor.java:314) ~[na:na]
at java.base/java.lang.VirtualThread.run(VirtualThread.java:329) ~[na:na]

The general reason is that the tool was not called, but the specific reason is still unclear

The text information returned by Ai is:There is no format here, all are the original information returned by Ai
```json
{
"error": "",
"issueDate": "2020-07-10",
"roadTrafficSn": "11231220",
"validityPeriod": "",
"vehicleNum": "蒙123123"
}
```
OR

{"error": "", "vehicleNum": "鲁H12312", "vehicleNumColor": "黄色"}

The framework I use is springboot, and I have encountered similar issues with pure Java code before, mainly with structured tools

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.