-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[openai] Updates for Azure OpenAI Assistants (2025-01-01-preview) (#3…
…2256) * [openai] Updates for Azure OpenAI Asisstants (2024-12-01-preview) * Adding suppression * examples * removing suppression * format * changed directive for file_searcxh * rename * moved to 2025-01-01-preview * updating readme * optional * Added option for java emitter to prevent sample emission --------- Co-authored-by: Jose Alvarez <[email protected]> Co-authored-by: Travis Wilson <[email protected]>
- Loading branch information
1 parent
f63bea6
commit e50d53d
Showing
101 changed files
with
13,843 additions
and
90 deletions.
There are no files selected for viewing
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
49 changes: 49 additions & 0 deletions
49
specification/ai/OpenAI.Assistants/examples/2025-01-01-preview/cancel_run.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"title": "Cancels a run that is `in_progress`.\n", | ||
"parameters": { | ||
"endpoint": "{endpoint}", | ||
"api-version": "2025-01-01-preview", | ||
"threadId": "thread_abc123", | ||
"runId": "run_abc123" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "run_abc123", | ||
"object": "thread.run", | ||
"created_at": 1699076126, | ||
"assistant_id": "asst_abc123", | ||
"thread_id": "thread_abc123", | ||
"status": "cancelling", | ||
"started_at": 1699076126, | ||
"expires_at": 1699076726, | ||
"cancelled_at": null, | ||
"failed_at": null, | ||
"completed_at": null, | ||
"parallel_tool_calls": true, | ||
"last_error": null, | ||
"model": "gpt-4-turbo", | ||
"instructions": "You summarize books.", | ||
"tools": [ | ||
{ | ||
"type": "file_search" | ||
} | ||
], | ||
"tool_choice": "auto", | ||
"truncation_strategy": { | ||
"type": "auto", | ||
"last_messages": null | ||
}, | ||
"max_completion_tokens": 1000, | ||
"max_prompt_tokens": 1000, | ||
"incomplete_details": null, | ||
"metadata": {}, | ||
"usage": null, | ||
"temperature": 1.0, | ||
"top_p": 1.0, | ||
"response_format": "auto" | ||
} | ||
} | ||
}, | ||
"operationId": "CancelRun" | ||
} |
28 changes: 28 additions & 0 deletions
28
...tion/ai/OpenAI.Assistants/examples/2025-01-01-preview/cancel_vector_store_file_batch.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"title": "Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible.", | ||
"parameters": { | ||
"endpoint": "{endpoint}", | ||
"api-version": "2025-01-01-preview", | ||
"vectorStoreId": "vs_abc123", | ||
"batchId": "vsfb_abc123" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "vsfb_abc123", | ||
"object": "vector_store.files_batch", | ||
"created_at": 1699061776, | ||
"vector_store_id": "vs_abc123", | ||
"status": "cancelling", | ||
"file_counts": { | ||
"in_progress": 12, | ||
"completed": 3, | ||
"failed": 0, | ||
"cancelled": 0, | ||
"total": 15 | ||
} | ||
} | ||
} | ||
}, | ||
"operationId": "CancelVectorStoreFileBatch" | ||
} |
41 changes: 41 additions & 0 deletions
41
specification/ai/OpenAI.Assistants/examples/2025-01-01-preview/create_assistant.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"title": "Create an assistant with a model and instructions.", | ||
"parameters": { | ||
"endpoint": "{endpoint}", | ||
"api-version": "2025-01-01-preview", | ||
"body": { | ||
"name": "Math Tutor", | ||
"instructions": "When a customer asks about a specific math problem, use Python to evaluate their query.", | ||
"tools": [ | ||
{ | ||
"type": "code_interpreter" | ||
} | ||
], | ||
"model": "gpt-4-1106-preview" | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "asst_4nsG2qgNzimRPE7MazXTXbU7", | ||
"object": "assistant", | ||
"created_at": 1707295707, | ||
"name": "Math Tutor", | ||
"description": null, | ||
"model": "gpt-4-1106-preview", | ||
"instructions": "When a customer asks about a specific math problem, use Python to evaluate their query.", | ||
"tools": [ | ||
{ | ||
"type": "code_interpreter" | ||
} | ||
], | ||
"tool_resources": {}, | ||
"metadata": {}, | ||
"top_p": 1.0, | ||
"temperature": 1.0, | ||
"response_format": "auto" | ||
} | ||
} | ||
}, | ||
"operationId": "CreateAssistant" | ||
} |
41 changes: 41 additions & 0 deletions
41
specification/ai/OpenAI.Assistants/examples/2025-01-01-preview/create_message.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"title": "Create a message.", | ||
"parameters": { | ||
"endpoint": "{endpoint}", | ||
"api-version": "2025-01-01-preview", | ||
"threadId": "thread_v7V4csrNOxtNmgcwGg496Smx", | ||
"body": { | ||
"role": "user", | ||
"content": "What is the cube root of the sum of 12, 14, 1234, 4321, 90000, 123213541223, 443123123124, 5423324234, 234324324234, 653434534545, 200000000, 98237432984, 99999999, 99999999999, 220000000000, 3309587702? Give me the answer rounded to the nearest integer without commas or spaces." | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "msg_as3XIk1tpVP3hdHjWBGg3uG4", | ||
"object": "thread.message", | ||
"created_at": 1707298421, | ||
"assistant_id": null, | ||
"thread_id": "thread_v7V4csrNOxtNmgcwGg496Smx", | ||
"run_id": null, | ||
"role": "user", | ||
"content": [ | ||
{ | ||
"type": "text", | ||
"text": { | ||
"value": "What is the cube root of the sum of 12, 14, 1234, 4321, 90000, 123213541223, 443123123124, 5423324234, 234324324234, 653434534545, 200000000, 98237432984, 99999999, 99999999999, 220000000000, 3309587702? Give me the answer rounded to the nearest integer without commas or spaces.", | ||
"annotations": [] | ||
} | ||
} | ||
], | ||
"status": "completed", | ||
"incomplete_details": null, | ||
"incomplete_at": null, | ||
"completed_at": 1707298439, | ||
"attachments": [], | ||
"metadata": {} | ||
} | ||
} | ||
}, | ||
"operationId": "CreateMessage" | ||
} |
51 changes: 51 additions & 0 deletions
51
specification/ai/OpenAI.Assistants/examples/2025-01-01-preview/create_run.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"title": "Create a run.", | ||
"parameters": { | ||
"endpoint": "{endpoint}", | ||
"api-version": "2025-01-01-preview", | ||
"threadId": "thread_abc123", | ||
"body": { | ||
"assistant_id": "asst_abc123" | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "run_abc123", | ||
"object": "thread.run", | ||
"created_at": 1699063290, | ||
"assistant_id": "asst_abc123", | ||
"thread_id": "thread_abc123", | ||
"status": "queued", | ||
"started_at": 1699063290, | ||
"expires_at": null, | ||
"cancelled_at": null, | ||
"failed_at": null, | ||
"completed_at": 1699063291, | ||
"parallel_tool_calls": true, | ||
"last_error": null, | ||
"model": "gpt-4-turbo", | ||
"instructions": "", | ||
"incomplete_details": null, | ||
"tools": [ | ||
{ | ||
"type": "code_interpreter" | ||
} | ||
], | ||
"metadata": {}, | ||
"usage": null, | ||
"temperature": 1.0, | ||
"top_p": 1.0, | ||
"max_prompt_tokens": 1000, | ||
"max_completion_tokens": 1000, | ||
"truncation_strategy": { | ||
"type": "auto", | ||
"last_messages": null | ||
}, | ||
"response_format": "auto", | ||
"tool_choice": "auto" | ||
} | ||
} | ||
}, | ||
"operationId": "CreateRun" | ||
} |
20 changes: 20 additions & 0 deletions
20
specification/ai/OpenAI.Assistants/examples/2025-01-01-preview/create_thread.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"title": "Creates a thread.", | ||
"parameters": { | ||
"endpoint": "{endpoint}", | ||
"api-version": "2025-01-01-preview", | ||
"body": {} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "thread_v7V4csrNOxtNmgcwGg496Smx", | ||
"object": "thread", | ||
"created_at": 1707297136, | ||
"tool_resources": {}, | ||
"metadata": {} | ||
} | ||
} | ||
}, | ||
"operationId": "CreateThread" | ||
} |
55 changes: 55 additions & 0 deletions
55
specification/ai/OpenAI.Assistants/examples/2025-01-01-preview/create_thread_and_run.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"title": "Create a thread and run it in one request.", | ||
"parameters": { | ||
"endpoint": "{endpoint}", | ||
"api-version": "2025-01-01-preview", | ||
"body": { | ||
"assistant_id": "asst_abc123", | ||
"thread": { | ||
"messages": [ | ||
{ | ||
"role": "user", | ||
"content": "Explain deep learning to a 5 year old." | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"id": "run_abc123", | ||
"object": "thread.run", | ||
"created_at": 1699076792, | ||
"assistant_id": "asst_abc123", | ||
"thread_id": "thread_abc123", | ||
"status": "queued", | ||
"started_at": null, | ||
"expires_at": 1699077392, | ||
"cancelled_at": null, | ||
"failed_at": null, | ||
"completed_at": null, | ||
"parallel_tool_calls": true, | ||
"required_action": null, | ||
"last_error": null, | ||
"model": "gpt-4-turbo", | ||
"instructions": "You are a helpful assistant.", | ||
"tools": [], | ||
"metadata": {}, | ||
"temperature": 1.0, | ||
"top_p": 1.0, | ||
"max_completion_tokens": null, | ||
"max_prompt_tokens": null, | ||
"truncation_strategy": { | ||
"type": "auto", | ||
"last_messages": null | ||
}, | ||
"incomplete_details": null, | ||
"usage": null, | ||
"response_format": "auto", | ||
"tool_choice": "auto" | ||
} | ||
} | ||
}, | ||
"operationId": "CreateThreadAndRun" | ||
} |
Oops, something went wrong.