module function · N/llm

generateText()

llm.generateText(options)

Takes a prompt and parameters for the LLM and returns the response from the LLM.

Implementation
Not started
Design
Open for proposals suggest how it should read
Proposals
A
Signature
llm.generateText(options)
Module
N/llm
Returns
llm.Response
Governance
100
Script types
Server scripts
Version
SuiteScript 2.x, documented for 2.1; since NetSuite 2024.1
call shapefrom Oracle's parameter table
1llm.generateText({2    prompt:    /* string */,3    image:     /* file.File, optional */,4    ociConfig: /* Object, optional */,5    preamble:  /* string, optional */,6    timeout:   /* number, optional */,7    tools:     /* llm.Tool [], optional */8});
Oracle reference for this method
ParameterTypeRequiredDescription
options.promptstringPrompt for the LLM. If you specify a set of tool results using the options.toolResults parameter, any prompt you provide is ignored. The LLM uses only the specified tool results to generate a follow-up response based on those results.
options.imagefile.FileoptionalAn image to query. You can send an image (as a file.File object) to the LLM and ask questions about the image. For example, you can ask for the following: Advanced image captions Detailed description of an image Information about charts and graphs in an image Note: Image processing is available only when using the Cohere Command A Vision model ( cohere.command-a-vision ). For more information about creating and loading files, see N/file Module .
options.ociConfigObjectoptionalImportant: This object is no longer supported. Any values specified in this object are ignored.
options.preamblestringoptionalPreamble override for the LLM. A preamble is the initial context or guiding message for an LLM. For more details about using a preamble, refer to Offered Pretrained Foundational Models in Generative AI in the Oracle Cloud Infrastructure Documentation .
options.timeoutnumberoptionalTimeout in milliseconds, defaults to 30,000.
options.toolsllm.Tool []optionalThe tools that are available for the LLM to request.
B

No Mynt syntax yet.

Nothing in the language compiles to llm.generateText(options) today. How should it read?

C

Competing syntax for generateText, from GitHub Discussions. Select two or more to compare them side by side.

All discussions

Loading proposals from GitHub…

D

Write the Mynt you wish you could write.

A good proposal shows the syntax, the SuiteScript it should become, and argues for it: why it is clearer, how it fits the rest of the language, what it makes harder.

  • Clarity. Does it say what happens, without ceremony?
  • Consistency. Does it read like load, save and Ref[field]?
  • Expressiveness. Does it cover the cases people actually write?
  • Honesty. Does it hide a NetSuite cost, such as governance, that a reader should see?

N/llm · llm.generateText(options)

Suggest syntax for generateText