EmbedResponse Object Members in SuiteScript 2.1

EmbedResponse object members provide vital LLM response insights within SuiteScript 2.1, enhancing server script capabilities.

·2 min read·View Oracle Docs

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 NameReturn TypeSupported Script TypesDescription
EmbedResponse.embeddingsnumber[]Server scriptsThe embeddings returned from the LLM.
EmbedResponse.inputsstring[]Server scriptsThe list of inputs used to generate the embeddings response.
EmbedResponse.modelstringServer scriptsThe 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:

suitescript
1// Add additional code
2...
3const response = llm.embed({
4 inputs: ['Hello World']
5});
6const responseEmbeddings = response.embeddings;
7// Further processing of embeddings
8...
9// Add additional code

Errors

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 EmbedResponse object is crucial for accessing LLM responses in SuiteScript 2.1.
  • It includes properties like embeddings, inputs, and model, 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?
No, the EmbedResponse object is specifically supported in server scripts within SuiteScript 2.1.
Is it possible to modify the properties inside the EmbedResponse object?
No, attempting to modify the properties inside the EmbedResponse object will result in a 'READ_ONLY' error.
What is the purpose of the EmbedResponse.model property in SuiteScript 2.1?
The EmbedResponse.model property indicates which specific LLM model was used to generate the embeddings, helping with performance assessments and model-specific configurations.
What data type does the EmbedResponse.embeddings property return?
The EmbedResponse.embeddings property returns an array of numbers, representing the numerical embeddings generated by the LLM.
Source: EmbedResponse Object Members Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in Platform

View all Platform articles →