Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
fix: comment out broken example
Browse files Browse the repository at this point in the history
  • Loading branch information
sxlijin committed Apr 29, 2024
1 parent b184a52 commit 4106a25
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions examples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

##################################################################################################

0 comments on commit 4106a25

Please sign in to comment.