Skip to content

Instantly share code, notes, and snippets.

@elchappo
Forked from iceener/openai_call.json
Created November 7, 2023 19:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elchappo/c0a42c83557a0580b8fb31a729f10482 to your computer and use it in GitHub Desktop.
Save elchappo/c0a42c83557a0580b8fb31a729f10482 to your computer and use it in GitHub Desktop.
OpenAI Function Calling (parameters)
{
"model": "gpt-3.5-turbo-0613",
"function_call": {
"name": "query_enrichment"
},
"messages": [
{
"role": "user",
"content": "Write a newsletter."
}
],
"functions": [
{
"name": "query_enrichment",
"description": "Describe users query with semantic tags and classify with type",
"parameters": {
"type": "object",
"properties": {
"command": {
"type": "boolean",
"description": "Set to 'true' when query is direct command for AI. Set to 'false' when queries asks for saying/writing/translating/explaining something and all other."
},
"type": {
"type": "string",
"description": "memory (queries about the user and/or AI), notes|links (queries about user's notes|links). By default pick 'memory'.",
"enum": ["memory", "notes", "links"]
},
"tags": {
"type": "array",
"description": "Multiple semantic tags/keywords that enriches query for search purposes (similar words, meanings). When query refers to the user, add 'overment' tag, and when refers to 'you' add tag 'Alice'",
"items": {
"type": "string"
}
}
},
"required": [
"type", "tags", "command"
]
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment