Resource: Example
Example represents a sample execution of the playbook in the conversation.
An example consists of a list of ordered actions performed by end user or Dialogflow agent according the playbook instructions to fulfill the task.
JSON representation |
---|
{ "name": string, "playbookInput": { object ( |
Fields | |
---|---|
name |
The unique identifier of the playbook example. Format: |
playbook |
Optional. The input to the playbook in the example. |
playbook |
Optional. The output of the playbook in the example. |
actions[] |
Required. The ordered list of actions performed by the end user and the Dialogflow agent. |
display |
Required. The display name of the example. |
description |
Optional. The high level concise description of the example. The max number of characters is 200. |
token |
Output only. Estimated number of tokes current example takes when sent to the LLM. |
create |
Output only. The timestamp of initial example creation. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
update |
Output only. Last time the example was updated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
conversation |
Required. Example's output state. |
language |
Optional. The language code of the example. If not specified, the agent's default language is used. Note: languages must be enabled in the agent before they can be used. Note: example's language code is not currently used in dialogflow agents. |
PlaybookInput
Input of the playbook.
JSON representation |
---|
{ "precedingConversationSummary": string, "actionParameters": { object } } |
Fields | |
---|---|
preceding |
Optional. Summary string of the preceding conversation for the child playbook invocation. |
action |
Optional. A list of input parameters for the action. |
PlaybookOutput
Output of the playbook.
JSON representation |
---|
{ "executionSummary": string, "actionParameters": { object } } |
Fields | |
---|---|
execution |
Optional. Summary string of the execution result of the child playbook. |
action |
Optional. A Struct object of output parameters for the action. |
Action
Action performed by end user or Dialogflow agent in the conversation.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field action . Action details. action can be only one of the following: |
|
user |
Optional. Agent obtained a message from the customer. |
agent |
Optional. Action performed by the agent as a message. |
tool |
Optional. Action performed on behalf of the agent by calling a plugin tool. |
playbook |
Optional. Action performed on behalf of the agent by invoking a child playbook. |
flow |
Optional. Action performed on behalf of the agent by invoking a CX flow. |
UserUtterance
UserUtterance represents one message sent by the customer.
JSON representation |
---|
{ "text": string } |
Fields | |
---|---|
text |
Required. Message content in text. |
AgentUtterance
AgentUtterance represents one message sent by the agent.
JSON representation |
---|
{ "text": string } |
Fields | |
---|---|
text |
Required. Message content in text. |
ToolUse
Stores metadata of the invocation of an action supported by a tool.
JSON representation |
---|
{ "tool": string, "action": string, "inputActionParameters": { object }, "outputActionParameters": { object } } |
Fields | |
---|---|
tool |
Required. The |
action |
Optional. Name of the action to be called during the tool use. |
input |
Optional. A list of input parameters for the action. |
output |
Optional. A list of output parameters generated by the action. |
PlaybookInvocation
Stores metadata of the invocation of a child playbook.
JSON representation |
---|
{ "playbook": string, "playbookInput": { object ( |
Fields | |
---|---|
playbook |
Required. The unique identifier of the playbook. Format: |
playbook |
Optional. Input of the child playbook invocation. |
playbook |
Optional. Output of the child playbook invocation. |
playbook |
Required. Playbook invocation's output state. |
OutputState
Output state.
Enums | |
---|---|
OUTPUT_STATE_UNSPECIFIED |
Unspecified output. |
OUTPUT_STATE_OK |
Succeeded. |
OUTPUT_STATE_CANCELLED |
Cancelled. |
OUTPUT_STATE_FAILED |
Failed. |
OUTPUT_STATE_ESCALATED |
Escalated. |
OUTPUT_STATE_PENDING |
Pending. |
FlowInvocation
Stores metadata of the invocation of a CX flow.
JSON representation |
---|
{
"flow": string,
"inputActionParameters": {
object
},
"outputActionParameters": {
object
},
"flowState": enum ( |
Fields | |
---|---|
flow |
Required. The unique identifier of the flow. Format: |
input |
Optional. A list of input parameters for the flow. |
output |
Optional. A list of output parameters generated by the flow invocation. |
flow |
Required. Flow invocation's output state. |
Methods |
|
---|---|
|
Creates an example in the specified playbook. |
|
Deletes the specified example. |
|
Retrieves the specified example. |
|
Returns a list of examples in the specified playbook. |
|
Update the specified example. |