Skip to content

Commit

Permalink
feat(conversation-commerce-agent):update cuj
Browse files Browse the repository at this point in the history
Change-Id: Ic27aaae9942187ab33cf895e7f1b8bef033378c8
GitOrigin-RevId: 8d3a1ab5ef6b104091dfd65d75668c456e551825
  • Loading branch information
michael-chi authored and Copybara committed Jan 14, 2025
1 parent 93bfcf2 commit 9bdbfac
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

from utils import shopping_cart

_USER_AGENT = "cloud-solutions/conversational-commerce-agent-v0.0.1"
_USER_AGENT = "cloud-solutions/conversational-shopping-agent-v0.0.1"
TOML_PATH = os.getenv("CONFIG_TOML_PATH", "config.toml")
with open(TOML_PATH, "rb") as f:
config = tomllib.load(f)
Expand Down
25 changes: 25 additions & 0 deletions projects/conversational-commerce-agent/docs/demo-beauty.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Demo Script

| Role | Input / Output |
| :---- | :---- |
| Agent | Welcome to Cymbal Beauty\! I am your personal beauty assistant. How can I help you? |
| Rosalind | I am looking for a lightweight foundation. |
| Agent | Absolutely\! Your profile shows that you have a light-medium skin tone, and you prefer a natural look. May I toss in some suggestions that match those preferences of yours? |
| Rosalind | Sure |
| Agent | \[Product\]\[Product\]\[Product\] |
| Agent | Here are some lightweight foundations that might suit your preference for a natural look. Do any of these sound interesting? |
| Rosalind | Can you show products that don't include Gluten that cause irritation? It tends to cause breakouts for me. |
| Agent | \[Product\]\[Product\]\[Product\] |
| Here are some gluten-free and natural lightweight foundations. Let me know if you have any questions. | Here are some gluten-free and natural lightweight foundations. Let me know if you have any questions. |
| Rosalind | Do you have anything under $25? |
| Agent | \[Product\] |
| Agent | Here's a gluten-free and natural lightweight foundation under $25. Does this work for you? |
| Rosalind | Looks good. Is it paraben-free? |
| Agent | Yes. All our products are paraben-free. |
| Rosalind | Perfect\! I'll go with that. |
| Agent | Awesome choice\! Just a heads up for the best results – we highly recommend using a beauty blender. Here's a popular one with top-notch reviews: \[\] |
| Agent | Would you like to add this Clinique BIY™ Blend It Yourself Pigment Drops to your shopping cart? |
| Rosalind | Okay\! I will go with this one but I've never used a beauty blender before. Any tips you can share? |
| Agent | I've got you covered\! Here’s a cool tutorial that breaks down the technique of using a blender step by step. Check it out\! \[video\] Did you find the video helpful? |
| Rosalind | Yes I did. |
| Agent | Awesome\! You're all set to check out. If you have any other questions or need further assistance, feel free to let me know. Happy shopping\! \<Google Pay\> |
29 changes: 29 additions & 0 deletions projects/conversational-commerce-agent/docs/demo-food.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Demo Script

| Role | Input / Output |
| :---- | :---- |
| Agent | Welcome to Cymbal Foods\! How can I help you? |
| Mika | I am hosting a dinner party this weekend for 6 friends. |
| Agent | Wonderful\! What kind of food are you thinking of making? |
| Mika | I have a mix of vegetarian and non-vegetarian friends coming over, so I need options for both. |
| Agent | Great\! Do you have any allergies or dietary restrictions we should be aware of? |
| Mika | Yes, I am looking for grain-free options |
| Agent | Got it\! Do you plan on cooking the food yourself, or are you looking for pre-made dishes? |
| Mika | Definitely. I want to enjoy the whole party with my friends, not interested in cooking and cleaning all day. |
| Agent | No problem\! I can help with that. So you're looking for pre-made dishes, grain-free, for a mix of vegetarian and non-vegetarian guests, and for 6 people. Is that correct? |
| Mika | Correct |
| Agent | \[Food\]\[Food\]\[Food\] |
| Agent | Based on your preferences, I recommend the following: For your vegetarian guests, I suggest the "Thai Peanut Salad". It's a delicious and refreshing option that's both grain-free and vegan. For your non-vegetarian guests, I recommend the "Prosciutto & Chicken Sandwich". It's a hearty and satisfying meal that includes grilled chicken or steak, scrambled egg, roasted vegetables, tomato, brown rice, and avocado pesto. Would you like to order these? |
| Mika | looks good, sure I'll order these |
| Agent | Great\! For 6 people, I'd recommend 3 Thai Peanut Salad and 3 Prosciutto & Chicken Sandwich. Does that sound good? |
| Mika | I think that should be ok |
| Agent | Sounds great! Adding to your shopping cart now. |
| Agent | Would you like desserts for your dinner party this weekend? |
| Mika | Sure, what do you have for desserts ? |
| Agent | \[Dessert\]\[Dessert\]\[Dessert\] |
| Agent | We have Chocolate Pudding Parfait, Flan and Arroz con Leche. |
| Mika | I’d like something light |
| Agent | How about Chocolate Pudding Parfait then? It's a light and refreshing dessert with Oreo cookie crumbles and whipped topping. |
| Mika | ok, I’d like 6 Chocolate Pudding Parfait then. |
| | \[Payment Information\] |
| Agent | Looks like you have 3 Prosciutto & Chicken Sandwich, 3 Thai Peanut Salad and 6 Chocolate Pudding Parfait in your cart. Please use Google Pay for payment |
19 changes: 16 additions & 3 deletions projects/conversational-commerce-agent/docs/deployment.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Overview

The Conversational Agent \- Apparel deployment guide provides step-by-step instructions
The Conversational Shopping Agent deployment guide provides step-by-step instructions
on how to set up and deploy cloud resources for the
Conversational Agent \- Apparel application.
Conversational Shopping Agent application.

This guide will guide you through enabling necessary services,
configuring Dialogflow, Retail Search, and DHL integration.
Expand Down Expand Up @@ -315,11 +315,24 @@ INFO:root:error_samples {

## Verify the deployment

* Go to Cloud Console, Search for Commerce. In the left panel, goto
Controls, Attribute Controls.
Make sure the following attributes are made Searchable and Retrivable.

* attributes.Tags
* title
* description
* Name

* Navigate to `ui_cloudrun_url` you noted down in the previous step.

* Follow the demo guide to verify the deployment.

[Apparel](demo-apparel.md)
[Apparel Demo guide](demo-apparel.md)

[Food Demo guide](demo-food.md)

[Beauty Demo guide](demo-beauty.md)

## Troubleshooting

Expand Down

0 comments on commit 9bdbfac

Please sign in to comment.