跳至主要内容

REFERENCE

開發者參考

認證、API、SDK、Flow Agent 處理節點與參數取值的完整參考。

asgard.process.start

asgard.process.start 事件表示 process 請求的事件開始。並且 fact 中的 processStart 物件會列出這個 process 的完整設定參數資訊,這些資訊對於除錯或是客製化 UI 來說非常重要。

  1. 事件特性​

    • 觸發時機:當 process 請求的事件開始時
    • 作用:提供用戶可以從這邊來理解 process 會使用的設定參數等資訊
    • 頻率:每個請求只會觸發一次事件
  2. 完整範例​

    {
    "eventType": "asgard.process.start",
    "requestId": "6939c5a6c590d90c401e3850a1ff44f3",
    "namespace": "qa-7e301310-a594-xxxx-xxxx-xxxxxxxxxxxx",
    "botProviderName": "bpapi-d97c512f-f8dc-xxxx-xxxx-xxxxxxxxxxxx",
    "customChannelId": "ch-6xxxxxxxxxxxx",
    "fact": {
    "runInit": null,
    "runDone": null,
    "runError": null,
    "processStart": {
    "processId": "81ed7c38df488a6b",
    "task": {
    "channelMaxIdleMs": 86400000,
    "context": {
    "customChannelId": "ch-6xxxxxxxxxxxx",
    "customMessageId": "msg-6xxxxxxxxxxxx",
    "prevBlobs": [],
    "prevMessage": "Jurassic",
    "prevPayload": {}
    },
    "dynamicConfig": {},
    "dynamicConfigKeys": [],
    "isDebug": true,
    "isStreaming": true,
    "meta": {
    "botProviderName": "bpapi-d97c512f-f8dc-xxxx-xxxx-xxxxxxxxxxxx",
    "customChannelId": "ch-6xxxxxxxxxxxx",
    "customMessageId": "msg-6xxxxxxxxxxxx",
    "namespace": "qa-7e301310-a594-xxxx-xxxx-xxxxxxxxxxxx",
    "processorName": "processor-ompletion-b1d3e00c-f991-4a53-93f7-xxxxxxxxxxxx",
    "requestId": "6939c5a6c590d90c401e3850a1ff44f3",
    "type": "llm-completion",
    "workflowName": "wf-emoot-e85ed394-733c-47bd-906a-xxxxxxxxxxxx"
    },
    "staticConfig": {
    "blobs": [],
    "completionModel": {
    "metadata": {
    "annotations": {
    "asgard-ai.com/additional-annotation": "null",
    "asgard-ai.com/completion-model-name": "gpt-4o-mini",
    "asgard-ai.com/secret-name": "cm-secret-gpt4omini-4b2b31bb-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    },
    "creationTimestamp": "2025-05-16T03:27:24Z",
    "generation": 3,
    "labels": {
    "asgard-ai.com/completion-model-type": "openai-chat"
    },
    "managedFields": [
    {
    "apiVersion": "asgard-ai.com/v1alpha1",
    "fieldsType": "FieldsV1",
    "fieldsV1": {
    "f:metadata": {
    "f:annotations": {
    ".": {},
    "f:asgard-ai.com/additional-annotation": {},
    "f:asgard-ai.com/completion-model-name": {},
    "f:asgard-ai.com/secret-name": {}
    },
    "f:labels": {
    ".": {},
    "f:asgard-ai.com/completion-model-type": {}
    }
    },
    "f:spec": {
    ".": {},
    "f:completionModelClass": {},
    "f:openaiChat": {
    ".": {},
    "f:apiKey": {
    ".": {},
    "f:valueFrom": {
    ".": {},
    "f:secretKeyRef": {
    ".": {},
    "f:key": {},
    "f:name": {}
    }
    }
    },
    "f:model": {}
    }
    }
    },
    "manager": "server",
    "operation": "Update",
    "time": "2025-07-16T22:11:47Z"
    }
    ],
    "name": "cm-gpt4omini-4b2b31bb-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "namespace": "qa-7e301310-a594-xxxx-xxxx-xxxxxxxxxxxx",
    "resourceVersion": "239918449",
    "uid": "2f85c808-917e-xxxx-xxxx-xxxxxxxxxxxx"
    },
    "spec": {
    "anthropic": null,
    "aoaiChat": null,
    "completionModelClass": "openai-chat",
    "gemini": null,
    "mistral": null,
    "openaiChat": {
    "apiKey": {
    "value": "**********",
    "valueFrom": null
    },
    "endpoint": null,
    "model": "gpt-4o-mini-2024-07-18"
    }
    }
    },
    "maxTokens": 4096,
    "openai": {
    "webSearch": {
    "enabled": false,
    "searchContextSize": "medium"
    }
    },
    "outputSchema": {
    "properties": {
    "answer": {
    "description": "The answer you will provide to the customer.",
    "type": "string"
    }
    },
    "required": [
    "answer"
    ],
    "type": "object"
    },
    "prompt": "You are a smart chatbot. Use all your knowledge to answer customer questions.\n\n* Here is your conversation with the customer:\n\n```\n- bot: Welcome to the chat system.\n- user: Jurassic\n- bot: The Jurassic is a geologic period from about 201 million to 145 million years ago, known for the rise of dinosaurs.\n```",
    "semanticLayer": null,
    "semanticLayerAllowQuery": false,
    "semanticLayerDataConnectorClass": null,
    "temperature": null,
    "toolsetConfigs": []
    },
    "staticRelationship": {
    "failure": {
    "isTerminate": false
    },
    "success": {
    "isTerminate": false
    }
    },
    "unsupervisedStepCounter": 2
    }
    },
    "processComplete": null,
    "messageStart": null,
    "messageDelta": null,
    "messageComplete": null,
    "toolCallStart": null,
    "toolCallComplete": null
    }
    }

準備好開始了嗎?

想知道 Asgard 怎麼用在你的團隊?跟我們聊聊。

聯絡我們