Skip to content

Commit

Permalink
Fix structured output tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sternakt committed Dec 5, 2024
1 parent 5e15988 commit c40da67
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/agentchat/test_structured_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ class ResponseModel(BaseModel):
reasoning: str
difficulty: float

for config in config_list:
config["response_format"] = MathReasoning

llm_config = {"config_list": config_list, "cache_seed": 43}

user_proxy = autogen.UserProxyAgent(
Expand Down Expand Up @@ -84,13 +87,12 @@ def format(self) -> str:
@pytest.fixture
def mock_assistant():
"""Set up a mocked AssistantAgent with a predefined response format."""
config_list = [{"model": "gpt-4o", "api_key": MOCK_OPEN_AI_API_KEY}]
config_list = [{"model": "gpt-4o", "api_key": MOCK_OPEN_AI_API_KEY, "response_format": MathReasoning}]
llm_config = {"config_list": config_list, "cache_seed": 43}

assistant = autogen.AssistantAgent(
name="Assistant",
llm_config=llm_config,
response_format=MathReasoning,
)

oai_client_mock = MagicMock()
Expand Down

0 comments on commit c40da67

Please sign in to comment.