Skip to content

Commit

Permalink
feat: Updated OpenAPI spec
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and HavenDV committed Jul 14, 2024
1 parent e3d47d9 commit 68ab0e0
Show file tree
Hide file tree
Showing 44 changed files with 785 additions and 205 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,44 @@ partial void ProcessCreateAssistantResponseContent(
/// <summary>
/// Create an assistant with a model and instructions.
/// </summary>
/// <param name="model"></param>
/// <param name="name"></param>
/// <param name="description"></param>
/// <param name="instructions"></param>
/// <param name="tools"></param>
/// <param name="toolResources"></param>
/// <param name="metadata"></param>
/// <param name="temperature"></param>
/// <param name="topP"></param>
/// <param name="responseFormat"></param>
/// <param name="model">
/// ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.<br/>
/// Example: gpt-4-turbo
/// </param>
/// <param name="name">
/// The name of the assistant. The maximum length is 256 characters.
/// </param>
/// <param name="description">
/// The description of the assistant. The maximum length is 512 characters.
/// </param>
/// <param name="instructions">
/// The system instructions that the assistant uses. The maximum length is 256,000 characters.
/// </param>
/// <param name="tools">
/// A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.
/// </param>
/// <param name="toolResources">
/// A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.
/// </param>
/// <param name="metadata">
/// Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
/// </param>
/// <param name="temperature">
/// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.<br/>
/// Default Value: 1<br/>
/// Example: 1
/// </param>
/// <param name="topP">
/// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.<br/>
/// We generally recommend altering this or temperature but not both.<br/>
/// Default Value: 1<br/>
/// Example: 1
/// </param>
/// <param name="responseFormat">
/// Specifies the format that the model must output. Compatible with [GPT-4o](/docs/models/gpt-4o), [GPT-4 Turbo](/docs/models/gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.<br/>
/// Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is valid JSON.<br/>
/// **Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if `finish_reason="length"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::OpenAI.AssistantObject> CreateAssistantAsync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,18 @@ partial void ProcessCreateMessageResponseContent(
/// Create a message.
/// </summary>
/// <param name="threadId"></param>
/// <param name="role"></param>
/// <param name="role">
/// The role of the entity that is creating the message. Allowed values include:<br/>
/// - `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.<br/>
/// - `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation.
/// </param>
/// <param name="content"></param>
/// <param name="attachments"></param>
/// <param name="metadata"></param>
/// <param name="attachments">
/// A list of files attached to the message, and the tools they should be added to.
/// </param>
/// <param name="metadata">
/// Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::OpenAI.MessageObject> CreateMessageAsync(
Expand Down
76 changes: 60 additions & 16 deletions src/libs/OpenAI/Generated/OpenAI.AssistantsClient.CreateRun.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,22 +103,66 @@ partial void ProcessCreateRunResponseContent(
/// Create a run.
/// </summary>
/// <param name="threadId"></param>
/// <param name="assistantId"></param>
/// <param name="model"></param>
/// <param name="instructions"></param>
/// <param name="additionalInstructions"></param>
/// <param name="additionalMessages"></param>
/// <param name="tools"></param>
/// <param name="metadata"></param>
/// <param name="temperature"></param>
/// <param name="topP"></param>
/// <param name="stream"></param>
/// <param name="maxPromptTokens"></param>
/// <param name="maxCompletionTokens"></param>
/// <param name="truncationStrategy"></param>
/// <param name="toolChoice"></param>
/// <param name="parallelToolCalls"></param>
/// <param name="responseFormat"></param>
/// <param name="assistantId">
/// The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run.
/// </param>
/// <param name="model">
/// The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.<br/>
/// Example: gpt-4-turbo
/// </param>
/// <param name="instructions">
/// Overrides the [instructions](/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis.
/// </param>
/// <param name="additionalInstructions">
/// Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions.
/// </param>
/// <param name="additionalMessages">
/// Adds additional messages to the thread before creating the run.
/// </param>
/// <param name="tools">
/// Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.
/// </param>
/// <param name="metadata">
/// Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
/// </param>
/// <param name="temperature">
/// empty<br/>
/// Default Value: 1<br/>
/// Example: 1
/// </param>
/// <param name="topP">
/// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.<br/>
/// We generally recommend altering this or temperature but not both.<br/>
/// Default Value: 1<br/>
/// Example: 1
/// </param>
/// <param name="stream">
/// If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.
/// </param>
/// <param name="maxPromptTokens">
/// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.
/// </param>
/// <param name="maxCompletionTokens">
/// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.
/// </param>
/// <param name="truncationStrategy">
/// Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.
/// </param>
/// <param name="toolChoice">
/// Controls which (if any) tool is called by the model.<br/>
/// `none` means the model will not call any tools and instead generates a message.<br/>
/// `auto` is the default value and means the model can pick between generating a message or calling one or more tools.<br/>
/// `required` means the model must call one or more tools before responding to the user.<br/>
/// Specifying a particular tool like `{"type": "file_search"}` or `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool.
/// </param>
/// <param name="parallelToolCalls">
/// Whether to enable [parallel function calling](/docs/guides/function-calling/parallel-function-calling) during tool use.
/// </param>
/// <param name="responseFormat">
/// Specifies the format that the model must output. Compatible with [GPT-4o](/docs/models/gpt-4o), [GPT-4 Turbo](/docs/models/gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.<br/>
/// Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is valid JSON.<br/>
/// **Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if `finish_reason="length"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::OpenAI.RunObject> CreateRunAsync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,15 @@ partial void ProcessCreateThreadResponseContent(
/// <summary>
/// Create a thread.
/// </summary>
/// <param name="messages"></param>
/// <param name="toolResources"></param>
/// <param name="metadata"></param>
/// <param name="messages">
/// A list of [messages](/docs/api-reference/messages) to start the thread with.
/// </param>
/// <param name="toolResources">
/// A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.
/// </param>
/// <param name="metadata">
/// Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::OpenAI.ThreadObject> CreateThreadAsync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,22 +96,63 @@ partial void ProcessCreateThreadAndRunResponseContent(
/// <summary>
/// Create a thread and run it in one request.
/// </summary>
/// <param name="assistantId"></param>
/// <param name="assistantId">
/// The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run.
/// </param>
/// <param name="thread"></param>
/// <param name="model"></param>
/// <param name="instructions"></param>
/// <param name="tools"></param>
/// <param name="toolResources"></param>
/// <param name="metadata"></param>
/// <param name="temperature"></param>
/// <param name="topP"></param>
/// <param name="stream"></param>
/// <param name="maxPromptTokens"></param>
/// <param name="maxCompletionTokens"></param>
/// <param name="truncationStrategy"></param>
/// <param name="toolChoice"></param>
/// <param name="parallelToolCalls"></param>
/// <param name="responseFormat"></param>
/// <param name="model">
/// The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.<br/>
/// Example: gpt-4-turbo
/// </param>
/// <param name="instructions">
/// Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis.
/// </param>
/// <param name="tools">
/// Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.
/// </param>
/// <param name="toolResources">
/// A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.
/// </param>
/// <param name="metadata">
/// Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
/// </param>
/// <param name="temperature">
/// empty<br/>
/// Default Value: 1<br/>
/// Example: 1
/// </param>
/// <param name="topP">
/// empty<br/>
/// Default Value: 1<br/>
/// Example: 1
/// </param>
/// <param name="stream">
/// If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.
/// </param>
/// <param name="maxPromptTokens">
/// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.
/// </param>
/// <param name="maxCompletionTokens">
/// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.
/// </param>
/// <param name="truncationStrategy">
/// Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.
/// </param>
/// <param name="toolChoice">
/// Controls which (if any) tool is called by the model.<br/>
/// `none` means the model will not call any tools and instead generates a message.<br/>
/// `auto` is the default value and means the model can pick between generating a message or calling one or more tools.<br/>
/// `required` means the model must call one or more tools before responding to the user.<br/>
/// Specifying a particular tool like `{"type": "file_search"}` or `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool.
/// </param>
/// <param name="parallelToolCalls">
/// Whether to enable [parallel function calling](/docs/guides/function-calling/parallel-function-calling) during tool use.
/// </param>
/// <param name="responseFormat">
/// Specifies the format that the model must output. Compatible with [GPT-4o](/docs/models/gpt-4o), [GPT-4 Turbo](/docs/models/gpt-4-turbo-and-gpt-4), and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.<br/>
/// Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is valid JSON.<br/>
/// **Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if `finish_reason="length"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::OpenAI.RunObject> CreateThreadAndRunAsync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ partial void ProcessListAssistantsResponseContent(
/// <summary>
/// Returns a list of assistants.
/// </summary>
/// <param name="limit"></param>
/// <param name="order"></param>
/// <param name="limit">
/// Default Value: 20
/// </param>
/// <param name="order">
/// Default Value: desc
/// </param>
/// <param name="after"></param>
/// <param name="before"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
Expand Down
Loading

0 comments on commit 68ab0e0

Please sign in to comment.