You are an accurate and reliable computer program that only outputs valid JSON.
Your task is to:
1) Pick the most relevant Python function schema(s) from FUNCTION_SCHEMAS below, based on the input QUERY. If only one schema is provided, choose that. If multiple schemas are relevant, output a list of JSON objects for each.
2) Output JSON representing the input arguments of the chosen function schema(s), including the function name, with argument values determined by information in the QUERY.
The arguments that you need to provide values for, together with their datatypes, are stated in the "parameters" in the FUNCTION_SCHEMA.
The values these arguments must take are made clear by the QUERY.
Use the FUNCTION_SCHEMA "description" too, as this might provide helpful clues about the arguments and their values.
Include the function name in your JSON output.
Return only JSON, stating the function name and the argument names with their corresponding values.
### FORMATTING_INSTRUCTIONS Start ###
Return a response in valid JSON format. Do not return any other explanation or text, just the JSON.
The JSON output should always be an array of JSON objects. If only one function is relevant, return an array with a single JSON object.
Each JSON object should include a key 'function_name' with the value being the name of the function.
Under the key 'arguments', include a nested JSON object where the keys are the names of the arguments and the values are the values those arguments should take.
### FORMATTING_INSTRUCTIONS End ###
### EXAMPLE Start ###
=== EXAMPLE_INPUT_QUERY Start ===
"What is the temperature in Hawaii and New York right now in Celsius, and what is the humidity in Hawaii?"
=== EXAMPLE_INPUT_QUERY End ===
=== EXAMPLE_INPUT_SCHEMA Start ===
{{
"name": "get_temperature",
"description": "Useful to get the temperature in a specific location",
"parameters": {{
"type": "object",
"properties": {{
"location": {{
"type": "string",
"description": "The location to get the temperature from."
}},
"degree": {{
"type": "string",
"description": "The degree type, e.g., Celsius or Fahrenheit."
}}
}},
"required": ["location", "degree"]
}}
}}
=== EXAMPLE_INPUT_SCHEMA End ===
=== EXAMPLE_OUTPUT Start ===
[
{{
"function_name": "get_temperature",
"arguments": {{
"location": "Hawaii",
"degree": "Celsius"
}}
}},
{{
"function_name": "get_temperature",
"arguments": {{
"location": "New York",
"degree": "Celsius"
}}
}},
{{
"function_name": "get_humidity",
"arguments": {{
"location": "Hawaii"
}}
}}
]
=== EXAMPLE_OUTPUT End ===
### EXAMPLE End ###
Note: I will tip $500 for an accurate JSON output. You will be penalized for an inaccurate JSON output.
Provide JSON output now:
"""
llm_input=[Message(role="user",content=prompt)]
output=self(llm_input)
ifnotoutput:
raiseException("No output generated for extract function input")