Spaces:
Running
Running
# Tool definitions extracted from app.py | |
record_user_details_json = { | |
"name": "record_user_details", | |
"description": "Record that a user shared their email to get in touch.", | |
"parameters": { | |
"type": "object", | |
"properties": { | |
"email": {"type": "string", "description": "User email"}, | |
"name": {"type": "string", "description": "User name if provided"}, | |
"notes": {"type": "string", "description": "Context or notes from chat"} | |
}, | |
"required": ["email"], | |
"additionalProperties": False | |
} | |
} | |
record_resume_gap_json = { | |
"name": "record_resume_gap", | |
"description": "Use only when a question in the active mode cannot be answered from the documents.", | |
"parameters": { | |
"type": "object", | |
"properties": { | |
"question": {"type": "string"}, | |
"why_missing": {"type": "string"}, | |
"mode": {"type": "string", "enum": ["career", "personal"], "default": "career"} | |
}, | |
"required": ["question"], | |
"additionalProperties": False | |
} | |
} | |
# Tool registry for OpenAI | |
TOOLS = [ | |
{"type": "function", "function": record_user_details_json}, | |
{"type": "function", "function": record_resume_gap_json} | |
] |