GenerateGenAIPrompt(PromptCode)
Purpose
Generates a complete GenAI prompt object from a PromptManager record.
Syntax
Dim variable As GenAIPrompt = GenerateGenAIPrompt(PromptCode)
Arguments
| Part | Description |
|---|---|
| PromptCode | The code of the PromptManager record to retrieve.
Note: The PromptCode must match a valid PROMPT_CODE in the FSPROMPTMANAGER table.
|
Return Value
| Property | Type | Description |
|---|---|---|
| model | String | The name of the model. |
| version | String | The version of the model |
| prompt | String | The prompt text. |
| safetyGuardrail | Boolean | Indicates if the safety guardrails are enabled. |
| config.max_response | Integer | Maximum response tokens. |
| config.temperature | Integer | Temperature setting. |
| config.reasoning.enabled | Boolean | Indicates if reasoning is enabled. |
| config.reasoning.budget_tokens | Integer | Token budget for reasoning. |
Description
The function returns a structured GenAI prompt object that includes model configuration, prompt content, safety settings, and reasoning parameters. The object is serialized to JSONfor use with GenAI APIs.Example
Example 1:
{
"model": "CLAUDE",
"version": "claude-3-7-sonnet-20250219-v1:0",
"prompt": "Summarize this document",
"safetyGuardrail": true,
"config": {
"max_response": 20000,
"temperature": 1,
"reasoning": {
"enabled": true,
"budget_tokens": 12000
}
}
}
Example 2:
Dim genAIPrompt As GenAIPrompt = GenerateGenAIPrompt("MY_PROMPT") ' Access individual properties Dim modelName As String = genAIPrompt.model Dim promptText As String = genAIPrompt.prompt
' Serialize to JSON for API calls Dim jsonPayload As String = genAIPrompt.ToString()