-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(conversation-conmerce-agent): add use case for food search
Change-Id: Ie4d99efbd94048702a36f8c80c8a8f86b9c50783 GitOrigin-RevId: 609b8f78c1e7bdb24e84c68b177c9ffd63d94f20
- Loading branch information
1 parent
bd39ec8
commit dbed8ae
Showing
31 changed files
with
2,605 additions
and
0 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
.../conversational-commerce-agent/conversational-agent-examples/assets/food-agent/agent.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"displayName": "Food", | ||
"defaultLanguageCode": "en", | ||
"timeZone": "America/Los_Angeles", | ||
"enableLogging": true, | ||
"projectNumber": 19651678978, | ||
"speechToTextSettings": { | ||
|
||
}, | ||
"enableStackdriverLogging": true, | ||
"advancedSettings": { | ||
"audioExportGcsDestination": { | ||
|
||
}, | ||
"speechSettings": { | ||
"endpointerSensitivity": 90, | ||
"noSpeechTimeout": { | ||
"seconds": 5 | ||
} | ||
}, | ||
"playbackInterruptionSettings": { | ||
|
||
}, | ||
"loggingSettings": { | ||
"enableStackdriverLogging": true, | ||
"enableInteractionLogging": true | ||
} | ||
}, | ||
"speakerIdSettings": { | ||
|
||
}, | ||
"textToSpeechSettings": { | ||
|
||
}, | ||
"duplexSettings": { | ||
|
||
}, | ||
"answerFeedbackSettings": { | ||
|
||
}, | ||
"startPlaybook": "Greetings", | ||
"webClientSettings": { | ||
"boxBorderRadius": "0" | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
...ational-agent-examples/assets/food-agent/flows/Default Start Flow/Default Start Flow.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"name": "00000000-0000-0000-0000-000000000000", | ||
"displayName": "Default Start Flow", | ||
"description": "A start flow created along with the agent", | ||
"transitionRoutes": [ { | ||
"intent": "Default Welcome Intent", | ||
"triggerFulfillment": { | ||
"messages": [ { | ||
"text": { | ||
"text": [ "Hi! How are you doing?", "Hello! How can I help you?", "Good day! What can I do for you today?", "Greetings! How can I assist?" ] | ||
}, | ||
"languageCode": "en" | ||
} ] | ||
}, | ||
"name": "87d5d1e7-df77-4ba2-b3e9-abddf3ef4fd7" | ||
} ], | ||
"eventHandlers": [ { | ||
"event": "sys.no-match-default", | ||
"triggerFulfillment": { | ||
"messages": [ { | ||
"text": { | ||
"text": [ "I didn't get that. Can you say it again?", "I missed what you said. What was that?", "Sorry, could you say that again?", "Sorry, can you say that again?", "Can you say that again?", "Sorry, I didn't get that. Can you rephrase?", "Sorry, what was that?", "One more time?", "What was that?", "Say that one more time?", "I didn't get that. Can you repeat?", "I missed that, say that again?" ] | ||
}, | ||
"languageCode": "en" | ||
} ] | ||
}, | ||
"name": "49a2be95-a61b-4f88-a2ca-7c03e31cc7b0" | ||
}, { | ||
"event": "sys.no-input-default", | ||
"triggerFulfillment": { | ||
"messages": [ { | ||
"text": { | ||
"text": [ "I didn't get that. Can you say it again?", "I missed what you said. What was that?", "Sorry, could you say that again?", "Sorry, can you say that again?", "Can you say that again?", "Sorry, I didn't get that. Can you rephrase?", "Sorry, what was that?", "One more time?", "What was that?", "Say that one more time?", "I didn't get that. Can you repeat?", "I missed that, say that again?" ] | ||
}, | ||
"languageCode": "en" | ||
} ] | ||
}, | ||
"name": "6780d0ad-19b4-485b-a576-63b683b3fe89" | ||
} ], | ||
"nluSettings": { | ||
"modelType": "MODEL_TYPE_ADVANCED", | ||
"classificationThreshold": 0.30000001 | ||
} | ||
} |
77 changes: 77 additions & 0 deletions
77
...commerce-agent/conversational-agent-examples/assets/food-agent/generativeSettings/en.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ | ||
"fallbackSettings": { | ||
"selectedPrompt": "Default" | ||
}, | ||
"generativeSafetySettings": { | ||
"raiSettings": { | ||
"categoryFilters": [ { | ||
"category": "DANGEROUS_CONTENT", | ||
"filterLevel": "BLOCK_FEW" | ||
}, { | ||
"category": "SEXUALLY_EXPLICIT_CONTENT", | ||
"filterLevel": "BLOCK_SOME" | ||
}, { | ||
"category": "HARASSMENT", | ||
"filterLevel": "BLOCK_SOME" | ||
}, { | ||
"category": "HATE_SPEECH", | ||
"filterLevel": "BLOCK_SOME" | ||
} ] | ||
}, | ||
"defaultRaiSettings": { | ||
"categoryFilters": [ { | ||
"category": "DANGEROUS_CONTENT", | ||
"filterLevel": "BLOCK_FEW" | ||
}, { | ||
"category": "SEXUALLY_EXPLICIT_CONTENT", | ||
"filterLevel": "BLOCK_SOME" | ||
}, { | ||
"category": "HARASSMENT", | ||
"filterLevel": "BLOCK_SOME" | ||
}, { | ||
"category": "HATE_SPEECH", | ||
"filterLevel": "BLOCK_SOME" | ||
} ] | ||
}, | ||
"responsibleAiFilters": [ { | ||
"category": "DANGEROUS_CONTENT", | ||
"filterLevel": "MINIMAL_BLOCKING" | ||
}, { | ||
"category": "SEXUALLY_EXPLICIT_CONTENT", | ||
"filterLevel": "MODERATE_BLOCKING" | ||
}, { | ||
"category": "HARASSMENT", | ||
"filterLevel": "MODERATE_BLOCKING" | ||
}, { | ||
"category": "HATE_SPEECH", | ||
"filterLevel": "MODERATE_BLOCKING" | ||
} ], | ||
"defaultResponsibleAiFilters": [ { | ||
"category": "DANGEROUS_CONTENT", | ||
"filterLevel": "MINIMAL_BLOCKING" | ||
}, { | ||
"category": "SEXUALLY_EXPLICIT_CONTENT", | ||
"filterLevel": "MODERATE_BLOCKING" | ||
}, { | ||
"category": "HARASSMENT", | ||
"filterLevel": "MODERATE_BLOCKING" | ||
}, { | ||
"category": "HATE_SPEECH", | ||
"filterLevel": "MODERATE_BLOCKING" | ||
} ] | ||
}, | ||
"languageCode": "en", | ||
"knowledgeConnectorSettings": { | ||
"mainLlmConfig": { | ||
|
||
} | ||
}, | ||
"llmModelSettings": { | ||
"model": "gemini-1.5-flash", | ||
"parameters": { | ||
"temperature": 1, | ||
"inputTokenLimit": "INPUT_TOKEN_LIMIT_LONG", | ||
"outputTokenLimit": "OUTPUT_TOKEN_LIMIT_LONG" | ||
} | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
...t-examples/assets/food-agent/intents/Default Negative Intent/Default Negative Intent.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "00000000-0000-0000-0000-000000000001", | ||
"displayName": "Default Negative Intent", | ||
"priority": 500000, | ||
"isFallback": true | ||
} |
6 changes: 6 additions & 0 deletions
6
...ent-examples/assets/food-agent/intents/Default Welcome Intent/Default Welcome Intent.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "00000000-0000-0000-0000-000000000000", | ||
"displayName": "Default Welcome Intent", | ||
"priority": 500000, | ||
"numTrainingPhrases": 16 | ||
} |
131 changes: 131 additions & 0 deletions
131
...l-agent-examples/assets/food-agent/intents/Default Welcome Intent/trainingPhrases/en.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
{ | ||
"trainingPhrases": [ { | ||
"id": "5d0625b0-68b6-497c-8933-83b920d2bf87", | ||
"parts": [ { | ||
"text": "just going to say hi", | ||
"auto": true | ||
} ], | ||
"repeatCount": 1, | ||
"languageCode": "en" | ||
}, { | ||
"id": "b07c0988-83ec-4a02-be05-8bb73ecbfba7", | ||
"parts": [ { | ||
"text": "heya", | ||
"auto": true | ||
} ], | ||
"repeatCount": 1, | ||
"languageCode": "en" | ||
}, { | ||
"id": "da9dfd34-ef0a-4fa4-b521-eb544b4177f3", | ||
"parts": [ { | ||
"text": "hello hi", | ||
"auto": true | ||
} ], | ||
"repeatCount": 1, | ||
"languageCode": "en" | ||
}, { | ||
"id": "37c67609-a20a-4c4e-964c-67c327ba8f08", | ||
"parts": [ { | ||
"text": "howdy", | ||
"auto": true | ||
} ], | ||
"repeatCount": 1, | ||
"languageCode": "en" | ||
}, { | ||
"id": "7b3a5c09-b81b-4ce6-b40d-f4a46d7839eb", | ||
"parts": [ { | ||
"text": "hey there", | ||
"auto": true | ||
} ], | ||
"repeatCount": 1, | ||
"languageCode": "en" | ||
}, { | ||
"id": "b41917a7-c56b-4c4e-a948-2ac7702d69da", | ||
"parts": [ { | ||
"text": "hi there", | ||
"auto": true | ||
} ], | ||
"repeatCount": 2, | ||
"languageCode": "en" | ||
}, { | ||
"id": "4becbf45-8086-409d-8b08-ab463ec5d535", | ||
"parts": [ { | ||
"text": "greetings", | ||
"auto": true | ||
} ], | ||
"repeatCount": 1, | ||
"languageCode": "en" | ||
}, { | ||
"id": "70c33f78-e1c9-4845-9ec6-47ee21bc70cf", | ||
"parts": [ { | ||
"text": "hey", | ||
"auto": true | ||
} ], | ||
"repeatCount": 1, | ||
"languageCode": "en" | ||
}, { | ||
"id": "b232bf7a-242d-46b4-93d0-95e17ffb716e", | ||
"parts": [ { | ||
"text": "long time no see", | ||
"auto": true | ||
} ], | ||
"repeatCount": 1, | ||
"languageCode": "en" | ||
}, { | ||
"id": "728ab48b-bf2c-486d-896e-6d809c35432c", | ||
"parts": [ { | ||
"text": "hello", | ||
"auto": true | ||
} ], | ||
"repeatCount": 1, | ||
"languageCode": "en" | ||
}, { | ||
"id": "7ce5e0ca-a351-4bc4-a7e6-97b5761af2eb", | ||
"parts": [ { | ||
"text": "lovely day isn't it", | ||
"auto": true | ||
} ], | ||
"repeatCount": 1, | ||
"languageCode": "en" | ||
}, { | ||
"id": "e753fd7d-8e85-40af-9907-d79e41ed3a10", | ||
"parts": [ { | ||
"text": "I greet you", | ||
"auto": true | ||
} ], | ||
"repeatCount": 1, | ||
"languageCode": "en" | ||
}, { | ||
"id": "01575ddf-ed97-4ba8-a6a0-9ffcc4fafd7f", | ||
"parts": [ { | ||
"text": "hello again", | ||
"auto": true | ||
} ], | ||
"repeatCount": 1, | ||
"languageCode": "en" | ||
}, { | ||
"id": "934b36c4-6683-4733-b12a-718a759b3891", | ||
"parts": [ { | ||
"text": "hi", | ||
"auto": true | ||
} ], | ||
"repeatCount": 1, | ||
"languageCode": "en" | ||
}, { | ||
"id": "dbc0c728-7d1f-4c7d-9ada-8c8199f116fc", | ||
"parts": [ { | ||
"text": "hello there", | ||
"auto": true | ||
} ], | ||
"repeatCount": 1, | ||
"languageCode": "en" | ||
}, { | ||
"id": "e2cd232f-504a-459d-9b45-a6923695445b", | ||
"parts": [ { | ||
"text": "a good day", | ||
"auto": true | ||
} ], | ||
"repeatCount": 1, | ||
"languageCode": "en" | ||
} ] | ||
} |
49 changes: 49 additions & 0 deletions
49
...-agent/conversational-agent-examples/assets/food-agent/playbooks/Check out/Check out.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"name": "c4d90f48-437d-40eb-9283-c85d9e5b9771", | ||
"displayName": "Check out", | ||
"goal": "Display the customer all the food they have ordered with payment option. Complement the customer for their order.\n\n- Customer's final order in $order", | ||
"inputParameterDefinitions": [ { | ||
"name": "shopping_cart", | ||
"description": "Customer's shopping cart", | ||
"typeSchema": { | ||
"inlineSchema": { | ||
"type": "ARRAY", | ||
"items": { | ||
"inlineSchema": { | ||
"type": "STRING" | ||
} | ||
} | ||
} | ||
} | ||
}, { | ||
"name": "dessert", | ||
"description": "Customer's dessert", | ||
"typeSchema": { | ||
"inlineSchema": { | ||
"type": "ARRAY", | ||
"items": { | ||
"inlineSchema": { | ||
"type": "STRING" | ||
} | ||
} | ||
} | ||
} | ||
} ], | ||
"tokenCount": 119, | ||
"referencedTools": [ "shopping_cart" ], | ||
"instruction": { | ||
"steps": [ { | ||
"text": "Ask the customer to use Google Pay for payment." | ||
}, { | ||
"text": "Combine $shopping_cart and $dessert", | ||
"steps": [ { | ||
"text": "Use the combined variable to invoke ${TOOL:shopping_cart} with request to show shopping cart items to the customer." | ||
} ] | ||
}, { | ||
"text": "end the conversation" | ||
} ] | ||
}, | ||
"codeBlock": { | ||
|
||
} | ||
} |
Oops, something went wrong.