Coverage for examples/fixtures.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.8.0, created at 2025-04-19 12:16 +0000

1import os 1abcd

2from typing import Any 1abcd

3 

4 

5def openai_llm_config(model: str) -> dict[str, Any]: 1abcd

6 zeros = "0" * 20 1abcd

7 api_key = os.getenv("OPENAI_API_KEY", default=f"sk-{zeros}T3BlbkFJ{zeros}") 1abcd

8 

9 config_list = [ 1abcd

10 { 

11 "model": model, 

12 "api_key": api_key, 

13 } 

14 ] 

15 

16 llm_config = { 1abcd

17 "config_list": config_list, 

18 "temperature": 0.8, 

19 } 

20 

21 return llm_config 1abcd

22 

23 

24openai_gpt4o_llm_config = openai_llm_config("gpt-4o") 1abcd

25 

26openai_gpt4o_mini_llm_config = openai_llm_config("gpt-4o") 1abcd