diff --git a/memgpt/llm_api/openai.py b/memgpt/llm_api/openai.py index e7001d63e4..653d3f14a2 100644 --- a/memgpt/llm_api/openai.py +++ b/memgpt/llm_api/openai.py @@ -252,7 +252,7 @@ def _sse_post(url: str, data: dict, headers: dict) -> Generator[ChatCompletionCh # Inspect for errors before iterating (see https://github.com/florimondmanca/httpx-sse/pull/12) if not event_source.response.is_success: # handle errors - from utils import printd + from memgpt.utils import printd printd("Caught error before iterating SSE request:", vars(event_source.response)) printd(event_source.response.read()) diff --git a/memgpt/server/rest_api/agents/message.py b/memgpt/server/rest_api/agents/message.py index 45db2defe5..76c651c6d3 100644 --- a/memgpt/server/rest_api/agents/message.py +++ b/memgpt/server/rest_api/agents/message.py @@ -95,6 +95,7 @@ async def send_message_to_agent( ) -> Union[StreamingResponse, UserMessageResponse]: """Split off into a separate function so that it can be imported in the /chat/completion proxy.""" + include_final_message = True # handle the legacy mode streaming if stream_legacy: # NOTE: override