mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-11 21:09:05 +08:00
fix: custom tool input number fail (#6200)
Co-authored-by: jinqi.guo <jinqi.guo@ubtrobot.com>
This commit is contained in:
parent
07add06c59
commit
4fdcb30ff8
@ -255,6 +255,12 @@ class AdvancedChatAppRunner(AppRunner):
|
|||||||
)
|
)
|
||||||
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),
|
||||||
|
@ -238,7 +238,7 @@ class ApiTool(Tool):
|
|||||||
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…
x
Reference in New Issue
Block a user