Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,22 @@ using Azure.Data.AI;
// `details` lists nested errors. Python and JavaScript expose both on ProblemDetails, so
// rename `detail` in those clients only; the wire name (detail) is unchanged.
@@clientName(ProblemDetails.detail, "explanation", "python, javascript");

// The response envelope is renamed first so the operation result model can take the
// SemanticRerankingResult name.
@@clientName(
SemanticRerankingResult,
"SemanticRerankingOperationResult",
"csharp"
);
@@clientName(
SemanticRerankingInferenceResult,
"SemanticRerankingResult",
"csharp"
);
@@clientName(
SemanticRerankingInferenceContent,
"SemanticRerankingOptions",
"csharp"
);
@@clientName(MetaResult, "SemanticRerankingMetadata", "csharp");
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
}

/** The input for a semantic reranking operation. */
#suppress "@azure-tools/typespec-client-generator-core/csharp-model-suffix" "This request model is the options bag passed to SemanticRerank, so the Options suffix is intended."
model SemanticRerankingInferenceContent {
/** The query used to rank the documents. */
@maxLength(2147483647)
Expand Down Expand Up @@ -51,8 +52,10 @@
* This property is required for JSON documents. Use dot notation for a nested property, for example `meta.content`.
* You can specify multiple property paths separated by commas, for example `meta.content,id`.
*/
@maxLength(2147483647)
targetPaths?: string;
#suppress "@azure-tools/typespec-azure-core/known-encoding" "The service contract takes the paths as one comma-separated string; commaDelimited encoding lets SDKs expose a string collection while sending that string."

Check warning on line 55 in specification/inferenceservice/data-plane/InferenceService/models.tsp

View workflow job for this annotation

GitHub Actions / TypeSpec Suppressions - Analyze Code

⚠️ New Suppression

Authors should avoid adding new suppressions and prefer fixing the underlying issue; reviewers should approve only when there is a clear, compelling justification and no reasonable alternative.
#suppress "@azure-tools/typespec-autorest/unknown-format" "AutoRest cannot express array delimiter encoding, so the OpenAPI keeps the existing string definition, which matches the wire contract."
@encode(ArrayEncoding.commaDelimited)
targetPaths?: string[];

/** The name of the model used for the semantic reranking operation. */
@maxLength(2147483647)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,7 @@
},
"targetPaths": {
"type": "string",
"description": "The property containing text to rank when the document type is JSON.\nThis property is required for JSON documents. Use dot notation for a nested property, for example `meta.content`.\nYou can specify multiple property paths separated by commas, for example `meta.content,id`.",
"maxLength": 2147483647
"description": "The property containing text to rank when the document type is JSON.\nThis property is required for JSON documents. Use dot notation for a nested property, for example `meta.content`.\nYou can specify multiple property paths separated by commas, for example `meta.content,id`."
},
"model": {
"type": "string",
Expand Down
Loading