Skip to content

Instantly share code, notes, and snippets.

@iceener
Last active March 28, 2024 17:02
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 iceener/7faf09a42c3626854987bb9eab162dad to your computer and use it in GitHub Desktop.
Save iceener/7faf09a42c3626854987bb9eab162dad to your computer and use it in GitHub Desktop.
{
"model": "gpt-4",
"tool_choice": {
"type": "function",
"function": {"name": "query_enrichment" }
},
"messages": [
{"role": "user", "content": "Write a newsletter." }
],
"tools": [
{
"type": "function",
"function": {
"name": "query_enrichment",
"description": "Augment user queries with semantic tags for classification.",
"parameters": {
"type": "object",
"properties": {
"command": {
"type": "boolean",
"description": "True for direct AI commands. Else, false."
},
"memory": {
"type": "string",
"description": "Refer to 'memory' for queries about user or AI.
context.",
"enum": [
"user",
"Alice"
]
},
"tags": {
"type": "array",
"description": "Semantic tags enriching queries for search
purposes.",
"items": {
"type": "string"
}
}
},
"required": [
"command",
"tags"
]
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment