mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-08 15:05:17 +02:00
fixed
This commit is contained in:
parent
5709e48713
commit
6997ddc49c
2 changed files with 2 additions and 1 deletions
|
|
@ -10,7 +10,7 @@ from metagpt.provider.anthropic_api import Claude2 as Claude
|
|||
from metagpt.provider.openai_api import OpenAIGPTAPI as LLM
|
||||
from metagpt.provider.spark_api import Spark
|
||||
|
||||
DEFAULT_LLM = LLM()
|
||||
DEFAULT_LLM = Spark()
|
||||
|
||||
async def ai_func(prompt):
|
||||
"""使用LLM进行QA
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ class Spark:
|
|||
|
||||
def _default_system_msg(self):
|
||||
return self._system_msg(self.system_prompt)
|
||||
|
||||
def ask(self, msg: str):
|
||||
message = [self._user_msg(msg)]
|
||||
SparkApi.main(CONFIG.xinghuo_appid,CONFIG.xinghuo_api_key,CONFIG.xinghuo_api_secret,"ws://spark-api.xf-yun.com/v2.1/chat","generalv2",message)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue