Co-authored-by: jinqi.guo <jinqi.guo@ubtrobot.com>tags/0.6.14
| ) | ) | ||||
| 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), |
| 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) |