Model components receive inputs and prompts for generating text, and the generated text is sent to an output component.The model output can also be sent to the Language Model port and on to a Parse Data component, where the output can be parsed into structured Data objects.This example has the OpenAI model in a chatbot flow.
The LLMC Executor is a user-friendly interface designed to streamline interactions with AI language models, such as those from OpenAI. It plays a central role in allowing users to experiment with different prompts and models to generate high-quality AI responses.By integrating with API keys, the executor enables seamless communication with external AI services.Users can effortlessly select prompts , either manually or through integration with a Prompt Optimizer Flow and choose from available AI models using intuitive dropdown menus.Once configured, the tool provides a clean and efficient workflow where users input text, trigger the request with a single click, and receive intelligent outputs in real-time.This makes LLMC Executor an essential component for testing, optimizing, and comparing AI-generated responses across various configurations.
This component generates text using DeepSeek’s language models.For more information, see the DeepSeek documentation.
Parameters
Inputs
Name
Type
Description
max_tokens
Integer
Maximum number of tokens to generate. Set to 0 for unlimited. Range: 0-128000.
model_kwargs
Dictionary
Additional keyword arguments for the model.
json_mode
Boolean
If True, outputs JSON regardless of passing a schema.
model_name
String
The DeepSeek model to use. Default: deepseek-chat.
api_base
String
Base URL for API requests. Default: https://api.deepseek.com.
api_key
SecretString
Your DeepSeek API key for authentication.
temperature
Float
Controls randomness in responses. Range: [0.0, 2.0]. Default: 1.0.
seed
Integer
Number initialized for random number generation. Use the same seed integer for more reproducible results, and use a different seed number for more random results.
Outputs
Name
Type
Description
model
LanguageModel
An instance of ChatOpenAI configured with the specified parameters.
This component generates text using Groq’s language models.
To use this component in a flow, connect it as a Model in a flow like the Basic prompting flow, or select it as the Model Provider if you’re using an Agent component.
In the Groq API Key field, paste your Groq API key. The Groq model component automatically retrieves a list of the latest models. To refresh your list of models, click Refresh.
In the Model field, select the model you want to use for your LLM.
Click Playground and ask your Groq LLM a question. The responses include a list of sources.
This component sends requests to the Hugging Face API to generate text using the model specified in the Model ID field.The Hugging Face API is a hosted inference API for models hosted on Hugging Face, and requires a Hugging Face API token to authenticate.
from llmc.components.inputs import ChatInputfrom llmc.components.models import HuggingFaceEndpointsComponentfrom llmc.components.outputs import ChatOutputfrom llmc.components.prompts import PromptComponentfrom llmc.graph import Graphdef basic_prompting_with_huggingface(): # Create chat input chat_input = ChatInput() # Create prompt component prompt_component = PromptComponent() prompt_component.set( template="Answer the user as if you were a GenAI expert.\n\nUser: {user_input}\n\nAnswer:", user_input=chat_input.message_response, ) # Replace OpenAI with Hugging Face API model huggingface_component = HuggingFaceEndpointsComponent() # Set your Hugging Face API token in the huggingfacehub_api_token field # Select a model from the Model ID dropdown (e.g., "meta-llama/Llama-3.3-70B-Instruct") huggingface_component.set(input_value=prompt_component.build_prompt) # Create chat output chat_output = ChatOutput() chat_output.set(input_value=huggingface_component.text_response) graph = Graph(start=chat_input, end=chat_output) return graph
In this example based on the Basic prompting flow, the Hugging Face API model component replaces the Open AI model. By selecting different hosted models, you can see how different models return different results.
This component generates text using IBM WatsonX.ai foundation models.To use IBM watsonx.ai model components, replace a model component with the IBM watsonx.ai component in a flow.An example flow looks like the following:The values for API endpoint, Project ID, API key, and Model Name are found in your IBM watsonx.ai deployment. For more information, see the Langchain documentation.
Parameters
Inputs
Name
Type
Description
url
String
The base URL of the watsonx API.
project_id
String
Your watsonx Project ID.
api_key
SecretString
Your IBM watsonx API Key.
model_name
String
The name of the watsonx model to use. Options are dynamically fetched from the API.
max_tokens
Integer
The maximum number of tokens to generate. Default: 1000.
stop_sequence
String
The sequence where generation should stop.
temperature
Float
Controls randomness in the output. Default: 0.1.
top_p
Float
Controls nucleus sampling, which limits the model to tokens whose probability is below the top_p value. Range: Default: 0.9.
frequency_penalty
Float
Controls frequency penalty. A positive value decreases the probability of repeating tokens, and a negative value increases the probability. Range: Default: 0.5.
presence_penalty
Float
Controls presence penalty. A positive value increases the likelihood of new topics being introduced. Default: 0.3.
seed
Integer
A random seed for the model. Default: 8.
logprobs
Boolean
Whether to return log probabilities of output tokens or not. Default: True.
top_logprobs
Integer
The number of most likely tokens to return at each position. Default: 3.
logit_bias
String
A JSON string of token IDs to bias or suppress.
Outputs
Name
Type
Description
model
LanguageModel
An instance of ChatWatsonx configured with the specified parameters.
This component generates text using either OpenAI or Anthropic language models.Use this component as a drop-in replacement for LLM models to switch between different model providers and models.Instead of swapping out model components when you want to try a different provider, like switching between OpenAI and Anthropic components, change the provider dropdown in this single component. This makes it easier to experiment with and compare different models while keeping the rest of your flow intact.For more information, see the OpenAI documentation and Anthropic documentation.
Parameters
Inputs
Name
Type
Description
provider
String
The model provider to use. Options: “OpenAI”, “Anthropic”. Default: “OpenAI”.
model_name
String
The name of the model to use. Options depend on the selected provider.
api_key
SecretString
The API Key for authentication with the selected provider.
input_value
String
The input text to send to the model.
system_message
String
A system message that helps set the behavior of the assistant (advanced).
stream
Boolean
Whether to stream the response. Default: False (advanced).
temperature
Float
Controls randomness in responses. Range: [0.0, 1.0]. Default: 0.1 (advanced).
Outputs
Name
Type
Description
model
LanguageModel
An instance of ChatOpenAI or ChatAnthropic configured with the specified parameters.
This component generates text using MistralAI LLMs.For more information, see Mistral AI documentation.
Parameters
Inputs
Name
Type
Description
max_tokens
Integer
The maximum number of tokens to generate. Set to 0 for unlimited tokens (advanced).
model_name
String
The name of the Mistral AI model to use. Options include open-mixtral-8x7b, open-mixtral-8x22b, mistral-small-latest, mistral-medium-latest, mistral-large-latest, and codestral-latest. Default: codestral-latest.
mistral_api_base
String
The base URL of the Mistral API. Defaults to https://api.mistral.ai/v1 (advanced).
api_key
SecretString
The Mistral API Key to use for authentication.
temperature
Float
Controls randomness in the output. Default: 0.5.
max_retries
Integer
Maximum number of retries for API calls. Default: 5 (advanced).
timeout
Integer
Timeout for API calls in seconds. Default: 60 (advanced).
max_concurrent_requests
Integer
Maximum number of concurrent API requests. Default: 3 (advanced).
This component generates text using Ollama’s language models.To use this component in a flow, connect LLM Controls to your locally running Ollama server and select a model.
In the Ollama component, in the Base URL field, enter the address for your locally running Ollama server. This value is set as the OLLAMA_HOST environment variable in Ollama. The default base URL is http://localhost:11434.
To refresh the server’s list of models, click Refresh.
In the Model Name field, select a model. This example uses llama3.2:latest.
Connect the Ollama model component to a flow. For example, this flow connects a local Ollama server running a Llama 3.2 model as the custom model for an Agent component.
This component generates text using OpenRouter’s unified API for multiple AI models from different providers.For more information, see OpenRouter documentation.
Parameters
Inputs
Name
Type
Description
api_key
SecretString
Your OpenRouter API key for authentication.
site_url
String
Your site URL for OpenRouter rankings (advanced).
app_name
String
Your app name for OpenRouter rankings (advanced).
provider
String
The AI model provider to use.
model_name
String
The specific model to use for chat completion.
temperature
Float
Controls randomness in the output. Range: [0.0, 2.0]. Default: 0.7.
max_tokens
Integer
The maximum number of tokens to generate (advanced).
Outputs
Name
Type
Description
model
LanguageModel
An instance of ChatOpenAI configured with the specified parameters.
This component generates images using OpenAI’s DALL-E 3 model. It accepts a text prompt and returns the generated image as a URL, base64-encoded data, or a Message with generation details.
Parameters
Inputs
Name
Display Name
Info
prompt
Prompt
A text description of the desired image(s).
model
Model
The model to use for image generation.
size
Size
The size of the generated images.
quality
Quality
The quality of the generated images. ‘hd’ creates more detailed images but costs more.
style
Style
The style of the generated images. ‘vivid’ favors vibrant colors and high contrast, while ‘natural’ produces more realistic images with less stylized colors.
n
Number of Images
The number of images to generate. Maximum is 1 for DALL-E 3.