Skip to content
Merged
Show file tree
Hide file tree
Changes from 78 commits
Commits
Show all changes
165 commits
Select commit Hold shift + click to select a range
d47ca64
Draft of Unified AI Data Plane TypeSpec
needuv Jan 28, 2025
3b16f0c
fix errors
needuv Jan 28, 2025
7e3de07
add indexes to typespec
needuv Jan 29, 2025
c25ceb6
fix import
needuv Jan 29, 2025
c23d2ef
fix namespace
needuv Jan 29, 2025
de47def
clean up dataset and add in connections
needuv Jan 30, 2025
7bc8b83
fix type discriminator and some bad references
needuv Jan 30, 2025
d752776
fix a typo in UriFileDatasetVersion
needuv Jan 30, 2025
bf7ac9a
remove body from DatasetContainer
needuv Jan 30, 2025
f8a1d4f
fix import
needuv Jan 30, 2025
a19baec
remove creds from connection
needuv Feb 12, 2025
3f424dc
update index to match latest PR
needuv Feb 13, 2025
25b8531
add credentials back to connection
needuv Feb 14, 2025
538face
add getWithSecrets
needuv Feb 14, 2025
eca12fc
fix thing
needuv Feb 14, 2025
b916218
update connection based on spec feedback
needuv Feb 20, 2025
3f26160
add fields to model typespec
needuv Feb 24, 2025
51b3511
add query parameters
needuv Feb 25, 2025
efc3eaf
clean up evals namespace
needuv Feb 25, 2025
464cf9b
change evaluations/create to evaluations:create
needuv Feb 25, 2025
3daf517
fix typo
needuv Feb 25, 2025
fa63ef1
clean up common/models.tsp and add inference APIs
needuv Feb 25, 2025
813f207
fix some errors and rename file
needuv Feb 25, 2025
6c83724
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
needuv Feb 25, 2025
c1fd302
update with latest PR
needuv Feb 25, 2025
7bd9414
make functiondefinition a common model
needuv Feb 26, 2025
bdfd6a3
fix a missing ;
needuv Feb 26, 2025
23d5e2b
Asset contract changes (#32833)
adyada Mar 3, 2025
da96e87
fix some comments
needuv Mar 3, 2025
37f9a36
fix some more comments
needuv Mar 3, 2025
1eeebba
fix some more comments
needuv Mar 3, 2025
82ca70a
fix up pending upload request names
needuv Mar 3, 2025
6547b93
fix dataset route for pending upload
needuv Mar 3, 2025
0d1be7a
attempt to move to azure core operations for connection only
needuv Mar 3, 2025
71c492d
fix connections based on errors
needuv Mar 3, 2025
39e24ae
attempt to fix credentials
needuv Mar 3, 2025
6140053
fix connections list with secrets route
needuv Mar 3, 2025
b42737c
remove @route decorator
needuv Mar 3, 2025
07026b8
make models into a resource
needuv Mar 3, 2025
c7ab298
remove connection paged response
needuv Mar 3, 2025
b717a1f
fix up some issues
needuv Mar 3, 2025
23361ff
update index with latest spec
needuv Mar 5, 2025
459530a
fix duped names
needuv Mar 5, 2025
cf4b9b8
fix thing
needuv Mar 5, 2025
6a6c061
connection id is optional for embedding
needuv Mar 6, 2025
ef6206d
change index create to POST, add cosmosdb as connection type
needuv Mar 6, 2025
cf6afcb
fix tsp error
needuv Mar 6, 2025
9c7951a
First
dargilco Mar 11, 2025
8c827c0
Run `npx tsp format **\*.tsp` (#33117)
dargilco Mar 11, 2025
ddcad33
Merge branch 'feature/azure-ai-projects-1dp' of https://github.com/Az…
dargilco Mar 11, 2025
6da4036
separate deployments from models
needuv Mar 11, 2025
b112157
Merge branch 'feature/azure-ai-projects-1dp' of https://github.com/Az…
needuv Mar 11, 2025
b0c8c8f
make asset base an alias
needuv Mar 11, 2025
620252d
fix up some errors in tsp
needuv Mar 11, 2025
e02c662
Run `npx tsp format **\*.tsp` again
dargilco Mar 11, 2025
1470b01
Revert change to client.tsp that got in prematurely. I'll send a PR f…
dargilco Mar 11, 2025
c156acc
Fix all compilation errors (#33143)
dargilco Mar 12, 2025
025e612
Rename root folder to Azure.AI.Projects
needuv Mar 12, 2025
7f74f9d
delete azure.ai.unified dir
needuv Mar 12, 2025
91621e8
clean up connections
needuv Mar 12, 2025
28ee55a
remove inference routes from tsp
needuv Mar 12, 2025
c83b455
Additional changes to support SDK emitters (#33184)
dargilco Mar 13, 2025
3bde64e
update evaluations operations
needuv Mar 13, 2025
4200597
Merge branch 'feature/azure-ai-projects-1dp' of https://github.com/Az…
needuv Mar 13, 2025
dd26409
fix id being optional
needuv Mar 13, 2025
2d2713e
align to old naming
needuv Mar 13, 2025
423cfa7
Rename package and folder to azure-ai-projects-dp1 (#33195)
dargilco Mar 14, 2025
eba4829
add visibility param to key
needuv Mar 14, 2025
5afee09
Update ConnectionType enum (#33224)
dargilco Mar 17, 2025
7afc1fc
Remove Extraneous Fields from Connection and Deployment (#33245)
needuv Mar 17, 2025
94a064d
Dataset Review Feedback (#33252)
needuv Mar 19, 2025
72c43a5
Add service pattern templates for 1dp azure ai projects (#33235)
johanste Mar 19, 2025
18ae7d3
Change Name of Autoincrement API (#33353)
needuv Mar 21, 2025
224e34e
Incorporate Index Feedback (#33243)
needuv Mar 21, 2025
259fd62
Version-less Pending Upload API (#33399)
needuv Mar 21, 2025
8e92721
Rename folder and namespace from Agents to Assistants (#33452)
dargilco Mar 24, 2025
0358d69
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Mar 25, 2025
7ef8a1b
Fix some of the build breaks due to new TypeSpec tools
dargilco Mar 25, 2025
7636ae6
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Mar 25, 2025
38a557e
Fix error due to new tools: `error deprecated: Deprecated: Implicit m…
dargilco Mar 25, 2025
99c2ba2
Remove $ from query param, remove system data, align list/listLatest …
needuv Mar 25, 2025
0ff89ea
Fix formt after running `npx tsp format **\*.tsp`
dargilco Mar 26, 2025
44bd943
Bring over latest Agent typespec files from branch feature/azure-ai-p…
dargilco Mar 26, 2025
253f637
Remove all $ from query params (#33512)
needuv Mar 26, 2025
b54a5bf
Add API key auth via the header `Authorization: Bearer <key>` (#33516)
dargilco Mar 26, 2025
ee7434e
Change connectionName to name (#33534)
needuv Mar 27, 2025
c6f364f
Fix startPendingUploadAutoIncrement (#33525)
dargilco Mar 28, 2025
a42d770
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Mar 28, 2025
8f4b306
Address some additional TypeSpec issues (#33566)
dargilco Mar 28, 2025
6aa7a83
Azure ai projects eval result asset (#33544)
kseager Mar 29, 2025
a2cf44d
[Eval Service Team] Red Team Cloud 1DP (#33287)
kseager Mar 29, 2025
a7ebee8
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Mar 31, 2025
87ded34
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Mar 31, 2025
fb20a8a
Remove credentials folder and fix some route names (#33587)
needuv Mar 31, 2025
59765e4
Create a separate TypeSpec project for Assistants (#33586)
dargilco Mar 31, 2025
146de83
Remove Azure.AI.Assistant TypeSpec from this branch
dargilco Mar 31, 2025
ec313e9
Add API Versions to Projects TypeSpec (#33631)
needuv Apr 1, 2025
b3f7bb6
Fix Spellcheck Gate for Projects TypeSpec (#33636)
needuv Apr 1, 2025
7d7d9c1
Set the api-version used by emitted SDKs (#33642)
dargilco Apr 2, 2025
7c15876
Fix output folder structure in emitted Python code
dargilco Apr 3, 2025
0e94eff
Fix startPendingUpload path for versioned API (#33710)
needuv Apr 3, 2025
942a952
Make sure this TypeSpec PR is green with regards to Python SDK emitte…
dargilco Apr 3, 2025
d88cedd
Fix C# SdkTspConfigValidation validation failures
dargilco Apr 4, 2025
64e1df4
remove eval result from public (#33729)
kseager Apr 4, 2025
34fb652
regenerate swagger (#33739)
needuv Apr 4, 2025
f5cc96a
Another round of updates to /connections, /datasets & /indexes operat…
dargilco Apr 10, 2025
124f9c4
Update swagger files
dargilco Apr 10, 2025
6808e70
Get download sas API (#33845)
andscho-msft Apr 10, 2025
158c805
updated swaggers (#33898)
needuv Apr 11, 2025
ee66023
Users/singankit/evaluation create return 201 (#33946)
singankit Apr 15, 2025
5281df4
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Apr 16, 2025
cfbfe4a
Add connection operations with credentials (#33929)
dargilco Apr 16, 2025
ad7c697
Add PATCH for Asset Create/Update (#34021)
needuv Apr 17, 2025
fb7f51d
RedTeam Updates from implementation (#34023)
kseager Apr 21, 2025
b348cf3
Merge branch 'feature/azure-ai-projects-1dp' of https://github.com/Az…
dargilco Apr 21, 2025
d167b37
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Apr 21, 2025
e18c2b3
Remove api-key auth (#34097)
dargilco Apr 22, 2025
3daea95
Remove Asset PUT (#34133)
needuv Apr 22, 2025
1826d5d
Update comment from `Assistants` to `Agents`, since we decided to use…
dargilco Apr 22, 2025
3cad6f7
API for create agent evaluation run (#34034)
YusakuNo1 Apr 22, 2025
85bc07f
Fix TypeSpec compile errors from previous commit
dargilco Apr 23, 2025
6c65932
Red-Team Target API Definition (#34144)
kseager Apr 23, 2025
18ac3fe
fix spell check gate (#34181)
needuv Apr 23, 2025
0f4d35b
Remove listing connections with credentials (#34148)
dargilco Apr 24, 2025
8e6db4e
Switch AppInsights connection string to be mandatory for SDKs and add…
YusakuNo1 Apr 24, 2025
ca3a9a1
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Apr 25, 2025
0f04d88
Drop the 'onedp' name in emitted Python SDK package and folder
dargilco Apr 25, 2025
1de9b3d
Update swagger
dargilco Apr 25, 2025
88f1797
Auto fix to file red-teams/models.tsp after running `npx tsv .`
dargilco Apr 25, 2025
6e1b668
Add Type Filter to Deployment List (#34247)
needuv Apr 25, 2025
cffd345
Fix SdkTspConfigValidation issues (#34248)
dargilco Apr 25, 2025
fc0e897
Merge branch 'feature/azure-ai-projects-1dp' of https://github.com/Az…
dargilco Apr 25, 2025
a7c428f
Add examples and readme.md for Azure.AI.Projects (#34220)
needuv Apr 25, 2025
c4cc5cf
fix spell check (#34253)
needuv Apr 25, 2025
eddee22
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Apr 25, 2025
791e17a
Fix Java language failure
dargilco Apr 25, 2025
12693f9
Rename latest api version to v1 (#34288)
needuv Apr 28, 2025
45d9ebe
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Apr 28, 2025
8a44a2e
Users/singankit/update evaluation name (#34301)
singankit Apr 28, 2025
7169a24
Fix all Java, Go & Python issues in SdkTspConfigValidation when runni…
dargilco Apr 29, 2025
ae3b04f
Suppress JS emitter errors related to package and dir name missing th…
dargilco Apr 29, 2025
364bf26
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Apr 29, 2025
1ada3b6
Address comments from SDK review meeting (#34273)
dargilco Apr 29, 2025
a1a907a
asset contract changes. (#34197)
adyada Apr 29, 2025
8bd4f87
Fix Dataset Swagger Validation (#34339)
needuv Apr 29, 2025
287eea2
Additional round of updates (#34333)
dargilco Apr 29, 2025
ef6f829
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco Apr 29, 2025
9f83acd
Add continuationToken decorator for dataset/index list (#34372)
needuv Apr 30, 2025
dfb5351
Update scope
dargilco May 1, 2025
cef2df3
Usesr/singankit/evaluation review feedback (#34427)
singankit May 2, 2025
6955430
Fix typo in doc string
dargilco May 3, 2025
e4c203f
Fix Swagger Avocado
dargilco May 3, 2025
8de48d8
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco May 3, 2025
57e9831
Add evaluation Id (#34391)
YusakuNo1 May 5, 2025
2ba3e2e
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco May 5, 2025
be01be1
Add missing connection id (#34434)
dargilco May 5, 2025
b12cfaa
[Red Team] clean-up contract details (#34444)
kseager May 5, 2025
11c4578
Make PATCH Content-Type Header application/merge-patch+json (#34449)
needuv May 5, 2025
6f9fde3
Remove List Query Parameters and Dataset Credentials Body (#34471)
needuv May 6, 2025
a5177ca
Add Index Field Mapping (#34476)
needuv May 6, 2025
04f19c9
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco May 7, 2025
0075ada
Remove pagination query params from the /connection list operation (#…
dargilco May 7, 2025
8c6ed71
Merge remote-tracking branch 'origin/main' into feature/azure-ai-proj…
dargilco May 8, 2025
101e4e0
Add optional connectionName to DatasetVersion (#34521)
dargilco May 8, 2025
07a63ad
Fix TypeSpec Validation and Address Minor Feedback (#34536)
needuv May 8, 2025
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
176 changes: 176 additions & 0 deletions specification/ai/Azure.AI.Projects/assistants/common/models.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
import "@typespec/http";
import "@typespec/versioning";

using TypeSpec.Http;
using TypeSpec.Versioning;

namespace Azure.AI.Projects.Assistants;

@doc("The possible values for roles attributed to messages in a thread.")
union MessageRole {
string,

@doc("The role representing the end-user.")
user: "user",

@doc("The role representing the agent.")
agent: "assistant",
}

@doc("The available sorting options when requesting a list of response objects.")
union ListSortOrder {
string,

@doc("Specifies an ascending sort order.")
ascending: "asc",

@doc("Specifies a descending sort order.")
descending: "desc",
}

alias OpenAIListRequestOptions = {
@doc("A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.")
@query
limit?: int32 = 20;

@doc("Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.")
@query
order?: ListSortOrder = ListSortOrder.descending;

@doc("A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.")
@query
after?: string;

@doc("A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.")
@query
before?: string;
};

#suppress "@azure-tools/typespec-azure-core/casing-style" "OpenAI is a case-sensitive name"
@doc("The response data for a requested list of items.")
model OpenAIPageableListOf<T> {
@doc("The object type, which is always list.")
object: "list";

@doc("The requested list of items.")
data: T[];

@encodedName("application/json", "first_id")
@doc("The first ID represented in this list.")
firstId: string;

@encodedName("application/json", "last_id")
@doc("The last ID represented in this list.")
lastId: string;

@encodedName("application/json", "has_more")
@doc("A value indicating whether there are additional values available not captured in this list.")
hasMore: boolean;
}

alias DeletionStatus = {
@doc("The ID of the resource specified for deletion.")
id: string;

@doc("A value indicating whether deletion was successful.")
deleted: boolean;
};

alias RequiredNullableMetadata = {
/**
* 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.
*/
#suppress "@azure-tools/typespec-azure-core/no-nullable" "OpenAI uses explicit nullability, distinct from optionality"
metadata: Record<string> | null;
};

alias OptionalNullableMetadata = {
/**
* 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.
*/
#suppress "@azure-tools/typespec-azure-core/no-nullable" "OpenAI uses explicit nullability, distinct from optionality"
metadata?: Record<string> | null;
};

/**
* Specifies the format that the model must output. Compatible with GPT-4 Turbo and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
*
* Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is valid JSON.
*
* **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.
*/
#suppress "@azure-tools/typespec-autorest/union-unsupported" "This union is defined according to the OpenAI API"
union AgentsApiResponseFormatOption {
string,

/** The model will handle the return format. */
AgentsApiResponseFormatMode,

/** Sets the format of the output of the model when a ToolCall is returned. */
AgentsApiResponseFormat,

/** Using `json_schema` format will provide a description of what the response format is for. */
ResponseFormatJsonSchemaType,
}

/** Represents the mode in which the model will handle the return format of a tool call. */
union AgentsApiResponseFormatMode {
string,

/** Default value. Let the model handle the return format. */
"auto",

/** Setting the value to `none`, will result in a 400 Bad request. */
"none",
}

/**
* An object describing the expected output of the model. If `json_object` only `function` type `tools` are allowed to be passed to the Run.
* If `text` the model can return text or any value needed.
*/
model AgentsApiResponseFormat {
/** Must be one of `text` or `json_object`. */
type?: ResponseFormat = ResponseFormat.text;
}

/** Possible API response formats. */
#suppress "@azure-tools/typespec-autorest/union-unsupported" "OpenAPI v2 support deferred"
union ResponseFormat {
string,

/** `text` format should be used for requests involving any sort of ToolCall. */
text: "text",

/** Using `json_object` format will limit the usage of ToolCall to only functions. */
jsonObject: "json_object",
}

/**
* The type of response format being defined: `json_schema`
*/
model ResponseFormatJsonSchemaType {
/** Type */
type: "json_schema";

/** The JSON schema, describing response format. */
@encodedName("application/json", "json_schema")
jsonSchema: ResponseFormatJsonSchema;
}

/**
* A description of what the response format is for, used by the model to determine how to respond in the format.
*/
#suppress "@azure-tools/typespec-azure-core/no-unknown" "JSON schema takes an arbitrary json"
model ResponseFormatJsonSchema {
/** A description of what the response format is for, used by the model to determine how to respond in the format. */
description?: string;

/** The name of a schema. */
name: string;

/** The JSON schema object, describing the response format. */
schema: unknown;
}
Empty file.
121 changes: 121 additions & 0 deletions specification/ai/Azure.AI.Projects/assistants/files/models.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
import "@typespec/versioning";

namespace Azure.AI.Projects.Assistants;

using TypeSpec.Versioning;

#suppress "@azure-tools/typespec-azure-core/casing-style" "OpenAI is a case-sensitive name"
@doc("Represents an agent that can call the model and use tools.")
model OpenAIFile {
@doc("The object type, which is always 'file'.")
object: "file";

@doc("The identifier, which can be referenced in API endpoints.")
id: string;

@doc("The size of the file, in bytes.")
bytes: int32;

@doc("The name of the file.")
filename: string;

@encodedName("application/json", "created_at")
@encode(DateTimeKnownEncoding.unixTimestamp, int32)
@doc("The Unix timestamp, in seconds, representing when this object was created.")
createdAt: utcDateTime;

@doc("The intended purpose of a file.")
purpose: FilePurpose;

/** The state of the file. This field is available in Azure OpenAI only. */
status?: FileState;

/** The error message with details in case processing of this file failed. This field is available in Azure OpenAI only. */
@encodedName("application/json", "status_details")
statusDetails?: string;
}

/** The state of the file. */
union FileState {
string,

/**
* The file has been uploaded but it's not yet processed. This state is not returned by Azure OpenAI and exposed only for
* compatibility. It can be categorized as an inactive state.
*/
uploaded: "uploaded",

/**
* The operation was created and is not queued to be processed in the future. It can be categorized as an inactive state.
*/
pending: "pending",

/** The operation has started to be processed. It can be categorized as an active state. */
running: "running",

/**
* The operation has successfully processed and is ready for consumption. It can be categorized as a terminal state.
*/
processed: "processed",

/**
* The operation has completed processing with a failure and cannot be further consumed. It can be categorized as a terminal state.
*/
error: "error",

/**
* The entity is in the process to be deleted. This state is not returned by Azure OpenAI and exposed only for compatibility.
* It can be categorized as an active state.
*/
deleting: "deleting",

/**
* The entity has been deleted but may still be referenced by other entities predating the deletion. It can be categorized as a
* terminal state.
*/
deleted: "deleted",
}

/** The possible values denoting the intended usage of a file. */
union FilePurpose {
string,

/** Indicates a file is used for fine tuning input. */
fineTune: "fine-tune",

/** Indicates a file is used for fine tuning results. */
fineTuneResults: "fine-tune-results",

/** Indicates a file is used as input to agents. */
agents: "assistants",

/** Indicates a file is used as output by agents. */
agentsOutput: "assistants_output",

/** Indicates a file is used as input to . */
batch: "batch",

/** Indicates a file is used as output by a vector store batch operation. */
batchOutput: "batch_output",

/** Indicates a file is used as input to a vision operation. */
vision: "vision",
}

@doc("The response data from a file list operation.")
model FileListResponse {
@doc("The object type, which is always 'list'.")
object: "list";

@doc("The files returned for the request.")
data: OpenAIFile[];
}

#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "https://github.com/Azure/autorest.csharp/issues/4041"
@doc("A status response from a file deletion operation.")
model FileDeletionStatus {
...DeletionStatus;

@doc("The object type, which is always 'file'.")
object: "file";
}
Loading
Loading