Creates an embedding vector representing the input text.
Request body which must comply to the following JSON Schema:
{ "required" : [ "input", "model" ], "type" : "object", "properties" : { "input" : { "description" : "Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for `text-embedding-ada-002`), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.\n", "example" : "The quick brown fox jumped over the lazy dog", "oneOf" : [ { "title" : "string", "type" : "string", "description" : "The string that will be turned into an embedding.", "example" : "This is a test.", "default" : "" }, { "title" : "array", "maxItems" : 2048, "minItems" : 1, "type" : "array", "description" : "The array of strings that will be turned into an embedding.", "items" : { "type" : "string", "example" : "['This is a test.']", "default" : "" } }, { "title" : "array", "maxItems" : 2048, "minItems" : 1, "type" : "array", "description" : "The array of integers that will be turned into an embedding.", "example" : "[1212, 318, 257, 1332, 13]", "items" : { "type" : "integer" } }, { "title" : "array", "maxItems" : 2048, "minItems" : 1, "type" : "array", "description" : "The array of arrays containing integers that will be turned into an embedding.", "example" : "[[1212, 318, 257, 1332, 13]]", "items" : { "minItems" : 1, "type" : "array", "items" : { "type" : "integer" } } } ], "x-oaiExpandable" : true }, "model" : { "description" : "model_description", "example" : "text-embedding-3-small", "anyOf" : [ { "type" : "string" }, { "type" : "string", "enum" : [ "text-embedding-ada-002", "text-embedding-3-small", "text-embedding-3-large" ] } ], "x-oaiTypeLabel" : "string" }, "encoding_format" : { "type" : "string", "description" : "The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).", "example" : "float", "default" : "float", "enum" : [ "float", "base64" ] }, "dimensions" : { "minimum" : 1, "type" : "integer", "description" : "The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models.\n" } }, "additionalProperties" : false }
Specify how the response should be mapped to the table output. The following formats are available:
Raw Response: Returns the raw response in a single row with the following columns:
You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.
To use this node in KNIME, install the extension OpenAI Nodes from the below update site following our NodePit Product and Node Installation Guide:
A zipped version of the software site can be downloaded here.
Deploy, schedule, execute, and monitor your KNIME workflows locally, in the cloud or on-premises – with our brand new NodePit Runner.
Try NodePit Runner!Do you have feedback, questions, comments about NodePit, want to support this platform, or want your own nodes or workflows listed here as well? Do you think, the search results could be improved or something is missing? Then please get in touch! Alternatively, you can send us an email to mail@nodepit.com.
Please note that this is only about NodePit. We do not provide general support for KNIME — please use the KNIME forums instead.