Skip to main content

LlmTask

Interacts with a Large Language Model (LLM) to generate a text response based on a user-provided prompt.

Input: None

Returns: Text generated by the LLM based on the provided prompt and configuration.

Example: Using OpenAI’s GPT-4 model to generate a joke.

{
"llmTask": {
"providerConfig": {
"openai": {
"model": "gpt-4",
"userPrompt": "Tell me a joke.",
"temperature": 0.7,
"secretNameApiKey": "${OPENAI_API_KEY}"
}
}
}
}


Fields

NameTypeDescription
 grokxai
 groq
 openai

Messages

 GrokXAIConfig

NameTypeDescription
 model

string

 userPrompt

string

 temperature

double

 secretNameApiKey

string

 GroqConfig

NameTypeDescription
 model

string

 userPrompt

string

 temperature

double

 secretNameApiKey

string

 OpenAIConfig

NameTypeDescription
 model

string

 userPrompt

string

 temperature

double

 secretNameApiKey

string