mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-03 12:52:37 +02:00
update ut of dashscope
This commit is contained in:
parent
655ba5647b
commit
6893f78c21
1 changed files with 14 additions and 2 deletions
|
|
@ -23,14 +23,26 @@ resp_cont = resp_cont_tmpl.format(name=name)
|
|||
|
||||
@classmethod
|
||||
def mock_dashscope_call(
|
||||
cls, messages: list[dict], model: str, api_key: str, result_format: str, stream: bool = False
|
||||
cls,
|
||||
messages: list[dict],
|
||||
model: str,
|
||||
api_key: str,
|
||||
result_format: str,
|
||||
incremental_output: bool = True,
|
||||
stream: bool = False,
|
||||
) -> GenerationResponse:
|
||||
return get_dashscope_response(name)
|
||||
|
||||
|
||||
@classmethod
|
||||
async def mock_dashscope_acall(
|
||||
cls, messages: list[dict], model: str, api_key: str, result_format: str, stream: bool = False
|
||||
cls,
|
||||
messages: list[dict],
|
||||
model: str,
|
||||
api_key: str,
|
||||
result_format: str,
|
||||
incremental_output: bool = True,
|
||||
stream: bool = False,
|
||||
) -> Union[AsyncGenerator[GenerationResponse, None], GenerationResponse]:
|
||||
resps = [get_dashscope_response(name)]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue