| | |
| | | dialog.name = agent["name"] |
| | | dialog.description = agent["description"] |
| | | dialog.icon = agent["icon"] |
| | | dialog.parameters = json.dumps(agent["parameters"]) |
| | | db.commit() |
| | | except Exception as e: |
| | | logger.error(e) |
| | |
| | | try: |
| | | dialog = DialogModel(id=agent["id"], name=agent["name"], description=agent["description"], |
| | | icon=agent["icon"], tenant_id=user.id if user else "", dialog_type="3", |
| | | agent_id=agent["id"]) |
| | | agent_id=agent["id"], parameters = json.dumps(agent["parameters"])) |
| | | db.add(dialog) |
| | | db.commit() |
| | | db.refresh(dialog) |