mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-20 15:38:09 +02:00
refine code. remove useless aio session, move lc parser to utils
This commit is contained in:
parent
e5b9633c62
commit
bcc29690e1
6 changed files with 36 additions and 96 deletions
|
|
@ -24,16 +24,3 @@ async def aask_batch(api: OpenAIGPTAPI):
|
|||
results = await api.aask_batch(['hi', 'write python hello world.'])
|
||||
logger.info(results)
|
||||
return results
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_custom_aio_session():
|
||||
logger.info("Start...")
|
||||
# 由于目前架设的https是自签署的,需要关闭ssl检验
|
||||
async with CustomAioSession():
|
||||
api = OpenAIGPTAPI()
|
||||
results = await try_hello(api)
|
||||
assert len(results) > 0
|
||||
results = await aask_batch(api)
|
||||
assert len(results) > 0
|
||||
logger.info("Done...")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue