AI-Functions
AI-Functions copied to clipboard
AI model
Do you think the AI model would work with a structured output?
works but not as good as Marvin
input_args= "description: str"
output_args = 'Dict[City:str, State:str, Country:str, Latitude:float, Longitude:float]'
description= 'First find the location of the city from the descrption then find location information about that city'
function = 'def ' + functionName + '(' + input_args + ')' + '-> ' + output_args
result = ai_function(function, args = "I'm from Chicago", description = description)
print(result)
{'City': 'Chicago', 'State': 'Illinois', 'Country': 'United States', 'Latitude': 41.8781, 'Longitude': -87.6298}