OpenAI Models
OpenAI model components provide access to OpenAI's language models including GPT-3.5, GPT-4, and Azure OpenAI services.
OpenAI
This component generates text using OpenAI's language models.
For more information, see OpenAI documentation.
Inputs
api_key
SecretString
Your OpenAI API Key.
model
String
The name of the OpenAI model to use. Options include "gpt-3.5-turbo" and "gpt-4".
max_tokens
Integer
The maximum number of tokens to generate. Set to 0 for unlimited tokens.
temperature
Float
Controls randomness in the output. Range: [0.0, 1.0]. Default: 0.7.
top_p
Float
Controls the nucleus sampling. Range: [0.0, 1.0]. Default: 1.0.
frequency_penalty
Float
Controls the frequency penalty. Range: [0.0, 2.0]. Default: 0.0.
presence_penalty
Float
Controls the presence penalty. Range: [0.0, 2.0]. Default: 0.0.
Outputs
model
LanguageModel
An instance of OpenAI model configured with the specified parameters.
Azure OpenAI
This component generates text using Azure OpenAI LLM.
For more information, see the Azure OpenAI documentation.
Inputs
Model Name
Model Name
Specifies the name of the Azure OpenAI model to be used for text generation.
Azure Endpoint
Azure Endpoint
Your Azure endpoint, including the resource.
Deployment Name
Deployment Name
Specifies the name of the deployment.
API Version
API Version
Specifies the version of the Azure OpenAI API to be used.
API Key
API Key
Your Azure OpenAI API key.
Temperature
Temperature
Specifies the sampling temperature. Defaults to 0.7
.
Max Tokens
Max Tokens
Specifies the maximum number of tokens to generate. Defaults to 1000
.
Input Value
Input Value
Specifies the input text for text generation.
Stream
Stream
Specifies whether to stream the response from the model. Defaults to False
.
Outputs
model
LanguageModel
An instance of AzureOpenAI configured with the specified parameters.
Usage Notes
OpenAI: Direct integration with OpenAI's API services
Azure OpenAI: Enterprise-grade OpenAI models hosted on Microsoft Azure
Both components provide the same underlying language model capabilities but with different hosting and authentication requirements
Azure OpenAI offers additional enterprise features like virtual networks and managed identity support
Last updated