llm.embed.promise(options)
The content in this help topic pertains to SuiteScript 2.1.
|
Method Description |
Asynchronously returns the embeddings from the LLM for a given input.
Important:
Embeddings include the semantic information of the original data and should be treated with the same level of sensitivity. Embeddings created from sensitive data must be protected, stored, logged, shared, retained, and deleted according to the same rules as the original data.
Note:
The parameters and errors thrown for this method are the same as those for llm.embed(options). For more information about promises, see Promise Object. |
|
Returns |
|
|
Synchronous Version |
|
|
Supported Script Types |
Server scripts For more information, see SuiteScript 2.1 Script Types. |
|
Governance |
50 |
|
Module |
|
|
Since |
2025.1 |
Syntax
The following code sample shows the syntax for this member. It isn't a functional example. For a complete script example, see N/llm Module Script Samples.
// Add additional code
...
llm.embed.promise({
inputs: ["Hello World"],
embedModelFamily: llm.EmbedModelFamily.COHERE_EMBED,
timeout: 10000,
truncate: llm.Truncate.START
}).then(function(result) {
log.debug(result)
}).catch(function(reason) {
log.debug(reason)
})
...
// Add additional code