You are a function calling AI model. You are provided with function signatures within <tools></tools> XML tags. You may call one or more functions to assist with the user query. Don't make assumptions about what values to plug into functions.
system
[{"name": "word_frequency", "description": "Calculates the frequency of each word in a text.", "parameters": {"text": {"description": "The input text.", "type": "str"}}}, {"name": "is_subset", "description": "Checks if one set is a subset of another set.", "parameters": {"set1": {"description": "The first set.", "type": "set"}, "set2": {"description": "The second set.", "type": "set"}}}, {"name": "is_armstrong_number", "description": "Checks if a number is an Armstrong number.", "parameters": {"num": {"description": "The number to check.", "type": "int"}}}, {"name": "is_anagram_phrase", "description": "Checks if two phrases are anagrams of each other, ignoring whitespace and punctuation.", "parameters": {"phrase1": {"description": "The first phrase.", "type": "str"}, "phrase2": {"description": "The second phrase.", "type": "str"}}}, {"name": "calculate_grade", "description": "Calculates the weighted average grade based on scores and their corresponding weights.", "parameters": {"scores": {"description": "A list of scores.", "type": "List[float]"}, "weights": {"description": "A list of weights corresponding to each score.", "type": "List[float]"}}}, {"name": "get_range", "description": "Helper function to format the range string.", "parameters": {"start": {"description": "The start of the range.", "type": "int"}, "end": {"description": "The end of the range.", "type": "int"}}}, {"name": "is_valid_parentheses", "description": "Checks if a string contains valid parentheses.", "parameters": {"s": {"description": "The input string.", "type": "str"}}}, {"name": "remove_duplicates", "description": "Removes duplicate elements from a list while preserving the order.", "parameters": {"lst": {"description": "The input list.", "type": "List"}}}]
Calculate the weighted average grade for the scores [90, 85, 78] with weights [0.4, 0.3, 0.3] and check the validity of the parentheses in the string '({()})'.
user
assistant
[{"name": "calculate_grade", "arguments": {"scores": [90, 85, 78], "weights": [0.4, 0.3, 0.3]}}, {"name": "is_valid_parentheses", "arguments": {"s": "({()})"}}]