letta icon indicating copy to clipboard operation
letta copied to clipboard

letta server API errors / responses

Open quantumalchemy opened this issue 5 months ago • 4 comments

Describe the bug on a typical round letta / memgpt server returns -->

data: [DONE_GEN] data: {"id":"message-291c206c-2fe8-4328-b80f-13762b2e26a8","date":"2024-09-25T19:52:05+00:00","message_type":"internal_monologue","internal_monologue":"This is my internal monologue."} data: {"id":"message-291c206c-2fe8-4328-b80f-13762b2e26a8","date":"2024-09-25T19:52:05+00:00","message_type":"function_call","function_call":{"name":"send_message","arguments":"{\n  \"message\": \"This my message via send_message \"\n}"}} data: {"id":"message-00aaca81-8034-4404-b4bc-33b84cf4c91b","date":"2024-09-25T19:52:05+00:00","message_type":"function_return","function_return":"None","status":"success"} data: [DONE_STEP] data: [DONE]

I want to isolate --> **send_message -> {\n  "message": "The agent message via send_message "\n} *** Without resorting to insane rounds Hacky-ass cleaning functions I wont even bother to include to remove then convert to valid json

*** Is there an existing function in memgpt or does anyone have a trick to parse this waky thing? looking in the codebase UI client as it seems to work ok. cant find it - thanks!

quantumalchemy avatar Sep 27 '24 16:09 quantumalchemy