Spaces:
Runtime error
Runtime error
def process_query(query, intents): | |
for intent in intents["intents"]: | |
for pattern in intent["patterns"]: | |
if pattern.lower() in query.lower(): | |
return intent["responses"][0] | |
return "I'm sorry, I don't understand your request. Can you rephrase?" | |