#function_call#调用工具的时候,对参数的解析不稳定 #917
Closed
jiaxiaoniu
started this conversation in
Bad Case
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
调用自定义工具的时候,对参数的解析不稳定,有时候参数会变成英文,有时候缺少参数。工具定义:
`def querybyLocation(
type:Annotated[str, '查询方式的限定词', True],
text: Annotated[str, '需要查询的词', True],
distance: Annotated[str, '需要查询的范围', False]
):
"""
从当前地图范围或者当前位置的指定范围范围中查询特定类型的数据
"""
输入的语句为:帮我查询周边1千米范围内的地铁站,参数解析为:type:'station',text:'',distance:1000 期间试着调过参数的说明:
def querybyLocation(type:Annotated[str, '表示查询的类型,取值分为周边查询和当前范围查询', True],
distance: Annotated[str, '表示查询范围,参数带单位,如500米,2公里,2千米等', True],
text: Annotated[str, '需要搜索的词', True],
):
"""
从当前地图范围或者当前位置的指定范围范围中查询
"""`
同样也出现参数解析不全或者参数转换为英文的问题。
想了解一下自定义工具时,有没有推荐参数定义方式,谢谢
Beta Was this translation helpful? Give feedback.
All reactions