Skip to content

Commit 038b7a7

Browse files
committed
fix: updated chatbot to take dag as dict
1 parent 97226b2 commit 038b7a7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

server/api/chatbot.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@
1010

1111
class ChatBotModel(BaseModel):
1212
name: str
13-
created_by: str
14-
dag: str
13+
dag: dict
1514

1615
@chatbot_router.post("/", status_code=200)
1716
def create_chatbot(inputs: ChatBotModel, token: Annotated[str, Header()], db: Session = Depends(database.db_session)):
1817
username = get_user_from_jwt(token)
1918
verify_user(username)
2019
try:
21-
chatbot = ChatBot(name=inputs.name, created_by=inputs.created_by, dag=inputs.dag)
20+
chatbot = ChatBot(name=inputs.name, created_by=username, dag=inputs.dag)
2221
db.add(chatbot)
2322
db.commit()
2423
response = {"msg": "success"}

0 commit comments

Comments
 (0)