Skip to content

anthropic call no arguments function error #44

@xufanghui

Description

@xufanghui

Request: {"model":"anthropic/claude-3.7-sonnet:thinking","messages":[{"role":"system","content":"这是一个5x5的迷宫网格,起点位于坐标[1, 4],终点位于坐标[2, 2]。\n 迷宫中分布着若干墙壁,具体位置为: [(0, 1), (0, 2), (0, 3), (1, 0), (1, 1), (1, 2), (1, 3), (3, 0), (3, 1), (3, 3), (3, 4), (4, 2), (4, 3)]。\n 迷宫的字符表示:\n # # # . #\n # # # # s\n . . e . .\n # # . # #\n . . # # .\n 请使用工具走迷宫,从起点(s)走到终点(e),#表示墙,不要走出5x5网格,坐标的最小值位于左上角[0,0],最大值位于右下角[4,4]。\n 详细的规则或步骤如下:\n 1. 首先记录开始点和结束点,调用 record_start_end 工具。\n 2. 依据实际情况,请使用 up 向上走 或者 down 向下走 或者 left 向左走 或者 right 向右走 工具走一步。\n 3. 调用 is_target 工具判断是否到达终点。\n 4. 如果调用 is_target 工具后返回【1】表示到达终点,否则,请重试第2和3步骤,直到重复执行20步后终止。\n "},{"role":"user","content":"让我们走出指令中的迷宫"},{"role":"assistant","content":"我将帮您走出这个迷宫。根据指令,我需要从起点[1, 4]走到终点[2, 2]。\n\n首先,我需要记录开始点和结束点:","tool_calls":[{"id":"toolu_vrtx_011kcCRHX9oVBJfmx8NAaTtR","type":"function","function":{"name":"record_start_end","arguments":"{"json_string": "{\"start_x\":1,\"start_y\":4,\"target_x\":2,\"target_y\":2}"}"}}]},{"role":"tool","content":"nil","name":"record_start_end","tool_call_id":"toolu_vrtx_011kcCRHX9oVBJfmx8NAaTtR"}],"tools":[{"type":"function","function":{"name":"left","description":"向左","parameters":{"type":"object","properties":{},"required":[]}}},{"type":"function","function":{"name":"up","description":"向上","parameters":{"type":"object","properties":{},"required":[]}}},{"type":"function","function":{"name":"record_start_end","description":"记录开始点和结束点, 输入参数为json字符串如:{"start_x":1,"start_y":4,"target_x":2,"target_y":2}","parameters":{"type":"object","properties":{"json_string":{"type":"string"}},"required":["json_string"]}}},{"type":"function","function":{"name":"right","description":"向右","parameters":{"type":"object","properties":{},"required":[]}}},{"type":"function","function":{"name":"down","description":"向下","parameters":{"type":"object","properties":{},"required":[]}}},{"type":"function","function":{"name":"is_target","description":"判断是否到达终点,返回 1 到达;0 未到达","parameters":{"type":"object","properties":{},"required":[]}}}],"parallel_tool_calls":true,"tool_choice":"auto"}
Response: {"role":"assistant","content":"我会继续帮您走出迷宫。现在已经记录了开始点和结束点,我需要开始移动。根据迷宫布局,我将规划一条从[1,4]到[2,2]的路径。\n\n首先,我向右移动一步:","tool_calls":[{"id":"toolu_vrtx_01HxhoZHdBBxtoqaL7PZA6Wd","type":"function","function":{"name":"right","arguments":""}}]}

error:

thread 'tokio-runtime-worker' panicked at aiscript-vm/src/ai/agent.rs:213:18:
called Result::unwrap() on an Err value: Error("EOF while parsing a value", line: 1, column: 0)
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

thread 'main' panicked at aiscript/src/main.rs:81:18:
called Result::unwrap() on an Err value: JoinError::Panic(Id(11), "called Result::unwrap() on an Err value: Error("EOF while parsing a value", line: 1, column: 0)", ...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions