diff --git a/memgpt/local_llm/chat_completion_proxy.py b/memgpt/local_llm/chat_completion_proxy.py index b6fa2a75..47b8c9d5 100644 --- a/memgpt/local_llm/chat_completion_proxy.py +++ b/memgpt/local_llm/chat_completion_proxy.py @@ -58,6 +58,10 @@ def get_chat_completion( global has_shown_warning grammar = None + # TODO: eventually just process Message object + if not isinstance(messages[0], dict): + messages = [m.to_openai_dict() for m in messages] + if function_call is not None and function_call != "auto": raise ValueError(f"function_call == {function_call} not supported (auto or None only)")