4 ms·
With two prompts and a parsing step in between is how I'm doing it. An input prompt with multiple examples like "what's the weather" -> "getWeather($location)",
by sprobertson 4y ago
With two prompts and a parsing step in between is how I'm doing it. An input prompt with multiple examples like "what's the weather" -> "getWeather($location)", a glue step to parse and run the commands it outputs, then a second response prompt with examples like "$weather = {temp: 50, ...}" -> "it's 50 degrees with a clear sky" to turn JSON data back into English.