Skip to content

Commit

Permalink
Fix some deprecations from valueof PR (#29126)
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheeguerin authored May 16, 2024
1 parent 91cbb69 commit 2cfedcb
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions specification/ai/OpenAI.Assistants/assistants/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ model Assistant {
instructions: string | null;

@doc("The collection of tools enabled for the assistant.")
tools: ToolDefinition[] = [];
tools: ToolDefinition[] = #[];

@encodedName("application/json", "file_ids")
@doc("A list of attached file IDs, ordered by creation date in ascending order.")
fileIds: string[] = [];
fileIds: string[] = #[];

...RequiredNullableMetadata;
}
Expand All @@ -66,11 +66,11 @@ model AssistantCreationOptions {

#suppress "@azure-tools/typespec-azure-core/no-nullable" "OpenAI uses explicit nullability, distinct from optionality"
@doc("The collection of tools to enable for the new assistant.")
tools?: ToolDefinition[] = [];
tools?: ToolDefinition[] = #[];

@encodedName("application/json", "file_ids")
@doc("A list of previously uploaded file IDs to attach to the assistant.")
fileIds?: string[] = [];
fileIds?: string[] = #[];

...OptionalNullableMetadata;
}
Expand Down Expand Up @@ -98,11 +98,11 @@ model UpdateAssistantOptions {
instructions?: string | null;

@doc("The modified collection of tools to enable for the assistant.")
tools?: ToolDefinition[] = [];
tools?: ToolDefinition[] = #[];

@encodedName("application/json", "file_ids")
@doc("The modified list of previously uploaded fileIDs to attach to the assistant.")
fileIds?: string[] = [];
fileIds?: string[] = #[];

...OptionalNullableMetadata;
}
Expand Down
2 changes: 1 addition & 1 deletion specification/ai/OpenAI.Assistants/messages/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ model ThreadInitializationMessage {
A list of file IDs that the assistant should use. Useful for tools like retrieval and code_interpreter that can
access files.
""")
fileIds?: string[] = [];
fileIds?: string[] = #[];

...OptionalNullableMetadata;
}
Expand Down
4 changes: 2 additions & 2 deletions specification/ai/OpenAI.Assistants/runs/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ model ThreadRun {
instructions: string;

@doc("The overridden enabled tools used for this assistant thread run.")
tools: ToolDefinition[] = [];
tools: ToolDefinition[] = #[];

@encodedName("application/json", "file_ids")
@doc("A list of attached file IDs, ordered by creation date in ascending order.")
fileIds: string[] = [];
fileIds: string[] = #[];

@encodedName("application/json", "created_at")
@encode(DateTimeKnownEncoding.unixTimestamp, int32)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ model ScoringRuleOptions {
batchSize?: int32 = 20;

@doc("List of extra parameters from a job that will be sent as part of the payload to scoring rule. If not set, a job's labels (sent in the payload as `job`) and a job's worker selectors (sent in the payload as `selectors`) are added to the payload of the scoring rule by default. Note: Worker labels are always sent with scoring payload.")
scoringParameters?: ScoringRuleParameterSelector[] = [
scoringParameters?: ScoringRuleParameterSelector[] = #[
ScoringRuleParameterSelector.jobLabels,
ScoringRuleParameterSelector.workerSelectors
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ model CertManagerIssuerRef {
@doc("SANs for certificate.")
model SanForCert {
@doc("DNS SANs.")
dns: string[] = [];
dns: string[] = #[];

@doc("IP address SANs.")
ip: string[] = [];
ip: string[] = #[];
}

@doc("Mqtt Protocol types")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ model PrincipalDefinition {
#suppress "@azure-tools/typespec-azure-resource-manager/arm-no-record" "existing API"
@doc("A list of key-value pairs that match the attributes of the clients. The attributes are case-sensitive and must match the attributes provided by the clients during authentication.")
@OpenAPI.extension("x-ms-identifiers", [])
attributes?: Record<string>[] = [];
attributes?: Record<string>[] = #[];

@doc("A list of client IDs that match the clients. The client IDs are case-sensitive and must match the client IDs provided by the clients during connection.")
clientids?: string[];
Expand Down

0 comments on commit 2cfedcb

Please sign in to comment.