merge main

This commit is contained in:
leonzh0u 2023-07-23 17:02:02 -04:00
commit 242bbbc13a
110 changed files with 959 additions and 253 deletions

View file

@ -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.']))

View file

@ -7,7 +7,7 @@
"""
import asyncio
from metagpt.config import Config
from metagpt.roles import Searcher

View file

@ -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():

View file

@ -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())