Skip to content

Commit

Permalink
Sparse embedding result is an object
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkyle committed Nov 22, 2023
1 parent aa89a96 commit 44e6a1f
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 6 deletions.
1 change: 0 additions & 1 deletion output/openapi/elasticsearch-serverless-openapi.json

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

27 changes: 24 additions & 3 deletions output/schema/schema.json

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

6 changes: 5 additions & 1 deletion output/typescript/types.ts

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

6 changes: 5 additions & 1 deletion specification/inference/_types/Results.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ export type SparseVector = Dictionary<string, float>
*/
export type DenseVector = Array<float>

export class SparseEmbeddingResult {
embedding: SparseVector
}

/**
* The text embedding result object
*/
Expand All @@ -45,5 +49,5 @@ export class TextEmbeddingResult {
*/
export class InferenceResult {
text_embedding?: Array<TextEmbeddingResult>
sparse_embedding?: Array<SparseVector>
sparse_embedding?: Array<SparseEmbeddingResult>
}

0 comments on commit 44e6a1f

Please sign in to comment.