Skip to main content

Prompt

Send a prompt and return the model's answer.

Command in the Generative AI toolkit · id ooa.genai/prompt · 26 inputs (1 required), 5 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
PromptStringYesYour request; ${...} interpolation allowed.
SystemStringNoYou are a precise business assistant.Instructions for the model's role and tone.
ProviderStringNoopenaiWho runs the model: OpenAI, Azure OpenAI, Anthropic, OpenAI-compatible (LiteLLM, vLLM, Ollama), Hugging Face (its router or your own TGI server), AWS SageMaker (a model on an Amazon SageMaker endpoint), AWS Bedrock or Google Vertex AI (Gemini).
ConnectionStringNoName of a Model Connection (provider, model and key managed in one place). Leave empty to set them on this action.
ModelStringNoModel name; the deployment name for Azure OpenAI; the endpoint name for AWS SageMaker; the model or inference profile id for AWS Bedrock.
API keyCredentialNoAPI key or access token from the vault (not needed for some self-hosted endpoints). For AWS Bedrock and AWS SageMaker: the AWS secret access key (or ACCESS_KEY_ID:SECRET). For Google Vertex AI: a service-account JSON key or an access token.
Endpoint addressStringNoEndpoint; required for Azure OpenAI, Vertex AI (https://REGION-aiplatform.googleapis.com/v1/projects/PROJECT/locations/REGION) and self-hosted models (for a TGI server, e.g. http://tgi-host:8080/v1).
TemperatureNumberNo00 = consistent, higher = more creative.
Maximum tokensNumberNo1024Maximum answer length in tokens.
Hide personal dataBooleanNotrueReplace emails, phone and card numbers, IBANs and similar before sending; restored in the answer.
AWS access key IDCredentialNoAWS Bedrock and AWS SageMaker only: AWS access key id from the vault (api_key then holds the secret access key).
AWS regionStringNoAWS Bedrock and AWS SageMaker only: AWS region, e.g. eu-west-1.
Top pNumberNoNucleus sampling: only the most likely words whose chances add up to this share are used (above 0 to 1); provider default when empty.
Top kNumberNoOnly pick from this many most likely words (Anthropic models).
Stop sequencesListNoUp to 4 texts at which the model stops writing.
Presence penaltyNumberNoFrom -2 to 2; higher values push the model toward new topics (OpenAI-style providers).
Frequency penaltyNumberNoFrom -2 to 2; higher values make the model repeat itself less (OpenAI-style providers).
SeedNumberNoSame seed and settings give the same answer where the provider supports it.
Number of responsesNumberNo1How many alternative answers to ask for, 1 to 10 (OpenAI-style providers).
Response formatStringNotextjson: ask for one JSON object and also return it parsed.
End userStringNoAn id for the person the answer is for, passed on for the provider's abuse monitoring (OpenAI-style providers).
Timeout (seconds)NumberNo0Seconds to wait for the model; 180 when 0.
AWS session tokenCredentialNoAWS Bedrock and AWS SageMaker only: the session token from the vault, when the access key is a temporary one (for example from an assumed role).
Logit biasDictionaryNoMake words more or less likely (OpenAI and Azure OpenAI): token id to a weight from -100 (never) to 100 (always), e.g. {"50256": -100}.
Provider optionsDictionaryNoExtra settings for this provider, added to the request as they are, e.g. {"reasoning_effort": "low"}; a dictionary is merged into the setting of the same name.
API versionStringNo2024-06-01Azure OpenAI only: the API version to call; change it when your resource needs a newer one.

Outputs​

OutputTypeWhat it is
textStringAnswer (the first one when several were asked for).
responsesListEvery answer, when number_of_responses is more than 1.
jsonAnyThe answer parsed as JSON, when response_format is json.
input_tokensNumberTokens in the request.
output_tokensNumberTokens in the answer.