Skip to content

Commit 4cb8434

Browse files
[ML] Adding text embedding byte representation (#2411)
* Adding text embedding byte representation * Removing semi-colon
1 parent 90b0967 commit 4cb8434

File tree

3 files changed

+79
-3
lines changed

3 files changed

+79
-3
lines changed

output/schema/schema.json

Lines changed: 57 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/inference/_types/Results.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* under the License.
1818
*/
1919

20-
import { float } from '@_types/Numeric'
20+
import { float, byte } from '@_types/Numeric'
2121
import { Dictionary } from '@spec_utils/Dictionary'
2222

2323
/**
@@ -36,6 +36,19 @@ export class SparseEmbeddingResult {
3636
embedding: SparseVector
3737
}
3838

39+
/**
40+
* Text Embedding results containing bytes are represented as Dense
41+
* Vectors of bytes.
42+
*/
43+
export type DenseByteVector = Array<byte>
44+
45+
/**
46+
* The text embedding result object for byte representation
47+
*/
48+
export class TextEmbeddingByteResult {
49+
embedding: DenseByteVector
50+
}
51+
3952
/**
4053
* The text embedding result object
4154
*/
@@ -48,6 +61,7 @@ export class TextEmbeddingResult {
4861
* @variants container
4962
*/
5063
export class InferenceResult {
64+
text_embedding_bytes?: Array<TextEmbeddingByteResult>
5165
text_embedding?: Array<TextEmbeddingResult>
5266
sparse_embedding?: Array<SparseEmbeddingResult>
5367
}

0 commit comments

Comments
 (0)