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
A
suitescript api
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});
| Parameter | Type | Required | Description |
|---|---|---|---|
| options.prompt | string | Prompt 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.image | file.File | optional | An 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.ociConfig | Object | optional | Important: This object is no longer supported. Any values specified in this object are ignored. |
| options.preamble | string | optional | Preamble 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.timeout | number | optional | Timeout in milliseconds, defaults to 30,000. |
| options.tools | llm.Tool [] | optional | The tools that are available for the LLM to request. |
B
mynt syntax
No Mynt syntax yet.
Nothing in the language compiles to llm.generateText(options) today. How should it read?
C
community proposals
Competing syntax for generateText, from GitHub Discussions. Select two or more to compare them side by side.
Loading proposals from GitHub…
D
suggest an alternative
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,saveandRef[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?