This is an automated email from the ASF dual-hosted git repository.
xtsong pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-agents.git
The following commit(s) were added to refs/heads/main by this push:
new a6bead8 [feature][documentation] Add Azure AI chat model integration
details (#318)
a6bead8 is described below
commit a6bead804c30fe8bd601c135445449c5632c0ede
Author: tsaiggo <[email protected]>
AuthorDate: Wed Nov 26 17:41:06 2025 +0800
[feature][documentation] Add Azure AI chat model integration details (#318)
---
docs/content/docs/development/chat_models.md | 89 ++++++++++++++++++++++++++++
1 file changed, 89 insertions(+)
diff --git a/docs/content/docs/development/chat_models.md
b/docs/content/docs/development/chat_models.md
index 394e589..d9195aa 100644
--- a/docs/content/docs/development/chat_models.md
+++ b/docs/content/docs/development/chat_models.md
@@ -142,6 +142,95 @@ public class MyAgent extends Agent {
## Built-in Providers
+### Azure AI
+
+Azure AI provides cloud-based chat models through Azure AI Inference API,
supporting various models including GPT-4, GPT-4o, and other Azure-hosted
models.
+
+{{< hint warning >}}
+Azure AI is only supported in Java currently.
+{{< /hint >}}
+
+#### Prerequisites
+
+1. Create an Azure AI resource in the [Azure Portal](https://portal.azure.com/)
+2. Obtain your endpoint URL and API key from the Azure AI resource
+
+#### AzureAIChatModelConnection Parameters
+
+{{< tabs "AzureAIChatModelConnection Parameters" >}}
+
+{{< tab "Java" >}}
+
+| Parameter | Type | Default | Description |
+|-----------|--------|----------|----------------------------------------|
+| `endpoint` | String | Required | Azure AI service endpoint URL |
+| `apiKey` | String | Required | Azure AI API key for authentication |
+
+{{< /tab >}}
+
+{{< /tabs >}}
+
+#### AzureAIChatModelSetup Parameters
+
+{{< tabs "AzureAIChatModelSetup Parameters" >}}
+
+{{< tab "Java" >}}
+
+| Parameter | Type | Default | Description
|
+|--------------|------------------|----------|--------------------------------------------------|
+| `connection` | String | Required | Reference to connection method
name |
+| `model` | String | Required | Name of the chat model to use
(e.g., "gpt-4o") |
+| `prompt` | Prompt \| String | None | Prompt template or reference to
prompt resource |
+| `tools` | List[String] | None | List of tool names available to
the model |
+
+{{< /tab >}}
+
+{{< /tabs >}}
+
+#### Usage Example
+
+{{< tabs "Azure AI Usage Example" >}}
+
+{{< tab "Java" >}}
+```java
+public class MyAgent extends Agent {
+ @ChatModelConnection
+ public static ResourceDescriptor azureAIConnection() {
+ return
ResourceDescriptor.Builder.newBuilder(AzureAIChatModelConnection.class.getName())
+ .addInitialArgument("endpoint",
"https://your-resource.inference.ai.azure.com")
+ .addInitialArgument("apiKey", "your-api-key-here")
+ .build();
+ }
+
+ @ChatModelSetup
+ public static ResourceDescriptor azureAIChatModel() {
+ return
ResourceDescriptor.Builder.newBuilder(AzureAIChatModelSetup.class.getName())
+ .addInitialArgument("connection", "azureAIConnection")
+ .addInitialArgument("model", "gpt-4o")
+ .build();
+ }
+
+ ...
+}
+```
+{{< /tab >}}
+
+{{< /tabs >}}
+
+#### Available Models
+
+Azure AI supports various models through the Azure AI Inference API. Visit the
[Azure AI Model Catalog](https://ai.azure.com/explore/models) for the complete
and up-to-date list of available models.
+
+Some popular options include:
+- **GPT-4o** (gpt-4o)
+- **GPT-4** (gpt-4)
+- **GPT-4 Turbo** (gpt-4-turbo)
+- **GPT-3.5 Turbo** (gpt-3.5-turbo)
+
+{{< hint warning >}}
+Model availability and specifications may change. Always check the official
Azure AI documentation for the latest information before implementing in
production.
+{{< /hint >}}
+
### Anthropic
Anthropic provides cloud-based chat models featuring the Claude family, known
for their strong reasoning, coding, and safety capabilities.