mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-08 15:05:17 +02:00
merge main
This commit is contained in:
commit
242bbbc13a
110 changed files with 959 additions and 253 deletions
|
|
@ -7,13 +7,14 @@
|
|||
"""
|
||||
import asyncio
|
||||
|
||||
from metagpt.llm import LLM, Claude
|
||||
from metagpt.logs import logger
|
||||
from metagpt.llm import LLM
|
||||
|
||||
|
||||
async def main():
|
||||
llm = LLM()
|
||||
|
||||
claude = Claude()
|
||||
logger.info(await claude.aask('你好,请进行自我介绍'))
|
||||
logger.info(await llm.aask('hello world'))
|
||||
logger.info(await llm.aask_batch(['hi', 'write python hello world.']))
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
"""
|
||||
|
||||
import asyncio
|
||||
from metagpt.config import Config
|
||||
|
||||
from metagpt.roles import Searcher
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,10 +4,11 @@
|
|||
@File : search_kb.py
|
||||
"""
|
||||
import asyncio
|
||||
|
||||
from metagpt.const import DATA_PATH
|
||||
from metagpt.document_store import FaissStore
|
||||
from metagpt.roles import Sales
|
||||
from metagpt.logs import logger
|
||||
from metagpt.roles import Sales
|
||||
|
||||
|
||||
async def search():
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
import asyncio
|
||||
from metagpt.config import Config
|
||||
|
||||
from metagpt.roles import Searcher
|
||||
from metagpt.tools import SearchEngineType
|
||||
|
||||
|
||||
async def main():
|
||||
# Serper API
|
||||
await Searcher(engine = SearchEngineType.SERPER_GOOGLE).run(["What are some good sun protection products?","What are some of the best beaches?"])
|
||||
# Serper API
|
||||
#await Searcher(engine = SearchEngineType.SERPAPI_GOOGLE).run("What are the best ski brands for skiers?")
|
||||
# await Searcher(engine=SearchEngineType.SERPAPI_GOOGLE).run("What are the best ski brands for skiers?")
|
||||
# Google API
|
||||
#await Searcher(engine = SearchEngineType.DIRECT_GOOGLE).run("What are the most interesting human facts?")
|
||||
# await Searcher(engine=SearchEngineType.DIRECT_GOOGLE).run("What are the most interesting human facts?")
|
||||
|
||||
if __name__ == '__main__':
|
||||
asyncio.run(main())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue