Support for GPT-OSS Model in N/llm Module for NetSuite

The N/llm module in NetSuite now supports the GPT-OSS model, enhancing AI capabilities and text generation functionalities.

·2 min read·7 views·View Oracle Docs

The N/llm module now offers support for the OpenAI GPT-OSS model. This enhancement allows developers to specify this model when utilizing the methods llm.generateText(options) and llm.generateTextStreamed(options), along with their promise-based counterparts.

Key Features of the GPT-OSS Model Support

  • Enhanced AI Integration: The integration of the GPT-OSS model allows for improved interactions and responses from AI clients.
  • Flexible Configuration: When calling the LLM methods, you can easily specify the model to adapt to specific requirements or preferences within your NetSuite applications.

Usage of llm.generateText and llm.generateTextStreamed

Both methods are designed to return the response from the language model for a given prompt. The following parameters are essential for these API calls:

  • options.prompt: The string prompt required for the LLM to generate text.
  • options.chatHistory: Optional. An array of chat messages to qualify the context of the conversation.
  • options.modelFamily: Optional. The model to be used, wherein you can refer to values from the llm.ModelFamily enumeration.

In unlimited usage mode, the methods also allow for the passing of OCI configuration parameters, which can be set on the SuiteScript subtab of the AI Preferences page.

Important Considerations

  • Ensure you have the necessary permissions set up to access and implement the GPT-OSS model in your scripts.
  • Take advantage of the real-time capabilities offered by these methods, enabling your applications to provide seamless AI-driven responses.

This new support for the GPT-OSS model enhances the versatility of the N/llm module, making it an invaluable tool for developers looking to integrate advanced AI functionalities within their NetSuite environments. For more detailed information on parameters and response structures, refer to the official documentation for llm.generateText and llm.generateTextStreamed methods.

Source: This article is based on Oracle's official NetSuite documentation.

Key Takeaways

  • The N/llm module supports the GPT-OSS model for better text generation.
  • Developers can customize AI responses by specifying the model in API calls.
  • Enhanced capabilities streamline integrations with NetSuite applications.

Frequently Asked Questions (4)

What are the primary methods available in the N/llm module for using the GPT-OSS model?
The N/llm module in SuiteScript 2.1 supports two methods for utilizing the GPT-OSS model: `llm.generateText(options)` and `llm.generateTextStreamed(options)`. These methods allow developers to generate text responses based on given prompts, with the latter providing streamed responses.
Do I need to configure any special settings for unlimited usage of the N/llm methods?
Yes, when using the methods in unlimited usage mode, you need to configure the OCI parameters. You should refer to the SuiteScript documentation for specific configuration instructions based on your setup.
Can these N/llm methods be used in server scripts?
Yes, both the `llm.generateText` and `llm.generateTextStreamed` methods support server scripts, which ensures they can be widely applied within your NetSuite environment.
What is the governance for the llm.generateText method?
The governance for the `llm.generateText` method is set at 100. This value represents the resource cost of implementing this method within your SuiteScript.
Source: Support for GPT-OSS Model in N/llm Module 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 SuiteScript

View all SuiteScript articles →