mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-11 16:52:37 +02:00
add test config
This commit is contained in:
parent
cc893914c4
commit
39fb4b0e6f
1 changed files with 21 additions and 0 deletions
21
tests/metagpt/test_config.py
Normal file
21
tests/metagpt/test_config.py
Normal 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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue