logo
Entwicklung
Suchen
LogTree abfragen

LogTree abfragen

Über diese Schnittstelle können Sie anhand der Nachrichten-ID die zugehörigen LogTree-Trace-Daten abfragen.

Anfragemethode

GET

Endpoint

https://api-${endpoint}.gptbots.ai/v1/bot/logtree/query

Authentifizierung

Siehe API-Übersicht für Authentifizierungsanweisungen.

Anfrage

Beispielanfrage

curl -X GET 'https://api-${endpoint}.gptbots.ai/v1/bot/logtree/query?msgid=6a475fa11d276b3d062a1be8' \ -H 'Authorization: Bearer ${API Key}'
                      
                      curl -X GET 'https://api-${endpoint}.gptbots.ai/v1/bot/logtree/query?msgid=6a475fa11d276b3d062a1be8' \
-H 'Authorization: Bearer ${API Key}'

                    
Dieser Codeblock im schwebenden Fenster

Anfrage-Header

Feld Typ Beschreibung
Authorization Bearer ${API Key} Verwenden Sie Authorization: Bearer ${API Key} für die Authentifizierung. Den API-Schlüssel erhalten Sie auf der API-Schlüssel-Seite.

Anfrageparameter

Feld Typ Erforderlich Beschreibung
msgid String Ja Nachrichten-ID, in der Regel die von der Konversations-API zurückgegebene message_id.

Antwort

Beispielantwort

{ "treeData": [ { "children": null, "actionId": "START_001", "traceId": "lyyqYMnfFSW5vWF5qdj5lR0t0DpjQR3icJi1lxm2CvUWpW8oI1-1783062433496", "msgId": "6a475fa11d276b3d062a1be8", "botId": "664ed07a277ef442b132feba", "logComponentId": "1lwSWOnjxuQK", "logComponentName": "Start", "logComponentTitle": null, "logComponentType": "Start", "isComponent": true, "actionType": "Start", "actionName": "Start", "startTimestampMillis": 1783062433496, "endTimestampMillis": 1783062433654, "runningStatus": "SUCCESS", "latencyMillis": 0, "input": { "content": [ { "type": "Text", "text": "1+1=?" } ] }, "output": { "content": [ { "type": "Text", "text": "1+1=?" } ] }, "inputTokens": 0, "outputTokens": 0, "totalTokens": "0", "extension": "{}", "createTime": 1783062433679, "uuid": "e53dcbb9-07d1-4019-9b66-e9d32b28bcbf", "workflowExecutionId": "", "parentId": "1lwSWOnjxuQK" } ], "summary": { "runningStatus": "SUCCESS", "botId": "664ed07a277ef442b132feba", "startTimestampMillis": 1783062433498, "endTimestampMillis": 1783062434933, "totalLatencyMillis": 1437, "totalTokens": 34, "stepCount": 3, "credit": -0.0031 }, "msgId": "6a475fa11d276b3d062a1be8", "conversationId": "6a475fa11d276b3d062a1be5", "traceId": "lyyqYMnfFSW5vWF5qdj5lR0t0DpjQR3icJi1lxm2CvUWpW8oI1-1783062433496" }
                      
                      {
  "treeData": [
    {
      "children": null,
      "actionId": "START_001",
      "traceId": "lyyqYMnfFSW5vWF5qdj5lR0t0DpjQR3icJi1lxm2CvUWpW8oI1-1783062433496",
      "msgId": "6a475fa11d276b3d062a1be8",
      "botId": "664ed07a277ef442b132feba",
      "logComponentId": "1lwSWOnjxuQK",
      "logComponentName": "Start",
      "logComponentTitle": null,
      "logComponentType": "Start",
      "isComponent": true,
      "actionType": "Start",
      "actionName": "Start",
      "startTimestampMillis": 1783062433496,
      "endTimestampMillis": 1783062433654,
      "runningStatus": "SUCCESS",
      "latencyMillis": 0,
      "input": {
        "content": [
          {
            "type": "Text",
            "text": "1+1=?"
          }
        ]
      },
      "output": {
        "content": [
          {
            "type": "Text",
            "text": "1+1=?"
          }
        ]
      },
      "inputTokens": 0,
      "outputTokens": 0,
      "totalTokens": "0",
      "extension": "{}",
      "createTime": 1783062433679,
      "uuid": "e53dcbb9-07d1-4019-9b66-e9d32b28bcbf",
      "workflowExecutionId": "",
      "parentId": "1lwSWOnjxuQK"
    }
  ],
  "summary": {
    "runningStatus": "SUCCESS",
    "botId": "664ed07a277ef442b132feba",
    "startTimestampMillis": 1783062433498,
    "endTimestampMillis": 1783062434933,
    "totalLatencyMillis": 1437,
    "totalTokens": 34,
    "stepCount": 3,
    "credit": -0.0031
  },
  "msgId": "6a475fa11d276b3d062a1be8",
  "conversationId": "6a475fa11d276b3d062a1be5",
  "traceId": "lyyqYMnfFSW5vWF5qdj5lR0t0DpjQR3icJi1lxm2CvUWpW8oI1-1783062433496"
}

                    
Dieser Codeblock im schwebenden Fenster

Erfolgreiche Antwort

Feld Typ Beschreibung
treeData Array<Object> Liste der LogTree-Knoten; die Knotenparameter finden Sie in der folgenden Tabelle. Kann null sein, wenn keine Trace-Daten vorliegen.
summary Object Zusammenfassung auf Nachrichtenebene. Kann null sein, wenn keine Trace-Daten vorliegen.
runningStatus String Gesamtausführungsstatus, z. B. SUCCESS, FAILED, RUNNING.
botId String Agent-ID.
startTimestampMillis Long Startzeitstempel in Millisekunden.
endTimestampMillis Long Endzeitstempel in Millisekunden.
totalLatencyMillis Long Gesamtdauer in Millisekunden.
totalTokens Long Gesamtanzahl der Token.
stepCount Integer Anzahl der Schritte, abgeleitet aus der Anzahl der zurückgegebenen LogTree-Knoten.
credit Number Verbrauchte Credits. Kann null sein, wenn keine Credit-Daten vorliegen.
msgId String Nachrichten-ID.
conversationId String Konversations-ID.
traceId String Trace-ID.

treeData-Knotenparameter

Feld Typ Beschreibung
children Array<Object> Untergeordnete Knoten mit derselben Struktur wie in dieser Tabelle. Kann bei Blattknoten null sein.
actionId String Action-ID.
traceId String Trace-ID.
msgId String Nachrichten-ID.
botId String Agent-ID.
logComponentId String Komponenten-ID.
logComponentName String Komponentenname.
logComponentTitle String Komponententitel.
logComponentType String Komponententyp.
isComponent Boolean Ob der Knoten ein Komponentenknoten ist.
actionType String Action-Typ.
actionName String Action-Name.
runningStatus String Ausführungsstatus des Knotens.
startTimestampMillis Long Startzeitstempel des Knotens in Millisekunden.
endTimestampMillis Long Endzeitstempel des Knotens in Millisekunden.
latencyMillis Long Dauer des Knotens in Millisekunden.
input Object/String/Array Eingabe des Knotens.
output Object/String/Array Ausgabe des Knotens.
inputTokens Integer Anzahl der Eingabe-Token.
outputTokens Integer Anzahl der Ausgabe-Token.
totalTokens Integer/String Gesamtanzahl der Token, entsprechend dem bestehenden LogTree-Rückgabetyp.
extension String/Object Erweiterungsinformationen.
createTime Long Erstellungszeitstempel in Millisekunden.
uuid String Eindeutige Kennung des Knotens.
workflowExecutionId String Workflow-Ausführungs-ID.
parentId String ID des übergeordneten Knotens.

Fehlerantwort

Feld Typ Beschreibung
code Integer Fehlercode.
message String Fehlerdetails.