Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

2.8 KB
Raw Blame
{
  "contextTree": [
    {
      "id": "msg-1",
      "type": "message"
    },
    {
      "children": [
        {
          "id": "msg-2",
          "type": "message",
          "tools": ["tool-1"]
        },
        {
          "id": "msg-3",
          "type": "message"
        }
      ],
      "id": "msg-2",
      "type": "assistantGroup"
    },
    {
      "id": "msg-4",
      "type": "message"
    }
  ],
  "flatList": [
    {
      "id": "msg-1",
      "role": "user",
      "content": "What's the weather?",
      "createdAt": 1000,
      "updatedAt": 1000
    },
    {
      "id": "msg-2",
      "role": "assistantGroup",
      "content": "",
      "createdAt": 2000,
      "updatedAt": 2000,
      "parentId": "msg-1",
      "children": [
        {
          "content": "Let me check the weather for you.",
          "id": "msg-2",
          "tools": [
            {
              "id": "tool-1",
              "type": "default",
              "apiName": "getWeather",
              "identifier": "weather",
              "arguments": "{\"location\":\"New York\"}",
              "result": {
                "content": "{\"temperature\":\"72F\",\"condition\":\"sunny\"}",
                "id": "tool-1"
              },
              "result_msg_id": "tool-1"
            }
          ]
        },
        {
          "content": "The weather in New York is 72F and sunny.",
          "id": "msg-3"
        }
      ]
    },
    {
      "id": "msg-4",
      "role": "user",
      "content": "Thanks! How about tomorrow?",
      "createdAt": 5000,
      "updatedAt": 5000,
      "parentId": "msg-3"
    }
  ],
  "messageMap": {
    "msg-1": {
      "id": "msg-1",
      "role": "user",
      "content": "What's the weather?",
      "createdAt": 1000,
      "updatedAt": 1000
    },
    "msg-2": {
      "id": "msg-2",
      "role": "assistant",
      "content": "Let me check the weather for you.",
      "createdAt": 2000,
      "updatedAt": 2000,
      "parentId": "msg-1",
      "tools": [
        {
          "id": "tool-1",
          "type": "default",
          "apiName": "getWeather",
          "identifier": "weather",
          "arguments": "{\"location\":\"New York\"}"
        }
      ]
    },
    "tool-1": {
      "id": "tool-1",
      "role": "tool",
      "content": "{\"temperature\":\"72F\",\"condition\":\"sunny\"}",
      "createdAt": 3000,
      "updatedAt": 3000,
      "parentId": "msg-2",
      "tool_call_id": "tool-1"
    },
    "msg-3": {
      "id": "msg-3",
      "role": "assistant",
      "content": "The weather in New York is 72F and sunny.",
      "createdAt": 4000,
      "updatedAt": 4000,
      "parentId": "tool-1"
    },
    "msg-4": {
      "id": "msg-4",
      "role": "user",
      "content": "Thanks! How about tomorrow?",
      "createdAt": 5000,
      "updatedAt": 5000,
      "parentId": "msg-3"
    }
  }
}