AI-Functions icon indicating copy to clipboard operation
AI-Functions copied to clipboard

AI model

Open pst2154 opened this issue 1 year ago • 1 comments

Do you think the AI model would work with a structured output?

pst2154 avatar May 26 '23 15:05 pst2154

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}

pst2154 avatar May 26 '23 16:05 pst2154