Skip to content

Risinh/update version test #36571

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 57 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
e05b8b8
Unified Evaluation API Spec (Version upgrade)
risinhmicrosoft Jul 22, 2025
8c9d7a2
updating tspconfig.yaml
risinhmicrosoft Jul 22, 2025
f813b06
Use flat scores
risinhmicrosoft Jul 23, 2025
4f2bac1
Updating routes + Removing Agent run evaluation
risinhmicrosoft Jul 23, 2025
0468dfb
rename items to messages
risinhmicrosoft Jul 23, 2025
a6a622d
Updating InlineJsonDataSource to InlineDataSource
risinhmicrosoft Jul 23, 2025
c6c4682
Updating discriminator values
risinhmicrosoft Jul 23, 2025
f006379
initial modeling for real-time api evaluation (#36147)
kseager Jul 24, 2025
d916916
Merge branch 'main' into risinh/UnifiedEvalApiV2
risinh Jul 28, 2025
321cb1a
Merge
risinhmicrosoft Jul 28, 2025
ec4154a
Update result model
risinhmicrosoft Jul 28, 2025
a3e5d05
Fix example
risinhmicrosoft Jul 28, 2025
20d6687
Adding standard deviation
risinhmicrosoft Jul 29, 2025
e21c267
confidence interval
risinhmicrosoft Jul 29, 2025
dac0d12
Addressing feedback from API review
risinhmicrosoft Jul 31, 2025
cc34c7c
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
risinhmicrosoft Jul 31, 2025
dcbe5fd
nit fixing names
risinhmicrosoft Jul 31, 2025
ffdc523
Update to runBatch
risinhmicrosoft Jul 31, 2025
e643fab
Readme update
risinhmicrosoft Aug 1, 2025
32e1a67
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
risinhmicrosoft Aug 1, 2025
49877f4
Example Added
risinhmicrosoft Aug 1, 2025
0fb4139
Fix examples
risinhmicrosoft Aug 1, 2025
ec47791
Fix paths
risinhmicrosoft Aug 1, 2025
be8973b
Revert older version changes
risinhmicrosoft Aug 1, 2025
a3e225e
Revert changes to older version
risinhmicrosoft Aug 1, 2025
c0b953e
Reverting more changes
risinhmicrosoft Aug 1, 2025
6e6ebef
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
risinhmicrosoft Aug 1, 2025
38c0b47
Adding Examples
risinhmicrosoft Aug 1, 2025
b220370
adding 2 MB limit
risinhmicrosoft Aug 2, 2025
66912c1
Fix version in examples
risinhmicrosoft Aug 2, 2025
501b5f9
Added deprecated in route
risinhmicrosoft Aug 2, 2025
b9bb23d
Adding comment
risinhmicrosoft Aug 2, 2025
3c6ae41
Update name to id in new version of API
risinhmicrosoft Aug 2, 2025
2ed63ee
Fix
risinhmicrosoft Aug 4, 2025
0af086d
Model validation fixes
risinhmicrosoft Aug 4, 2025
6648074
EvaluationMessages -> EvaluatorMessages
risinhmicrosoft Aug 4, 2025
4db6668
Fix model for labels
risinhmicrosoft Aug 4, 2025
c20ba2e
Fixed examples for deprecated endpoints
risinhmicrosoft Aug 4, 2025
38c438c
Removed deprecated routes
risinhmicrosoft Aug 4, 2025
68ec9d1
Removed not needed files
risinhmicrosoft Aug 4, 2025
78b4491
Correct Api-version in tspconfig.yaml
risinhmicrosoft Aug 4, 2025
09eaf0c
Using OneEvaluation Model as request and response
risinhmicrosoft Aug 5, 2025
8da4905
Remove state from individual result & put usage within metrics
risinhmicrosoft Aug 5, 2025
24ef6a7
Update image url message type
risinhmicrosoft Aug 6, 2025
ea951ca
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
risinhmicrosoft Aug 6, 2025
a2f8ff6
Removing request from response payload for OneEvaluation
risinhmicrosoft Aug 6, 2025
f943899
Fix example
risinhmicrosoft Aug 6, 2025
5cb2bf7
Mark API is deprecated
risinhmicrosoft Aug 6, 2025
39d606f
Remove b64_json
risinhmicrosoft Aug 6, 2025
9d9b710
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
risinhmicrosoft Aug 6, 2025
1e639af
Fix image_url
risinhmicrosoft Aug 6, 2025
84a4673
Adding error field as well in evaluator status
risinhmicrosoft Aug 8, 2025
fe1366b
Fix error message
risinhmicrosoft Aug 8, 2025
bf54fe4
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
risinhmicrosoft Aug 8, 2025
12098d2
merge latest + fix tsp validation
risinhmicrosoft Aug 8, 2025
c915452
Fixed inline source to not return user data
risinhmicrosoft Aug 8, 2025
f4eb822
Using latest version
risinhmicrosoft Aug 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
23 changes: 23 additions & 0 deletions specification/ai/Azure.AI.Projects/common/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";

namespace Azure.AI.Projects;
using TypeSpec.Versioning;

alias AssetBase = {
@doc("Asset ID, a unique identifier for the asset")
Expand Down Expand Up @@ -115,3 +116,25 @@ model AssetCredentialResponse {
@doc("Credential info to access the storage account.")
blobReference: BlobReference;
}

@doc("Azure OpenAI model configuration. The API version would be selected by the service for querying the model.")
@added(Versions.v2025_05_15_preview)
model AzureOpenAIModelConfiguration extends TargetConfig {
@visibility(Lifecycle.Read)
type: "AzureOpenAIModel";

@doc("Deployment name for AOAI model. Example: gpt-4o if in AIServices or connection based `connection_name/deployment_name` (e.g. `my-aoai-connection/gpt-4o`).")
modelDeploymentName: string;

@doc("Optional model-specific parameters to fine-tune behavior during evaluation. These may include temperature, max tokens, top-p, frequency penalty, and other model configuration options supported by the deployment.")
@added(Versions.v2025_07_31_preview)
modelParameters?: Record<unknown>;
}

@doc("Abstract class for target configuration.")
@added(Versions.v2025_05_15_preview)
@discriminator("type")
model TargetConfig {
@doc("Type of the model configuration.")
type: string;
}
139 changes: 139 additions & 0 deletions specification/ai/Azure.AI.Projects/evaluations/chat_messages.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";
import "../common/models.tsp";
import "../main.tsp";
import "@typespec/openapi";

using TypeSpec.Versioning;

namespace Azure.AI.Projects;

@doc("Content for AI requests and responses.")
@discriminator("type")
@added(Versions.v2025_07_31_preview)
model AIContent {
@doc("The content of the message.")
type: "text" | "image_url" | "tool_call" | "tool_result" | string;
}

@doc("Content for text messages in AI conversations.")
@added(Versions.v2025_07_31_preview)
model TextContent extends AIContent {
@doc("The content of the text message.")
type: "text";

@doc("The text content of the message.")
text: string;
}

@doc("Image source")
@added(Versions.v2025_07_31_preview)
model ImageSource {
@doc("A publicly accessible image URL.")
url?: string;
}

@doc("Content for image URL messages in AI conversations.")
@added(Versions.v2025_07_31_preview)
model ImageUrlContent extends AIContent {
@doc("The content of the image URL message.")
type: "image_url";

@doc("The URL of the image.")
image_url: ImageSource;
}

@doc("Content for text messages in AI conversations.")
@added(Versions.v2025_07_31_preview)
model ToolCallContent extends AIContent {
@doc("The content of the tool call.")
type: "tool_call";

@doc("The name of the tool being called.")
name: string;

@doc("The unique identifier of the tool call.")
toolCallId: string;

@doc("The parameters for the tool call in JSON format.")
arguments: Record<unknown>;
}

@doc("Content for tool results in AI conversations.")
@added(Versions.v2025_07_31_preview)
model ToolResultContent extends AIContent {
@doc("The content of the tool result.")
type: "tool_result";

@doc("The result of the tool call in JSON format.")
results: Record<unknown>;
}

@doc("Abstract base model representing a single message in a conversation.")
@discriminator("role")
@added(Versions.v2025_05_15_preview)
model Message {
@doc("The role of the message author. Known values: 'system', 'assistant', 'developer', 'user'.")
role: "system" | "assistant" | "developer" | "user" | string;
}

@doc("A message authored by the system to guide model behavior.")
@added(Versions.v2025_05_15_preview)
model SystemMessage extends Message {
@doc("Indicates this is a system message.")
role: "system";

#suppress "@azure-tools/typespec-autorest/union-unsupported" "External API shape is defined in OpenAPI 3.0 as oneOf."
@doc("Plain text instructions provided by the system to steer model behavior.")
@typeChangedFrom(Versions.v2025_07_31_preview, string)
content: AIContent[] | string;
}

@doc("A message authored by a developer to guide the model during evaluation.")
@added(Versions.v2025_05_15_preview)
model DeveloperMessage extends Message {
@doc("Indicates this is a developer message.")
role: "developer";

#suppress "@azure-tools/typespec-autorest/union-unsupported" "External API shape is defined in OpenAPI 3.0 as oneOf."
@doc("Content provided by a developer to guide model behavior in an evaluation context.")
@typeChangedFrom(Versions.v2025_07_31_preview, string)
content: AIContent[] | string;
}

@doc("A message authored by the end user as input to the model.")
@added(Versions.v2025_05_15_preview)
model UserMessage extends Message {
@doc("Indicates this is a user message.")
role: "user";

#suppress "@azure-tools/typespec-autorest/union-unsupported" "External API shape is defined in OpenAPI 3.0 as oneOf."
@doc("Input content or question provided by the end user.")
@typeChangedFrom(Versions.v2025_07_31_preview, string)
content: AIContent[] | string;
}

@doc("A message generated by the assistant in response to previous messages.")
@added(Versions.v2025_05_15_preview)
model AssistantMessage extends Message {
@doc("Indicates this is an assistant message.")
role: "assistant";

#suppress "@azure-tools/typespec-autorest/union-unsupported" "External API shape is defined in OpenAPI 3.0 as oneOf."
@doc("Response content generated by the assistant.")
@typeChangedFrom(Versions.v2025_07_31_preview, string)
content: AIContent[] | string;
}

@doc("Definition of a tool that can be used by the agent.")
@added(Versions.v2025_07_31_preview)
model AgentToolDefinition {
@doc("The name of the tool.")
name: string;

@doc("The description of the tool.")
description?: string;

@doc("The parameters for the tool in JSON Schema format.")
parameters: Record<unknown>;
}
Loading
Loading