Skip to content

Commit

Permalink
Add Completion result and task type to the Inference API spec (#2471)
Browse files Browse the repository at this point in the history
  • Loading branch information
timgrein authored Mar 28, 2024
1 parent 071b2f7 commit 8b12f48
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 1 deletion.
38 changes: 37 additions & 1 deletion output/schema/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions output/typescript/types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions specification/inference/_types/Results.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ export class TextEmbeddingResult {
embedding: DenseVector
}

/**
* The completion result object
*/
export class CompletionResult {
result: string
}

/**
* InferenceResult is an aggregation of mutually exclusive variants
* @variants container
Expand All @@ -64,4 +71,5 @@ export class InferenceResult {
text_embedding_bytes?: Array<TextEmbeddingByteResult>
text_embedding?: Array<TextEmbeddingResult>
sparse_embedding?: Array<SparseEmbeddingResult>
completion?: Array<CompletionResult>
}

0 comments on commit 8b12f48

Please sign in to comment.