瀏覽代碼

Xunfei supports system prompt(character_desc).

master
6vision 7 月之前
父節點
當前提交
21efd17c17
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      bot/xunfei/xunfei_spark_bot.py

+ 2
- 2
bot/xunfei/xunfei_spark_bot.py 查看文件

@@ -3,7 +3,7 @@
import requests, json import requests, json
from bot.bot import Bot from bot.bot import Bot
from bot.session_manager import SessionManager from bot.session_manager import SessionManager
from bot.baidu.baidu_wenxin_session import BaiduWenxinSession
from bot.chatgpt.chat_gpt_session import ChatGPTSession
from bridge.context import ContextType, Context from bridge.context import ContextType, Context
from bridge.reply import Reply, ReplyType from bridge.reply import Reply, ReplyType
from common.log import logger from common.log import logger
@@ -53,7 +53,7 @@ class XunFeiBot(Bot):
self.host = urlparse(self.spark_url).netloc self.host = urlparse(self.spark_url).netloc
self.path = urlparse(self.spark_url).path self.path = urlparse(self.spark_url).path
# 和wenxin使用相同的session机制 # 和wenxin使用相同的session机制
self.sessions = SessionManager(BaiduWenxinSession, model=const.XUNFEI)
self.sessions = SessionManager(ChatGPTSession, model=const.XUNFEI)


def reply(self, query, context: Context = None) -> Reply: def reply(self, query, context: Context = None) -> Reply:
if context.type == ContextType.TEXT: if context.type == ContextType.TEXT:


Loading…
取消
儲存