You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return {"facts": f"Error: Nutrition service could not find information for pet: {pet_type.lower()}", "products": ""}
28
28
exceptrequests.RequestException:
29
-
return {"facts": "", "products": "", "error": "Nutrition service temporarily unavailable"}
29
+
return {"facts": "Error: Nutrition service down", "products": ""}
30
30
31
31
@tool
32
32
defget_feeding_guidelines(pet_type):
33
33
"""Get feeding guidelines based on pet type"""
34
34
data=get_nutrition_data(pet_type)
35
-
36
-
ifdata["error"]:
37
-
returnf"I don't have specific nutrition information available for {pet_type} at the moment. Please consult with our veterinarian at (555) 123-PETS for personalized dietary recommendations."
38
-
39
-
ifnotdata["facts"]:
40
-
returnf"Nutrition information for {pet_type} is not available in our current database. Please speak with our veterinarian for proper dietary guidance."
41
-
42
-
result=f"Nutrition guidelines for {pet_type}: {data['facts']}"
35
+
result=f"Nutrition info for {pet_type}: {data['facts']}"
43
36
ifdata['products']:
44
-
result+=f" We carry these recommended products at our clinic: {data['products']}"
37
+
result+=f" Recommended products available at our clinic: {data['products']}"
45
38
returnresult
46
39
47
40
@tool
48
41
defget_dietary_restrictions(pet_type):
49
42
"""Get dietary recommendations for specific health conditions by animal type"""
50
43
data=get_nutrition_data(pet_type)
51
-
52
-
ifdata["error"]:
53
-
returnf"I don't have specific dietary restriction information for {pet_type} at the moment. Please consult with our veterinarian at (555) 123-PETS for condition-specific dietary advice."
54
-
55
-
ifnotdata["facts"]:
56
-
returnf"Dietary restriction information for {pet_type} is not available in our current database. Please speak with our veterinarian for proper guidance on health conditions."
57
-
58
-
result=f"Dietary considerations for {pet_type}: {data['facts']}. Always consult our veterinarian for condition-specific advice."
44
+
result=f"Dietary info for {pet_type}: {data['facts']}. Consult veterinarian for condition-specific advice."
59
45
ifdata['products']:
60
-
result+=f" We carry these recommended products at our clinic: {data['products']}"
46
+
result+=f" Recommended products available at our clinic: {data['products']}"
61
47
returnresult
62
48
63
49
@tool
64
50
defget_nutritional_supplements(pet_type):
65
51
"""Get supplement recommendations by animal type"""
66
52
data=get_nutrition_data(pet_type)
67
-
68
-
ifdata["error"]:
69
-
returnf"I don't have specific supplement information for {pet_type} at the moment. Please consult with our veterinarian at (555) 123-PETS for supplement recommendations."
70
-
71
-
ifnotdata["facts"]:
72
-
returnf"Supplement information for {pet_type} is not available in our current database. Please speak with our veterinarian for proper supplement guidance."
73
-
74
-
result=f"Supplement guidance for {pet_type}: Based on {data['facts']}, consult our veterinarian for specific supplement needs."
53
+
result=f"Supplement info for {pet_type}: {data['facts']}. Consult veterinarian for supplements."
75
54
ifdata['products']:
76
-
result+=f" We carry these recommended products at our clinic: {data['products']}"
55
+
result+=f" Recommended products available at our clinic: {data['products']}"
returnf"Order {order_id} created for {quantity}x {product_name}. Total: ${quantity*29.99:.2f}. Expected delivery: 3-5 business days. You can pick it up at our clinic or we'll ship it to you."
94
66
95
-
returnf"Sorry, {product_name} is not available in our current inventory for {pet_type}. Available products: {data['products']}. Please call (555) 123-PETS for more options."
67
+
returnf"Sorry, {product_name} is not available in our inventory for {pet_type}. Available products: {data['products']}"
return"Our nutrition specialist doesn't have that information available right now. Please call (555) 123-PETS ext. 201 to speak with Dr. Smith for personalized advice."
63
60
returnbody
64
61
else:
65
-
return"Our nutrition specialist is experiencing high demand. Please call (555) 123-PETS ext. 201 to speak with Dr. Smith directly."
62
+
return"Our nutrition specialist is experiencing high demand. Please try again in a few moments or call (555) 123-PETS ext. 201."
0 commit comments