llm.evaluatePromptStreamed.promise(options)
The content in this help topic pertains to SuiteScript 2.1.
|
Method Description |
Takes the ID of an existing prompt and values for variables used in the prompt and returns the streamed response from the LLM asynchronously. This method consumes AI Units. For more information, see NetSuite AI Units and NetSuite Features and AI Units FAQ.
Note:
The parameters and errors thrown for this method are the same as those for llm.evaluatePrompt(options). For more information about promises, see Promise Object. |
|
Returns |
|
|
Synchronous Version |
|
|
Aliases |
Note:
These aliases use the same parameters and can throw the same errors as the llm.evaluatePromptStreamed(options) method. |
|
Supported Script Types |
Server scripts For more information, see SuiteScript 2.1 Script Types. |
|
Governance |
100 |
|
Module |
|
|
Since |
2025.1 |
Syntax
The following code sample shows the syntax for this member. It isn't a functional example. For a complete promise script example, see Promise Object.
// Add additional code
...
llm.evaluatePromptStreamed.promise({
const response = llm.evaluatePrompt({
id: 'stdprompt_gen_purch_desc_invt_item',
variables: {
"form": {
"itemid": "My Item",
"stockdescription": "This is a custom item for my business.",
"vendorname": "Item Supplier Inc.",
"isdropshipitem": "false",
"isspecialorderitem": "true",
"displayname": "My Awesome Item"
},
"text": "This item increases productivity."
}
}).then(function(result) {
log.debug(result)
}).catch(function(reason) {
log.debug(reason)
});
})
...
// Add additional code