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

Archboard feedback #22315

Merged
merged 3 commits into from
Jan 25, 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
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using Cadl.Http;
namespace Azure.OpenAI.Completions;

@doc("Post body schema to create a prompt completion from a deployment")
model CompletionsRequest {
model CompletionsOptions {
@doc("""
An optional prompt to complete from, encoded as a string, a list of strings, or
a list of token lists. Defaults to <|endoftext|>. The prompt to complete from.
Expand Down Expand Up @@ -67,11 +67,12 @@ allowed.
""")
n?: int32;

@doc("""
Whether to enable streaming for this endpoint. If set, tokens will be sent as
server-sent events as they become available.
""")
stream?: boolean;
// stream mode requires some API update that we cannot generate nbow
// @doc("""
// Whether to enable streaming for this endpoint. If set, tokens will be sent as
// server-sent events as they become available.
// """)
// stream?: boolean;

@doc("""
Include the log probabilities on the `logprobs` most likely tokens, as well the
Expand Down Expand Up @@ -124,7 +125,7 @@ alias CompletionsPrompt = string[];
alias CompletionsStop = string[];

@doc("Expected response schema to completion request")
model Completion {
model Completions {
@doc("Request ID for troubleshooting purposes")
@header "apim-request-id": string;
@doc("Id for completion response")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using Cadl.Http;

namespace Azure.OpenAI.Embeddings;

model EmbeddingsRequest {
model EmbeddingsOptions {
@doc("The ID of the end-user, for use in tracking and rate-limiting.")
user?: string;

Expand Down
4 changes: 2 additions & 2 deletions specification/cognitiveservices/OpenAI.Inference/routes.cadl
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ namespace Azure.OpenAI;
@doc("Return the embeddings for a given prompt.")
@Cadl.Rest.actionSeparator("/")
@convenienceAPI
op embeddings is Azure.Core.ResourceAction<Deployment, Embeddings.EmbeddingsRequest, Embeddings.Embeddings>;
op getEmbeddings is Azure.Core.ResourceAction<Deployment, Embeddings.EmbeddingsOptions, Embeddings.Embeddings>;


@doc("Return the completions for a given prompt.")
@Cadl.Rest.actionSeparator("/")
@convenienceAPI
op completions is Azure.Core.ResourceAction<Deployment, Completions.CompletionsRequest, Completions.Completion>;
op getCompletions is Azure.Core.ResourceAction<Deployment, Completions.CompletionsOptions, Completions.Completions>;