EmbedResponse Object Members in SuiteScript 2.1
EmbedResponse object members provide vital LLM response insights within SuiteScript 2.1, enhancing server script capabilities.
The EmbedResponse object members are essential for leveraging Large Language Model (LLM) responses in SuiteScript 2.1. They allow developers to tap into processed data from LLM with precision, enhancing server-side functionalities. This article details the properties of the EmbedResponse object and their usage in scripts.
What are the EmbedResponse Object Members?
The EmbedResponse object consists of several properties that return data from LLM operations. Here's a breakdown of the key members:
| Member Name | Return Type | Supported Script Types | Description |
|---|---|---|---|
EmbedResponse.embeddings | number[] | Server scripts | The embeddings returned from the LLM. |
EmbedResponse.inputs | string[] | Server scripts | The list of inputs used to generate the embeddings response. |
EmbedResponse.model | string | Server scripts | The model utilized to generate the embeddings response. |
Property Descriptions
EmbedResponse.embeddings: This property returns a list of numerical embeddings generated by the LLM, which can be utilized for various applications including semantic analysis and natural language processing tasks.EmbedResponse.inputs: This array contains the input strings supplied to the LLM, making it easier to track what data was fed into the model.EmbedResponse.model: Usage of this string informs developers about the specific LLM model that produced the embeddings, aiding in performance assessments and model-specific configurations.
Syntax Example
Below is a syntactical representation of how to utilize these members:
1// Add additional code2...3const response = llm.embed({4 inputs: ['Hello World']5});6const responseEmbeddings = response.embeddings;7// Further processing of embeddings8...9// Add additional codeErrors
When interacting with the EmbedResponse object, be aware of the READ_ONLY error code, which is thrown if there is an attempt to modify a property set within the EmbedResponse:
- Error Code:
READ_ONLY - Thrown If: Setting the property is attempted.
Who This Affects
This new feature primarily impacts:
- Developers who utilize SuiteScript 2.1 for server scripting.
Key Takeaways
- The
EmbedResponseobject is crucial for accessing LLM responses in SuiteScript 2.1. - It includes properties like
embeddings,inputs, andmodel, each serving distinct purposes. - Understanding the returned data from these properties can significantly enhance the functionality of server-side scripts.
Frequently Asked Questions (4)
Can the EmbedResponse object be used in client scripts in SuiteScript 2.1?
Is it possible to modify the properties inside the EmbedResponse object?
What is the purpose of the EmbedResponse.model property in SuiteScript 2.1?
What data type does the EmbedResponse.embeddings property return?
Was this article helpful?
More in Platform
- Style Object Members for Workbook API in NetSuite
The Style object provides customizable properties for workbook formatting in NetSuite, enhancing report and visualization functionality.
- Asynchronous HTTP Requests with SuiteScript Promises
Use SuiteScript to send asynchronous HTTP requests with promises for efficient error handling and response processing.
- Setting Sublist Field Values in SuiteScript
Set values for sublist fields in SuiteScript using the setSublistValue method. Understand required parameters and error handling.
- In This Help Topic
Explore N/log module guidelines, log levels, and script execution logs for efficient logging in SuiteScript.
Advertising
Reach Platform Professionals
Put your product in front of NetSuite experts who work with Platform every day.
Sponsor This Category