Skip to content
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

[OpenAI] Rename properties for Java #24596

Merged
merged 5 commits into from
Jul 12, 2023
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
3 changes: 2 additions & 1 deletion specification/cognitiveservices/OpenAI.Inference/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ enum ServiceApiVersions {
@TypeSpec.Rest.resource("deployments")
model Deployment {
@visibility("read")
@doc("deployment id of the deployed model")
@doc("Specifies either the model deployment name (when using Azure OpenAI) or model name (when using non-Azure OpenAI) to use for this request.")
@projectedName("java", "deploymentOrModelName")
@key
deploymentId: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ model ChatCompletions {
""")
@projectedName("json", "created")
@projectedName("csharp", "InternalCreatedSecondsAfterUnixEpoch")
@projectedName("java", "createdAt")
created: int32;

@doc("""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,15 +214,18 @@ model CompletionsLogProbabilityModel {
@doc("A collection of log probability values for the tokens in this completions data.")
@projectedName("json", "token_logprobs")
@projectedName("csharp", "TokenLogProbabilities")
@projectedName("java", "tokenLogProbabilities")
tokenLogprobs: NullableFloat[];

@doc("A mapping of tokens to maximum log probability values in this completions data.")
@projectedName("json", "top_logprobs")
@projectedName("csharp", "TopLogProbabilities")
@projectedName("java", "topLogProbabilities")
topLogprobs: Record<NullableFloat>[];

@doc("The text offsets associated with tokens in this completions data.")
@projectedName("json", "text_offset")
@projectedName("csharp", "TextOffsets")
@projectedName("java", "textOffsets")
textOffset: int32[];
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ model EmbeddingItem {
embedding: float32[];

@doc("Index of the prompt to which the EmbeddingItem corresponds.")
@projectedName("java", "promptIndex")
index: int32;
}

Expand Down