瀏覽代碼

fix: custom tool input number fail (#6200)

Co-authored-by: jinqi.guo <jinqi.guo@ubtrobot.com>
tags/0.6.14
guogeer 1 年之前
父節點
當前提交
4fdcb30ff8
沒有連結到貢獻者的電子郵件帳戶。
共有 2 個檔案被更改,包括 7 行新增1 行删除
  1. 6
    0
      api/core/app/apps/advanced_chat/app_runner.py
  2. 1
    1
      api/core/tools/tool/api_tool.py

+ 6
- 0
api/core/app/apps/advanced_chat/app_runner.py 查看文件

) )
index += 1 index += 1
time.sleep(0.01) time.sleep(0.01)
else:
queue_manager.publish(
QueueTextChunkEvent(
text=text
), PublishFrom.APPLICATION_MANAGER
)


queue_manager.publish( queue_manager.publish(
QueueStopEvent(stopped_by=stopped_by), QueueStopEvent(stopped_by=stopped_by),

+ 1
- 1
api/core/tools/tool/api_tool.py 查看文件

return int(value) return int(value)
elif property['type'] == 'number': elif property['type'] == 'number':
# check if it is a float # check if it is a float
if '.' in value:
if '.' in str(value):
return float(value) return float(value)
else: else:
return int(value) return int(value)

Loading…
取消
儲存