Browse Source

Xunfei supports system prompt(character_desc).

master
6vision 3 months ago
parent
commit
21efd17c17
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      bot/xunfei/xunfei_spark_bot.py

+ 2
- 2
bot/xunfei/xunfei_spark_bot.py View File

@@ -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…
Cancel
Save