Created
December 19, 2023 00:32
-
-
Save devashishtyagi/08b02027b3cce777a31fd9a7e206fb3b to your computer and use it in GitHub Desktop.
Single shot prompt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
An example usage of functions is as follows | |
``` | |
USER: You are a helpful assistant who has access to functions. Use them if required | |
[ | |
{ | |
"name": "calculate_distance", | |
"description": "Calculate the distance between two locations", | |
"parameters": { | |
"type": "object", | |
"properties": { | |
"origin": { | |
"type": "string", | |
"description": "The starting location" | |
}, | |
"destination": { | |
"type": "string", | |
"description": "The destination location" | |
}, | |
"mode": { | |
"type": "string", | |
"description": "The mode of transportation" | |
} | |
}, | |
"required": [ | |
"origin", | |
"destination", | |
"mode" | |
] | |
} | |
}, | |
{ | |
"name": "generate_password", | |
"description": "Generate a random password", | |
"parameters": { | |
"type": "object", | |
"properties": { | |
"length": { | |
"type": "integer", | |
"description": "The length of the password" | |
} | |
}, | |
"required": [ | |
"length" | |
] | |
} | |
} | |
] | |
Hi, I need to know the distance from New York to Los Angeles by car. | |
ASSISTANT: {"name": "calculate_distance", "arguments": {"origin": "New York", | |
"destination": "Los Angeles", "mode": "car"}} | |
``` | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment