Skip to content

Commit

Permalink
update (microsoft#1063)
Browse files Browse the repository at this point in the history
  • Loading branch information
yiranwu0 authored Dec 26, 2023
1 parent 5b420f1 commit 9b7a42f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion autogen/agentchat/conversable_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from ..code_utils import DEFAULT_MODEL, UNKNOWN, content_str, execute_code, extract_code, infer_lang
from ..function_utils import get_function_schema, load_basemodels_if_needed, serialize_to_str
from .agent import Agent
from .._pydantic import model_dump

try:
from termcolor import colored
Expand Down Expand Up @@ -640,7 +641,7 @@ def generate_oai_reply(
# TODO: line 301, line 271 is converting messages to dict. Can be removed after ChatCompletionMessage_to_dict is merged.
extracted_response = client.extract_text_or_completion_object(response)[0]
if not isinstance(extracted_response, str):
extracted_response = extracted_response.model_dump(mode="dict")
extracted_response = model_dump(extracted_response)
return True, extracted_response

async def a_generate_oai_reply(
Expand Down

0 comments on commit 9b7a42f

Please sign in to comment.