This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
13 additions
and
11 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -17,16 +17,18 @@ | |
|
||
################################################################################################## | ||
|
||
puts "Example 2: calling GPT4 with the ExtractOrderInfo function" | ||
|
||
email = Baml::Types::Email.new( | ||
from_address: "\"Amazon.com\" <[email protected]>", | ||
subject: "Your Amazon.com order of \"Wood Square Dowel Rods...\" has shipped!", | ||
body: "Amazon Shipping Confirmation\nwww.amazon.com?ie=UTF8&ref_=scr_home\n\nHi Samuel, your package will arrive:\n\nThursday, April 4\n\nTrack your package:\nwww.amazon.com/gp/your-account/ship-track?ie=UTF8&orderId=113-7540940-3785857&packageIndex=0&shipmentId=Gx7wk71F9&ref_=scr_pt_tp_t\n\nOn the way:\nWood Square Dowel Rods...\nOrder #113-7540940-3785857\n\nAn Amazon driver may contact you by text message or call you for help on the day of delivery. \n\nShip to:\n Sam\n SEATTLE, WA\n\nShipment total:\n$0.00", | ||
) | ||
order_info = b.ExtractOrderInfo(email: email) | ||
|
||
puts "ExtractOrderInfo response:" | ||
pp order_info.serialize | ||
# This is broken right now - fixing this | ||
# puts "Example 2: calling GPT4 with the ExtractOrderInfo function" | ||
# | ||
# email = Baml::Types::Email.new( | ||
# from_address: "\"Amazon.com\" <[email protected]>", | ||
# subject: "Your Amazon.com order of \"Wood Square Dowel Rods...\" has shipped!", | ||
# body: "Amazon Shipping Confirmation\nwww.amazon.com?ie=UTF8&ref_=scr_home\n\nHi Samuel, your package will arrive:\n\nThursday, April 4\n\nTrack your package:\nwww.amazon.com/gp/your-account/ship-track?ie=UTF8&orderId=113-7540940-3785857&packageIndex=0&shipmentId=Gx7wk71F9&ref_=scr_pt_tp_t\n\nOn the way:\nWood Square Dowel Rods...\nOrder #113-7540940-3785857\n\nAn Amazon driver may contact you by text message or call you for help on the day of delivery. \n\nShip to:\n Sam\n SEATTLE, WA\n\nShipment total:\n$0.00", | ||
# ) | ||
# Baml::Ffi::roundtrip(email) | ||
# order_info = b.ExtractOrderInfo(email: email) | ||
# | ||
# puts "ExtractOrderInfo response:" | ||
# pp order_info.serialize | ||
|
||
################################################################################################## |