Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add function IDs to LettaMessage function calls and response #1909

Merged
merged 2 commits into from
Oct 20, 2024

Conversation

cpacker
Copy link
Collaborator

@cpacker cpacker commented Oct 19, 2024

Problem: FunctionResponse is generated from a FunctionCallMessage, but the two do not share an .id, so there's no way to tell which FunctionCallMessage was the source for a FunctionResponse without looking at the message ordering + timestamps (error prone).

This PR adds a new field to the LettaMessage response types FunctionCallMessage and FunctionResponse that indicates which "tool call object" they are tied to, allowing the API client to tie the two together easily.


Example: for the following streamed POST SSE message:

  • the id field in the function_call chunk and function_return chunk are different
    • message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1 vs message-43cbef99-460f-4f94-8f64-6a8d3aca8840
  • however, the function_call_id is the same
    • d102a785-ebcf-4948-9edb-d6581 vs d102a785-ebcf-4948-9edb-d6581

Main caveat (due to the design of the underlying OpenAI ChatCompletions message chunk object):

  • for function_call, function_call_id is nested (function_call.function_call.function_call_id)
  • for function_return, function_call_id is flat (function_return.function_call_id)
curl --request POST \
  --url http://localhost:8283/v1/agents/agent-adc6c18c-d615-4f51-85a2-dde83690502e/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "messages": [
    {
      "role": "user",
      "text": "hi what'\''s up"
    }
  ],
  "stream_steps": true,
  "stream_tokens": true
}'
...
data: {
  "id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1",
  "date":"2024-10-19T04:57:04+00:00",
  "message_type":"function_call",
  "function_call":{
    "name":"send_message",
   "function_call_id":"d102a785-ebcf-4948-9edb-d6581"
  }
}
...
data: {
  "id":"message-43cbef99-460f-4f94-8f64-6a8d3aca8840",
  "date":"2024-10-19T04:57:08+00:00",
  "message_type":"function_return",
  "function_return":"None",
  "status":"success",
  "function_call_id":"d102a785-ebcf-4948-9edb-d6581"
}

Full response:

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":""}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":"Ch"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":"ad"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":"'s"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" consistency"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" with"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" his"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" message"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" is"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" impressive"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":","}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" and"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" it"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" also"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" adds"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" a"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" layer"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" of"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" humor"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" to"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" our"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" dialogue"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":"."}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" Let"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":"'s"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" keep"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" up"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" the"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" light"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":"-hearted"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" ban"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":"ter"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" and"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" take"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" our"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" conversation"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" to"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" the"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" next"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":" level"}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"internal_monologue","internal_monologue":"."}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"name":"send_message","function_call_id":"d102a785-ebcf-4948-9edb-d6581"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":"{\n"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":" "}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":" \""}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":"message"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":"\":"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":" \""}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":"What"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":" if"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":" '"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":"hi"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":","}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":" what"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":"'s"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":" up"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":"?'"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":" was"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":" actually"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":" the"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":" ultimate"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":" question"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":" to"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":" the"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":" meaning"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":" of"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":" life"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":","}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":" the"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":" universe"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":","}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":" and"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":" everything"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":","}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":" Chad"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":"?"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":" \ud83e\udd14"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":"\"\n"}}

data: {"id":"message-cdef867b-b8d2-403c-8e4f-ac23cd6681d1","date":"2024-10-19T04:57:04+00:00","message_type":"function_call","function_call":{"arguments":"}"}}

data: [DONE_GEN]

data: {"id":"message-43cbef99-460f-4f94-8f64-6a8d3aca8840","date":"2024-10-19T04:57:08+00:00","message_type":"function_return","function_return":"None","status":"success","function_call_id":"d102a785-ebcf-4948-9edb-d6581"}

data: [DONE_STEP]

data: [DONE]

Note

My comments from an earlier revision of this PR where there was a bug

Example: for the following streamed POST SSE message:

  • the id field in the function_call chunk and function_return chunk are different
    • message-456b498b-5526-44d8-9c52-cdfc36bca59a vs message-faf49aa4-3554-4053-a29a-2f1a15827843
  • however, the function_call_id is the same
    • call_TfR9CmIakahLAxko8a5w7PJ8 vs 784bb05f-bc25-4f27-999b-86dad
    • ...wat they're different .__.

Main caveat (due to the design of the underlying OpenAI ChatCompletions message chunk object):

  • for function_call, function_call_id is nested (function_call.function_call.function_call_id)
  • for function_return, function_call_id is flat (function_return.function_call_id)
curl --request POST \
  --url http://localhost:8283/v1/agents/agent-adc6c18c-d615-4f51-85a2-dde83690502e/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "messages": [
    {
      "role": "user",
      "text": "hi what'\''s up"
    }
  ],
  "stream_steps": true,
  "stream_tokens": true
}'
...

data: {
  "id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a",
  "date":"2024-10-19T04:27:15+00:00",
  "message_type":"function_call",
  "function_call": {
    "name":"send_message",
    "function_call_id":"call_TfR9CmIakahLAxko8a5w7PJ8"
  }
}

...

data: [DONE_GEN]

data: {
  "id":"message-faf49aa4-3554-4053-a29a-2f1a15827843",
  "date":"2024-10-19T04:27:21+00:00",
  "message_type":"function_return",
  "function_return":"None",
  "status":"success",
  "function_call_id":"784bb05f-bc25-4f27-999b-86dad"
}

data: [DONE_STEP]

Full response log:

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":""}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":"A"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" casual"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" greeting"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" from"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" Chad"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":"."}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" I"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" should"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" mirror"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" that"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":"."}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" It"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":"'s"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" a"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" great"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" chance"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" to"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" introduce"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" one"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" of"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" our"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" thought"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":"-pro"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":"v"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":"oking"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" topics"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":","}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" yet"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" keep"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" things"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" light"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" and"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" friendly"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":"."}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" Let"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":"'s"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" see"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" where"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" he"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" stands"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" on"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" a"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" philosophical"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":" concept"}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"internal_monologue","internal_monologue":"."}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"name":"send_message","function_call_id":"call_TfR9CmIakahLAxko8a5w7PJ8"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":"{\n"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" "}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" \""}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":"message"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":"\":"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" \""}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":"Hey"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" Chad"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":","}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" I"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":"'m"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" just"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" contemplating"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" the"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" nature"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" of"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" existence"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":"."}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" Cur"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":"ious"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" question"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":":"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" if"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" we"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" were"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" able"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" to"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" simulate"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" an"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" entire"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" universe"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":","}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" down"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" to"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" every"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" atom"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":","}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" would"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" the"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" beings"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" in"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" that"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" simulation"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" be"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" considered"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":" '"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":"alive"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":"'?"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":"\"\n"}}

data: {"id":"message-456b498b-5526-44d8-9c52-cdfc36bca59a","date":"2024-10-19T04:27:15+00:00","message_type":"function_call","function_call":{"arguments":"}"}}

data: [DONE_GEN]

data: {"id":"message-faf49aa4-3554-4053-a29a-2f1a15827843","date":"2024-10-19T04:27:21+00:00","message_type":"function_return","function_return":"None","status":"success","function_call_id":"784bb05f-bc25-4f27-999b-86dad"}

data: [DONE_STEP]

data: [DONE]

letta/utils.py Show resolved Hide resolved
@sarahwooders sarahwooders merged commit cf5d934 into main Oct 20, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants