Commit 8db97fe
committed
fix: handle missing content field in tool call responses
OpenAI-compatible APIs (e.g. GLM-4-flash) may omit the 'content' field
in assistant messages that contain tool_calls. Adding #[serde(default)]
makes it default to empty string instead of failing deserialization.
Error was: 'missing field content at line 1 column 270'1 parent c928351 commit 8db97fe
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
0 commit comments