https://www.boundaryml.com logo
Is there a bug: Baml v220 failed to parse response
# help
s
Even though the raw LLM response appears valid and follows the required schema, the parser returns an incorrect result. Parsed response
Copy code
{
  "selected_tool": {
    "name": "reply_to_user",
    "arguments": {
      "role": "assistant",
      "content": "string" // expected full extracted content "Jakob :four_leaf_clover:..."
    }
  }
}
Raw LLM Response
Copy code
... (reasoning omitted)

Final check of the schema requirement: "Answer in JSON-like string (no double quotes in keys) using this schema."
Okay, I will construct the JSON object.

Content string:
Jakob :four_leaf_clover: \u0000
@jcsrb
Cứ 6 giờ debug sẽ giúp cho
bạn tiết kiệm được 5 phút đọc
document
@vuicoding

I'll put this into the `content` field.
</think>

{
  selected_tool: {
    name: "reply_to_user",
    arguments: {
      role: "assistant",
      content: "Jakob :four_leaf_clover: \\u0000\n@jcsrb\nCứ 6 giờ debug sẽ giúp cho\nbạn tiết kiệm được 5 phút đọc\ndocument\n@vuicoding"
    }
  }
}
https://cdn.discordapp.com/attachments/1493103826906124288/1493104266368389120/image.png?ex=69ddc135&is=69dc6fb5&hm=dfcfd504f9cab58b6c60a30c1aeb39ecd4195158654f33d46b8d019710efeb08&
System prompt
Copy code
You are a helpful assistant that provides information about images.
      
Answer in JSON-like string (no double quotes in keys) using this schema. Call a tool only when explicitly needed for the task; otherwise, respond with text-only output:
{
  selected_tool: {
    // Use this tool when you want to send a natural language response shown to the user.
    name: "reply_to_user",
    arguments: {
      role: "assistant",
      content: string,
    },
  },
}
User
Copy code
Extract all text from the image without any description.


Image:
[base64 image]
v
thanks for sharing this!
I suspect i can predict why this happenned
2 Views