refine comments

This commit is contained in:
geekan 2024-01-11 21:50:54 +08:00
parent 0e1c8da56d
commit 784732093e

View file

@ -26,14 +26,14 @@ from metagpt.provider.llm_provider_registry import register_provider
class SparkLLM(BaseLLM):
def __init__(self, config: LLMConfig):
self.config = config
logger.warning("当前方法无法支持异步运行。当你使用acompletion时并不能并行访问。")
logger.warning("SparkLLM当前方法无法支持异步运行。当你使用acompletion时并不能并行访问。")
def get_choice_text(self, rsp: dict) -> str:
return rsp["payload"]["choices"]["text"][-1]["content"]
async def acompletion_text(self, messages: list[dict], stream=False, timeout: int = 3) -> str:
# 不支持
logger.warning("当前方法无法支持异步运行。当你使用acompletion时并不能并行访问。")
# logger.warning("当前方法无法支持异步运行。当你使用acompletion时并不能并行访问。")
w = GetMessageFromWeb(messages, self.config)
return w.run()