llm config mixin update

This commit is contained in:
geekan 2024-01-09 15:56:40 +08:00 committed by 莘权 马
parent 62677c37b7
commit cc893914c4
5 changed files with 61 additions and 25 deletions

View file

@ -61,3 +61,12 @@ def test_context_2():
kwargs.test_key = "test_value"
assert kwargs.test_key == "test_value"
def test_context_3():
ctx = Context()
ctx.use_llm(provider=LLMType.OPENAI)
assert ctx.llm_config is not None
assert ctx.llm_config.api_type == LLMType.OPENAI
assert ctx.llm is not None
assert "gpt" in ctx.llm.model