refine code

This commit is contained in:
geekan 2024-01-12 10:26:07 +08:00
parent 312d327d55
commit d150cc358a
20 changed files with 16 additions and 46 deletions

View file

@ -30,7 +30,6 @@ ALLOW_OPENAI_API_CALL = int(
@pytest.fixture(scope="session")
def rsp_cache():
# model_version = CONFIG.openai_api_model
rsp_cache_file_path = TEST_DATA_PATH / "rsp_cache.json" # read repo-provided
new_rsp_cache_file_path = TEST_DATA_PATH / "rsp_cache_new.json" # exporting a new copy
if os.path.exists(rsp_cache_file_path):

View file

@ -2,7 +2,6 @@
# -*- coding: utf-8 -*-
"""
@Desc : unittest of `metagpt/memory/longterm_memory.py`
@Modified By: mashenquan, 2023/8/20. Remove global configuration `CONFIG`, enable configuration support for business isolation.
"""
import os

View file

@ -82,6 +82,7 @@ async def test_zhipuai_acompletion(mocker):
def test_zhipuai_proxy():
# CONFIG.openai_proxy = "http://127.0.0.1:8080"
# it seems like zhipuai would be inflected by the proxy of openai, maybe it's a bug
# but someone may want to use openai.proxy, so we keep this test case
# assert openai.proxy == config.llm.proxy
_ = ZhiPuAILLM(mock_llm_config_zhipu)
# assert openai.proxy == CONFIG.openai_proxy

View file

@ -125,4 +125,3 @@ async def test_config_priority():
assert a3.llm.model == "gpt-3.5-turbo-1106"
# history = await team.run(idea="Topic: climate change. Under 80 words per message.", send_to="a1", n_round=3)
# assert "Alex" in history

View file

@ -4,8 +4,6 @@
@Time : 2023/5/12 00:47
@Author : alexanderwu
@File : test_environment.py
@Modified By: mashenquan, 2023/8/20. Remove global configuration `CONFIG`, enable configuration support for business isolation.
"""
from pathlib import Path

View file

@ -4,7 +4,6 @@
@Time : 2023/5/11 14:45
@Author : alexanderwu
@File : test_llm.py
@Modified By: mashenquan, 2023/8/20. Remove global configuration `CONFIG`, enable configuration support for business isolation.
"""
import pytest

View file

@ -1,6 +1,5 @@
"""
@Modified By: mashenquan, 2023/8/20. Remove global configuration `CONFIG`, enable configuration support for business isolation.
"""
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pytest

View file

@ -1,6 +1,5 @@
"""
@Modified By: mashenquan, 2023/8/20. Remove global configuration `CONFIG`, enable configuration support for business isolation.
"""
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pytest

View file

@ -1,6 +1,5 @@
"""
@Modified By: mashenquan, 2023/8/20. Remove global configuration `CONFIG`, enable configuration support for business isolation.
"""
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pytest