InputUnion - TypeScript SDK

InputUnion type definition

The TypeScript SDK and docs are currently in beta. Report issues on GitHub.

Text, token, or multimodal input(s) to embed

Supported Types

string

1const value: string = "The quick brown fox jumps over the lazy dog";

string[]

1const value: string[] = [
2 "<value 1>",
3 "<value 2>",
4];

number[]

1const value: number[] = [
2 3390.48,
3 1336.21,
4 9437.99,
5];

number[][]

1const value: number[][] = [
2 [
3 6206.15,
4 ],
5 [
6 8419.72,
7 5863.71,
8 ],
9 [
10 2540.22,
11 ],
12];

operations.Input[]

1const value: operations.Input[] = [
2 {
3 content: [],
4 },
5];