From 038b7a75d8d17b3dc8823e990b0a45faa49892b4 Mon Sep 17 00:00:00 2001 From: Chandrani H Date: Sat, 8 Apr 2023 15:34:23 +0530 Subject: [PATCH] fix: updated chatbot to take dag as dict --- server/api/chatbot.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/api/chatbot.py b/server/api/chatbot.py index eb6b7fb..b782306 100644 --- a/server/api/chatbot.py +++ b/server/api/chatbot.py @@ -10,15 +10,14 @@ class ChatBotModel(BaseModel): name: str - created_by: str - dag: str + dag: dict @chatbot_router.post("/", status_code=200) def create_chatbot(inputs: ChatBotModel, token: Annotated[str, Header()], db: Session = Depends(database.db_session)): username = get_user_from_jwt(token) verify_user(username) try: - chatbot = ChatBot(name=inputs.name, created_by=inputs.created_by, dag=inputs.dag) + chatbot = ChatBot(name=inputs.name, created_by=username, dag=inputs.dag) db.add(chatbot) db.commit() response = {"msg": "success"}