Skip to content

Commit

Permalink
added price description so that it reflects the full price on discount
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Pollak committed Aug 4, 2024
1 parent c7f1600 commit dc2147a
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions nbs/examples/pet_store.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 27,
"metadata": {},
"outputs": [],
"source": [
"class Pet(BaseModel):\n",
" name: str\n",
" price: float\n",
" price: float = Field(description=\"Full price of the Pet\")\n",
"\n",
"class Dog(Pet):\n",
" type: Literal[\"dog\"] = \"dog\"\n",
Expand Down Expand Up @@ -65,7 +65,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 28,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -142,7 +142,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 29,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -214,7 +214,7 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": 30,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -285,7 +285,7 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 31,
"metadata": {},
"outputs": [
{
Expand All @@ -299,15 +299,15 @@
"\n",
"customer: Hi, I'm looking to buy a pet. I really want a dog, but my budget is only $100. Do you have any dogs in that price range?\n",
"\n",
"salesperson: I'm sorry, but we don't have any dogs that fit within your $100 budget. Our dogs range from $500 to $600. However, we do have some fish that may be a good option for you. Let me show you what we have in stock.\n",
"salesperson: Unfortunately, we don't have any dogs in that price range. Our dogs start at $500. However, we do have some nice fish that would fit your budget. Let me show you what we have in stock.\n",
"\n",
"customer: Okay, that's a bit more than I was hoping to spend. What kind of fish do you have that are under $100?\n",
"customer: Hmm, I was really hoping for a dog. But I guess I could consider a fish if the price is right. What kind of fish do you have and how much do they cost?\n",
"\n",
"salesperson: Let me take a look at our fish inventory. We have a Clownfish named Nemo that is $110, and a Betta fish named Bubbles that is $300. The Clownfish Nemo would be the best fit for your $100 budget, as I can offer you a 25% discount on fish, bringing the price down to $82.50.\n",
"salesperson: Great, let me show you our fish options. We have a Clownfish named Nemo for $110 and a Betta fish named Bubbles for $300. The Clownfish would be a better fit for your $100 budget.\n",
"\n",
"customer: Okay, the Clownfish Nemo at $82.50 sounds good. I'll take him!\n",
"customer: Okay, the Clownfish Nemo sounds good. I think I'll go with that one. Can we negotiate the price a bit to get it closer to my $100 budget?\n",
"\n",
"Sold: SalespersonSellOffer(type='offer', pet=Fish(name='Nemo', price=82.5, type='fish', species='Clownfish', tank_size=20.0), price=82.5)\n"
"Sold: SalespersonOffer(type='offer', pet=Fish(name='Nemo', price=110.0, type='fish', species='Clownfish', tank_size=20.0), price=99.0)\n"
]
}
],
Expand Down

0 comments on commit dc2147a

Please sign in to comment.