add test config

This commit is contained in:
geekan 2024-01-09 16:01:05 +08:00
parent 50310734f9
commit 8ddd17da28

View file

@ -0,0 +1,21 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@Time : 2024/1/9 15:57
@Author : alexanderwu
@File : test_config.py
"""
from metagpt.config2 import Config, config
from metagpt.configs.llm_config import LLMType
def test_config_1():
cfg = Config.default()
llm = cfg.get_openai_llm()
assert llm is not None
assert llm.api_type == LLMType.OPENAI
def test_config_2():
assert config == Config.default()