Skip to content

Commit

Permalink
[OpenAI] v2024_07_01_preview service release remaining points (#29967)
Browse files Browse the repository at this point in the history
* TSP changes

* Compilation related swagger gen

* Removed unused comment section
  • Loading branch information
jpalvarezl authored Jul 29, 2024
1 parent 35f4b35 commit b9872e1
Show file tree
Hide file tree
Showing 10 changed files with 396 additions and 54 deletions.
2 changes: 1 addition & 1 deletion specification/ai/OpenAI.Assistants/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ title: OpenAIAssistants
clear-output-folder: false
guessResourceKey: true
isAzureSpec: true
namespace: azure.ai.openai.assistants
namespace: azure.ai.openai.assistants
65 changes: 65 additions & 0 deletions specification/ai/OpenAI.Assistants/messages/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,39 @@ model MessageTextFilePathDetails {
fileId: string;
}

// Url citation + details
/**
* A citation within the message that points to a specific quote from the webpage returned by the URL.
* Generated when the assistant uses the "browser" tool to search the web.
*/
@added(ServiceApiVersions.v2024_07_01_preview)
model MessageTextUrlCitationAnnotation extends MessageTextAnnotation {
/** The url citation object type. Always `url_citation`. */
type: "url_citation";

/** The details of the URL used in the text citation. */
@encodedName("application/json", "url_citation")
urlCitation: MessageTextUrlCitationDetails;

/** The first text index associated with this text annotation. */
@encodedName("application/json", "start_index")
startIndex?: int32;

/** The last text index associated with this text annotation. */
@encodedName("application/json", "end_index")
endIndex?: int32;
}

/** A representation of the URL used for the text citation. */
@added(ServiceApiVersions.v2024_07_01_preview)
model MessageTextUrlCitationDetails {
/** The URL where the citation is from. */
url: string;

/** The title of the URL. */
title: string;
}

// Image file content details

@doc("An image reference, as represented in thread message content.")
Expand Down Expand Up @@ -444,3 +477,35 @@ model MessageDeltaTextFilePathAnnotation {
@encodedName("application/json", "file_id")
fileId?: string;
}

/**
* A citation within the message that points to a specific quote from the webpage returned by URL.
* Generated when the assistant uses the "browser" tool to search the web.
*/
@added(ServiceApiVersions.v2024_07_01_preview)
model MessageDeltaTextUrlCitationAnnotation extends MessageDeltaTextAnnotation {
/** The url citation object type. Always `url_citation`. */
type: "url_citation";

/** The details of the URL used in the text citation. */
@encodedName("application/json", "url_citation")
urlCitation?: MessageTextUrlCitationDetails;

/** The first text index associated with this text annotation. */
@encodedName("application/json", "start_index")
startIndex?: int32;

/** The last text index associated with this text annotation. */
@encodedName("application/json", "end_index")
endIndex?: int32;
}

/** A representation of the URL used for the text citation. */
@added(ServiceApiVersions.v2024_07_01_preview)
model MessageDeltaTextUrlCitationDetails {
/** The URL where the citation is from. */
url?: string;

/** The title of the URL. */
title?: string;
}
11 changes: 11 additions & 0 deletions specification/ai/OpenAI.Assistants/run_steps/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -369,3 +369,14 @@ model RunStepDeltaCodeInterpreterImageOutputObject {
@encodedName("application/json", "file_id")
fileId?: string;
}

/** Browser tool call. */
@added(ServiceApiVersions.v2024_07_01_preview)
model RunStepDeltaBingSearchToolCall extends RunStepDeltaToolCall {

/** The type of tool call. This is always going to be `browser` for this type of tool call. */
type: "browser";

/** For now, this is always going to be an empty object. */
browser?: Record<string>;
}
14 changes: 14 additions & 0 deletions specification/ai/OpenAI.Assistants/runs/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,13 @@ model CreateRunOptions {
@added(ServiceApiVersions.v2024_05_01_preview)
responseFormat?: AssistantsApiResponseFormatOption | null;

/**
* Whether to enable parallel function calling during tool use.
*/
@encodedName("application/json", "parallel_tool_calls")
@added(ServiceApiVersions.v2024_07_01_preview)
parallelToolCalls?: boolean = true;

...OptionalNullableMetadata;
}

Expand Down Expand Up @@ -454,6 +461,13 @@ model CreateAndRunThreadOptions {
@added(ServiceApiVersions.v2024_05_01_preview)
responseFormat?: AssistantsApiResponseFormatOption | null;

/**
* Whether to enable parallel function calling during tool use.
*/
@encodedName("application/json", "parallel_tool_calls")
@added(ServiceApiVersions.v2024_07_01_preview)
parallelToolCalls?: boolean = true;

...OptionalNullableMetadata;
}

Expand Down
9 changes: 9 additions & 0 deletions specification/ai/OpenAI.Assistants/tools/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,15 @@ model RunStepFunctionToolCall extends RunStepToolCall {
@doc("The detailed information about the function called by the model.")
function: RunStepFunctionToolCallDetails;
}
/** A record of a call to a browser tool */
@added(ServiceApiVersions.v2024_07_01_preview)
model RunStepBingSearchToolCall extends RunStepToolCall {
/** The type of tool call. This is always going to be `browser` for this type of tool call.*/
type: "browser";

/** For now, this is always going to be an empty object. */
browser: Record<string>;
}

// Call details: Code Interpreter

Expand Down
5 changes: 5 additions & 0 deletions specification/ai/OpenAI.Assistants/tools/tool_resources.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ model CreateFileSearchToolResourceVectorStoreOptions {
@maxItems(10000)
fileIds: string[];

/** The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. */
@encodedName("application/json", "chunking_strategy")
@added(ServiceApiVersions.v2024_07_01_preview)
chunkingStrategy: VectorStoreChunkingStrategyRequest;

/** Set of 16 key-value pairs that can be attached to a vector store. This can be useful for storing additional information
* about the vector store in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of
* 512 characters long. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
{
"name": "body",
"in": "body",
"description": "Body parameter.",
"description": "The request details to use when creating a new assistant.",
"required": true,
"schema": {
"$ref": "#/definitions/AssistantCreationOptions"
Expand Down Expand Up @@ -242,7 +242,7 @@
{
"name": "body",
"in": "body",
"description": "Body parameter.",
"description": "The request details to use when modifying an existing assistant.",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateAssistantOptions"
Expand Down Expand Up @@ -552,7 +552,7 @@
{
"name": "body",
"in": "body",
"description": "Body parameter.",
"description": "The details used to create a new assistant thread.",
"required": true,
"schema": {
"$ref": "#/definitions/AssistantThreadCreationOptions"
Expand Down Expand Up @@ -615,7 +615,7 @@
{
"name": "body",
"in": "body",
"description": "Body parameter.",
"description": "The details used to update an existing assistant thread.",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateAssistantThreadOptions"
Expand Down Expand Up @@ -804,7 +804,7 @@
{
"name": "body",
"in": "body",
"description": "Body parameter.",
"description": "A single message within an assistant thread, as provided during that thread's creation for its initial state.",
"required": true,
"schema": {
"$ref": "#/definitions/ThreadMessageOptions"
Expand Down Expand Up @@ -1046,6 +1046,7 @@
{
"name": "body",
"in": "body",
"description": "The details used when creating a new run of an assistant thread.",
"required": true,
"schema": {
"$ref": "#/definitions/CreateRunOptions"
Expand Down Expand Up @@ -1428,7 +1429,7 @@
{
"name": "body",
"in": "body",
"description": "Body parameter.",
"description": "The details used when creating and immediately running a new assistant thread.",
"required": true,
"schema": {
"$ref": "#/definitions/CreateAndRunThreadOptions"
Expand Down Expand Up @@ -1570,7 +1571,7 @@
{
"name": "body",
"in": "body",
"description": "Body parameter.",
"description": "Request object for creating a vector store.",
"required": true,
"schema": {
"$ref": "#/definitions/VectorStoreOptions"
Expand Down Expand Up @@ -1633,7 +1634,7 @@
{
"name": "body",
"in": "body",
"description": "Body parameter.",
"description": "Request object for updating a vector store.",
"required": true,
"schema": {
"$ref": "#/definitions/VectorStoreUpdateOptions"
Expand Down Expand Up @@ -2715,6 +2716,12 @@
"x-nullable": true,
"x-ms-client-name": "responseFormat"
},
"parallel_tool_calls": {
"type": "boolean",
"description": "Whether to enable parallel function calling during tool use.",
"default": true,
"x-ms-client-name": "parallelToolCalls"
},
"metadata": {
"type": "object",
"description": "A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.",
Expand Down Expand Up @@ -2844,6 +2851,12 @@
"x-nullable": true,
"x-ms-client-name": "responseFormat"
},
"parallel_tool_calls": {
"type": "boolean",
"description": "Whether to enable parallel function calling during tool use.",
"default": true,
"x-ms-client-name": "parallelToolCalls"
},
"metadata": {
"type": "object",
"description": "A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.",
Expand Down Expand Up @@ -3486,6 +3499,56 @@
"file_id"
]
},
"MessageTextUrlCitationAnnotation": {
"type": "object",
"description": "A citation within the message that points to a specific quote from the webpage returned by the URL.\nGenerated when the assistant uses the \"browser\" tool to search the web.",
"properties": {
"url_citation": {
"$ref": "#/definitions/MessageTextUrlCitationDetails",
"description": "The details of the URL used in the text citation.",
"x-ms-client-name": "urlCitation"
},
"start_index": {
"type": "integer",
"format": "int32",
"description": "The first text index associated with this text annotation.",
"x-ms-client-name": "startIndex"
},
"end_index": {
"type": "integer",
"format": "int32",
"description": "The last text index associated with this text annotation.",
"x-ms-client-name": "endIndex"
}
},
"required": [
"url_citation"
],
"allOf": [
{
"$ref": "#/definitions/MessageTextAnnotation"
}
],
"x-ms-discriminator-value": "url_citation"
},
"MessageTextUrlCitationDetails": {
"type": "object",
"description": "A representation of the URL used for the text citation.",
"properties": {
"url": {
"type": "string",
"description": "The URL where the citation is from."
},
"title": {
"type": "string",
"description": "The title of the URL."
}
},
"required": [
"url",
"title"
]
},
"OpenAIFile": {
"type": "object",
"description": "Represents an assistant that can call the model and use tools.",
Expand Down Expand Up @@ -3847,6 +3910,28 @@
"metadata"
]
},
"RunStepBingSearchToolCall": {
"type": "object",
"description": "A record of a call to a browser tool",
"properties": {
"browser": {
"type": "object",
"description": "For now, this is always going to be an empty object.",
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"browser"
],
"allOf": [
{
"$ref": "#/definitions/RunStepToolCall"
}
],
"x-ms-discriminator-value": "browser"
},
"RunStepCodeInterpreterImageOutput": {
"type": "object",
"description": "A representation of an image output emitted by a code interpreter tool in response to a tool call by the model.",
Expand Down
Loading

0 comments on commit b9872e1

Please sign in to comment.