Merge branch 'main'

This commit is contained in:
ziming 2023-09-25 22:24:09 +08:00
commit c18f384356
17 changed files with 373 additions and 20 deletions

View file

@ -8,7 +8,7 @@
import pytest
from metagpt.actions.write_code import WriteCode
from metagpt.llm import LLM
import metagpt.llm as LLM
from metagpt.logs import logger
from tests.metagpt.actions.mock import TASKS_2, WRITE_CODE_PROMPT_SAMPLE
@ -29,6 +29,6 @@ async def test_write_code():
@pytest.mark.asyncio
async def test_write_code_directly():
prompt = WRITE_CODE_PROMPT_SAMPLE + '\n' + TASKS_2[0]
llm = LLM()
llm=LLM.DEFAULT_LLM
rsp = await llm.aask(prompt)
logger.info(rsp)

View file

@ -16,7 +16,7 @@ DETAIL_REQUIREMENT = """需求开发一个基于LLM大语言模型
3. 私有知识库支持pdfwordtxt等各种文件格式上传上传后可以在服务端解析为文本存储ES
资源
1. 大语言模型已经有前置的抽象部署可以通过 `from metagpt.llm import LLM`再使用`LLM().ask(prompt)`直接调用
1. 大语言模型已经有前置的抽象部署可以通过 `import metagpt.llm as LLM`再使用`LLM().ask(prompt)`直接调用
2. Elastic已有[部署](http://192.168.50.82:9200/)代码可以直接使用这个部署"""

View file

@ -8,7 +8,7 @@
import pytest
from metagpt.llm import LLM
import metagpt.llm as LLM
@pytest.fixture()