Class AzureFoundryPlugin
java.lang.Object
com.google.genkit.plugins.azurefoundry.AzureFoundryPlugin
- All Implemented Interfaces:
Plugin
AzureFoundryPlugin provides Azure AI Foundry model integrations for Genkit.
This plugin uses Azure's OpenAI-compatible inference endpoints to support
various models deployed in Azure AI Foundry, including GPT-4, GPT-3.5, Llama,
Mistral, and more.
-
Field Summary
FieldsModifier and TypeFieldDescriptionAzure AI Foundry supported models. -
Constructor Summary
ConstructorsConstructorDescriptionCreates an AzureFoundryPlugin with the specified options. -
Method Summary
Modifier and TypeMethodDescriptionstatic AzureFoundryPlugincreate()Creates an AzureFoundryPlugin using environment variables or default Azure credentials.static AzureFoundryPluginCreates an AzureFoundryPlugin with the specified endpoint and API key.customModel(String modelName) Registers a custom model or deployment name.getName()Returns the unique identifier for the plugin.Gets the plugin options.init()Initializes the plugin.
-
Field Details
-
SUPPORTED_MODELS
Azure AI Foundry supported models. Model availability varies by region and Azure subscription. See: https://learn.microsoft.com/en-us/azure/ai-foundry/agents/concepts/model-region-support
-
-
Constructor Details
-
AzureFoundryPlugin
Creates an AzureFoundryPlugin with the specified options.- Parameters:
options- the plugin options
-
-
Method Details
-
create
Creates an AzureFoundryPlugin with the specified endpoint and API key.- Parameters:
endpoint- the Azure AI Foundry endpointapiKey- the API key- Returns:
- a new AzureFoundryPlugin
-
create
Creates an AzureFoundryPlugin using environment variables or default Azure credentials.- Returns:
- a new AzureFoundryPlugin
-
getName
Description copied from interface:PluginReturns the unique identifier for the plugin. This name is used for registration and lookup. -
init
Description copied from interface:PluginInitializes the plugin. This method is called once during Genkit initialization. The plugin should return a list of actions that it provides. -
customModel
Registers a custom model or deployment name. Use this to work with custom deployments not in the default list. Call this method before passing the plugin to Genkit.builder().- Parameters:
modelName- the model deployment name (e.g., "gpt-4.1", "my-custom-deployment")- Returns:
- this plugin instance for method chaining
-
getOptions
Gets the plugin options.- Returns:
- the options
-