Spaces:
Sleeping
Sleeping
File size: 925 Bytes
bfebcd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | import json
with open("tools.jsonl", "r", encoding="utf-8") as f:
tools = [json.loads(line) for line in f]
# Load policy data (you'll need to load these from your files)
with open("info.md", "r", encoding="utf-8") as f:
pilatopia_complete_info = f.read()
with open("saudi_consumer_protection.md", "r", encoding="utf-8") as f:
saudi_consumer_protection = f.read()
verify_tool_check_prompt = """
- Does the tool call match the user’s actual request?
- Are all required parameters present and valid?
- Is the tool appropriate based on the user's context (e.g., not booking Recovery for a pregnant user)?
- If the tool modifies membership, does it comply with the rules (e.g., cancel within 48 hours, postpone between 2 weeks and 2 months)?
- If the user is under 18 or over 68, was the action permitted by policy?
- Did the agent reference the result of the tool call in their response if needed?
"""
|