mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-04-28 02:23:52 +02:00
fixbug: OpenAIGPTAPI:_achat_completion_stream
This commit is contained in:
parent
b445c3f4b6
commit
5d97a20e08
4 changed files with 358 additions and 357 deletions
|
|
@ -19,7 +19,8 @@ def llm():
|
|||
|
||||
@pytest.mark.asyncio
|
||||
async def test_llm_aask(llm):
|
||||
assert len(await llm.aask("hello world")) > 0
|
||||
rsp = await llm.aask("hello world", stream=False)
|
||||
assert len(rsp) > 0
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
|
@ -30,7 +31,8 @@ async def test_llm_aask_batch(llm):
|
|||
@pytest.mark.asyncio
|
||||
async def test_llm_acompletion(llm):
|
||||
hello_msg = [{"role": "user", "content": "hello"}]
|
||||
assert len(await llm.acompletion(hello_msg)) > 0
|
||||
rsp = await llm.acompletion(hello_msg)
|
||||
assert len(rsp.choices[0].message.content) > 0
|
||||
assert len(await llm.acompletion_batch([hello_msg])) > 0
|
||||
assert len(await llm.acompletion_batch_text([hello_msg])) > 0
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue