Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion specification/ai/Azure.AI.Unified/agents/common/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,4 @@ model ResponseFormatJsonSchema {

/** The JSON schema object, describing the response format. */
schema: unknown;
}
}
2 changes: 1 addition & 1 deletion specification/ai/Azure.AI.Unified/agents/files/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,4 @@ model FileDeletionStatus {

@doc("The object type, which is always 'file'.")
object: "file";
}
}
2 changes: 1 addition & 1 deletion specification/ai/Azure.AI.Unified/agents/files/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ op getFileContent is Azure.Core.Foundations.Operation<
fileId: string;
},
bytes
>;
>;
2 changes: 1 addition & 1 deletion specification/ai/Azure.AI.Unified/agents/main.tsp
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import "./models.tsp";
import "./routes.tsp";
import "./routes.tsp";
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ op updateMessage is Azure.Core.Foundations.Operation<
...OptionalNullableMetadata;
},
ThreadMessage
>;
>;
2 changes: 1 addition & 1 deletion specification/ai/Azure.AI.Unified/agents/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,4 @@ model AgentDeletionStatus {

@doc("The object type, which is always 'assistant.deleted'.")
object: "assistant.deleted";
}
}
2 changes: 1 addition & 1 deletion specification/ai/Azure.AI.Unified/agents/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,4 @@ op deleteAgent is Azure.Core.Foundations.Operation<
assistantId: string;
},
AgentDeletionStatus
>;
>;
Original file line number Diff line number Diff line change
Expand Up @@ -348,4 +348,4 @@ union RunAdditionalFieldList {

/** File search result content. */
FileSearchContents: "step_details.tool_calls[*].file_search.results[*].content",
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ op listRunSteps is Azure.Core.Foundations.Operation<
...OpenAIListRequestOptions;
},
OpenAIPageableListOf<RunStep>
>;
>;
2 changes: 1 addition & 1 deletion specification/ai/Azure.AI.Unified/agents/runs/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -479,4 +479,4 @@ union TruncationStrategy {

/** The thread will truncate to the `lastMessages` count of recent messages. */
lastMessages: "last_messages",
}
}
2 changes: 1 addition & 1 deletion specification/ai/Azure.AI.Unified/agents/runs/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -202,4 +202,4 @@ op createThreadAndRun is Azure.Core.Foundations.Operation<
...CreateAndRunThreadOptions;
},
ThreadRun
>;
>;
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,4 @@ union DoneEvent {

/** Event sent when the stream is done. */
Done: "done",
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ model ThreadDeletionStatus {

@doc("The object type, which is always 'thread.deleted'.")
object: "thread.deleted";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ op deleteThread is Azure.Core.Foundations.Operation<
threadId: string;
},
ThreadDeletionStatus
>;
>;
2 changes: 1 addition & 1 deletion specification/ai/Azure.AI.Unified/agents/tools/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -593,4 +593,4 @@ model AzureFunctionStorageQueue {
@doc("The name of an Azure function storage queue.")
@encodedName("application/json", "queue_name")
queueName: string;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -217,4 +217,4 @@ model UpdateFileSearchToolResourceOptions {
@maxItems(1)
@encodedName("application/json", "vector_store_ids")
vectorStoreIds?: string[];
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,4 @@ model VectorStoreConfigurations {
/** Configurations */
@encodedName("application/json", "configuration")
storeConfiguration: VectorStoreConfiguration;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ model VectorStoreFileBatch {
/** Files count grouped by status processed or being processed by this vector store. */
@encodedName("application/json", "file_counts")
fileCounts: VectorStoreFileCount;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ op listVectorStoreFileBatchFiles is Azure.Core.Foundations.Operation<
...OpenAIListRequestOptions;
},
OpenAIPageableListOf<VectorStoreFile>
>;
>;
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@ model VectorStoreFileDeletionStatus {

/** The object type, which is always 'vector_store.deleted'. */
object: "vector_store.file.deleted";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,4 @@ op deleteVectorStoreFile is Azure.Core.Foundations.Operation<
fileId: string;
},
VectorStoreFileDeletionStatus
>;
>;
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ import "./routes.tsp";

import "./common/main.tsp";
import "./files/main.tsp";
import "./file_batches/main.tsp";
import "./file_batches/main.tsp";
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,4 @@ model VectorStoreDeletionStatus {

/** The object type, which is always 'vector_store.deleted'. */
object: "vector_store.deleted";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@ op deleteVectorStore is Azure.Core.Foundations.Operation<
vectorStoreId: string;
},
VectorStoreDeletionStatus
>;
>;
2 changes: 1 addition & 1 deletion specification/ai/Azure.AI.Unified/client.tsp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "@azure-tools/typespec-client-generator-core";
import "./main.tsp";

using Azure.ClientGenerator.Core;
using Azure.ClientGenerator.Core;
133 changes: 69 additions & 64 deletions specification/ai/Azure.AI.Unified/common/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ model OutputPathAssetReference extends AssetReferenceBase {

#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance"
@doc("Base definition for an asset.")
model AssetBase {
model AssetBase {
@doc("Asset stage")
@visibility("read", "create", "update")
stage?: string;
Expand Down Expand Up @@ -260,69 +260,74 @@ alias ResourceCreatedResponse<T extends TypeSpec.Reflection.Model> = TypeSpec.Ht
alias OkResponse<T extends TypeSpec.Reflection.Model> = TypeSpec.Http.Response<200> &
T;

alias AdditionalInferenceRequestHeaders = {
@doc("""
Controls what happens if extra parameters, undefined by the REST API,
are passed in the JSON request payload.
This sets the HTTP request header `extra-parameters`.
""")
@header("extra-parameters")
extra_params?: ExtraParameters;
};

@doc("Controls what happens if extra parameters, undefined by the REST API, are passed in the JSON request payload.")
union ExtraParameters {
string,

@doc("The service will error if it detected extra parameters in the request payload. This is the service default.")
error: "error",

@doc("The service will ignore (drop) extra parameters in the request payload. It will only pass the known parameters to the back-end AI model.")
drop: "drop",

@doc("The service will pass extra parameters to the back-end AI model.")
pass_through: "pass-through",
}

// Pending upload spec

// Define a URI alias for clarity.
alias Uri = string;

enum PendingUploadType {
None,
TemporaryBlobReference,
}

enum PendingUploadCredentialType {
SAS,
}

model PendingUploadRequest {
/// If PendingUploadId is not provided, a random guid will be used.
pendingUploadId?: string;
/// TemporaryBlobReference is the only supported type.
pendingUploadType: PendingUploadType.TemporaryBlobReference;
}

model PendingUploadResponse {
/// Container-level read, write, list SAS.
blobReferenceForConsumption: BlobReferenceForConsumption;
/// ID for this upload request.
pendingUploadId: string;
/// TemporaryBlobReference is the only supported type.
pendingUploadType: PendingUploadType.TemporaryBlobReference;
}

model BlobReferenceForConsumption {
/// Blob URI path for client to upload data.
/// Example: https://blob.windows.core.net/Container/Path
blobUri: Uri;
/// ARM ID of the storage account to use.
storageAccountArmId: string;
/// Credential info to access the storage account.
credential: SasCredential;
}
alias AdditionalInferenceRequestHeaders = {
@doc("""
Controls what happens if extra parameters, undefined by the REST API,
are passed in the JSON request payload.
This sets the HTTP request header `extra-parameters`.
""")
@header("extra-parameters")
extra_params?: ExtraParameters;
};

@doc("Controls what happens if extra parameters, undefined by the REST API, are passed in the JSON request payload.")
union ExtraParameters {
string,

@doc("The service will error if it detected extra parameters in the request payload. This is the service default.")
error: "error",

@doc("The service will ignore (drop) extra parameters in the request payload. It will only pass the known parameters to the back-end AI model.")
drop: "drop",

@doc("The service will pass extra parameters to the back-end AI model.")
pass_through: "pass-through",
}

// Pending upload spec

// Define a URI alias for clarity.
alias Uri = string;

enum PendingUploadType {
None,
TemporaryBlobReference,
}

enum PendingUploadCredentialType {
SAS,
}

model PendingUploadRequest {
/// If PendingUploadId is not provided, a random guid will be used.
pendingUploadId?: string;

/// TemporaryBlobReference is the only supported type.
pendingUploadType: PendingUploadType.TemporaryBlobReference;
}

model PendingUploadResponse {
/// Container-level read, write, list SAS.
blobReferenceForConsumption: BlobReferenceForConsumption;

/// ID for this upload request.
pendingUploadId: string;

/// TemporaryBlobReference is the only supported type.
pendingUploadType: PendingUploadType.TemporaryBlobReference;
}

model BlobReferenceForConsumption {
/// Blob URI path for client to upload data.
/// Example: https://blob.windows.core.net/Container/Path
blobUri: Uri;

/// ARM ID of the storage account to use.
storageAccountArmId: string;

/// Credential info to access the storage account.
credential: SasCredential;
}

@doc("""
The definition of a caller-specified function that chat completions may invoke in response to matching user input.
Expand Down
16 changes: 10 additions & 6 deletions specification/ai/Azure.AI.Unified/connections/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,21 @@ interface Connections {
get is ConnectionOperations.ResourceRead<Connection>;

@doc("Get connection with secrets by name.")
getWithCredentials is ConnectionOperations.ResourceAction<Connection, {}, Connection>;
getWithCredentials is ConnectionOperations.ResourceAction<
Connection,
{},
Connection
>;

@doc("List all connections in the project")
list is ConnectionOperations.ResourceList<
Connection,
ListQueryParametersTrait<{
@doc("Specific type of connection to return in list")
@query("$connectionCategory")
connectionCategory?: ConnectionCategory,
@doc("Specific type of connection to return in list")
@query("$connectionCategory")
connectionCategory?: ConnectionCategory;

...StandardListQueryParameters;
}>
...StandardListQueryParameters;
}>
>;
}
1 change: 0 additions & 1 deletion specification/ai/Azure.AI.Unified/datasets/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ union DatasetType {
uri_folder: "uri_folder",
}


#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance"
@doc("DatasetVersion Definition")
@discriminator("datasetType")
Expand Down
2 changes: 1 addition & 1 deletion specification/ai/Azure.AI.Unified/datasets/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,6 @@ interface Datasets {

@doc("Pensing upload request.")
@body
pendingUploadRequest: PendingUploadRequest
pendingUploadRequest: PendingUploadRequest,
): PendingUploadResponse;
}
2 changes: 1 addition & 1 deletion specification/ai/Azure.AI.Unified/indexes/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ model EmbeddingConfiguration {
connectionId?: string;

@doc("Deployment name of embedding model")
deploymentName: string;
deploymentName: string;

@doc("Embedding field")
embeddingField: string;
Expand Down
2 changes: 1 addition & 1 deletion specification/ai/Azure.AI.Unified/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ namespace Azure.AI.Unified {
@useDependency(Azure.Core.Versions.v1_0_Preview_2)
`2025-05-01-preview`,
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -723,4 +723,4 @@ model ChatCompletionsAudio {

@doc("The transcript of the audio file.")
transcript: string;
}
}
2 changes: 1 addition & 1 deletion specification/ai/Azure.AI.Unified/models/embeddings.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,4 @@ model EmbeddingsOptions {
`model`?: string;

...Record<unknown>;
}
}
Loading
Loading