zhaoqingang
2024-11-22 600d2205367bf914dceaf97e6f082383aa54348c
app/api/chat.py
@@ -209,11 +209,11 @@
                question = message.get("message")
                try:
                    SessionService(db).create_session(
                        session_id=chat_id,
                        name=question,
                        agent_id=agent_id,
                        agent_type=AgentType.BASIC,
                        user_id=current_user.id
                        chat_id,
                        question,
                        agent_id,
                        AgentType.BASIC,
                        current_user.id
                    )
                except Exception as e:
                    logger.error(e)
@@ -237,7 +237,7 @@
                                                              message={"role": "assistant", "content": result})
                        except Exception as e:
                            logger.error(e)
                        logger.error("-----------------11111111--------------------")
                        logger.error("-----------------返回数据--------------------")
                        await websocket.send_json(result | data)
                    except Exception as e2: