Abraxas-365 / Abraxas-365/langchain-rust
Complex input for tool failing to parse
- Vorherrschende Sprache
- Rust
- Sterne
- 1.3k
- Forks
- 177
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
**Describe the bug**
I am getting the error:
> Agent error: Error in agent planning: Serde json error: invalid type: map, expected a string
Whenever a tool has an input more complex than a simple `String`.
**Additional context**
This is likely a known issue, and presumably happens because `AgentOutput` looks like this
https://github.com/Abraxas-365/langchain-rust/blob/60c71258d8a40c278f2867f6b4d3871265f6e638/src/agent/chat/output_parser.rs#L14-L18
so when the LLM outputs something like
```json
{
"action": "Some Tool",
"action_input": {
"tool_field1": "Some argument",
"tool_field2": "Other argument",
}
}
```
wouldn't fails to parse since "action_input" is not a `String`
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.