mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-08 15:05:17 +02:00
feat: +acknowledge
This commit is contained in:
parent
16c1818582
commit
2363f94e8d
1 changed files with 8 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
from typing import Dict
|
||||
|
||||
import pytest
|
||||
|
||||
|
|
@ -9,6 +10,10 @@ from metagpt.schema import UserMessage
|
|||
from metagpt.tools.libs.software_development import import_git_repo
|
||||
|
||||
|
||||
async def get_env_description() -> Dict[str, str]:
|
||||
return {'await get_env(key="access_token", app_name="github")': "get the access token for github authentication."}
|
||||
|
||||
|
||||
@pytest.mark.skip
|
||||
@pytest.mark.asyncio
|
||||
async def test_import_repo():
|
||||
|
|
@ -31,6 +36,9 @@ async def test_git_create_issue(content: str):
|
|||
|
||||
prerequisite = "from metagpt.tools.libs import get_env"
|
||||
await di.execute_code.run(code=prerequisite, language="python")
|
||||
usage = await get_env_description()
|
||||
acknowledge = [f"- You can use `{k}` to '{v}'" for k, v in usage.items()]
|
||||
content += "\n---\n## Acknowledge\n" + "\n".join(acknowledge)
|
||||
di.put_message(UserMessage(content=content))
|
||||
while not di.is_idle:
|
||||
await di.run()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue