Skip to content

Commit 235518f

Browse files
agnieszka-mclaude
andauthored
docs: add Microsoft Foundry section to the Anthropic integration page (#654)
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent b50573a commit 235518f

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

‎integrations/anthropic.md‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ enterprise: true
2828

2929
This integration supports Anthropic Claude models such as Claude Haiku 3.5, Claude Sonnet 3.7, and Claude Sonnet 4.5 through Anthropic’s inference infrastructure. For a complete list of available models, check out [the Anthropic Claude documentation](https://docs.claude.com/en/docs/about-claude/models/overview).
3030

31-
You can use Anthropic models with [`AnthropicChatGenerator`](https://docs.haystack.deepset.ai/docs/anthropicchatgenerator).
31+
You can use Anthropic models with [`AnthropicChatGenerator`](https://docs.haystack.deepset.ai/docs/anthropicchatgenerator). To use Claude models deployed on [Microsoft Foundry](https://learn.microsoft.com/en-us/azure/foundry/what-is-foundry), use [`AnthropicFoundryChatGenerator`](https://docs.haystack.deepset.ai/docs/anthropicfoundrychatgenerator).
3232

3333
## Installation
3434

@@ -94,3 +94,17 @@ rag_pipeline.run(
9494
}
9595
)
9696
```
97+
98+
### Using `AnthropicFoundryChatGenerator`
99+
100+
To call Claude models deployed on Microsoft Foundry, set the `ANTHROPIC_FOUNDRY_API_KEY` and `ANTHROPIC_FOUNDRY_RESOURCE` environment variables. Alternatively, pass an `azure_ad_token_provider` and an `endpoint`.
101+
102+
```python
103+
from haystack.dataclasses import ChatMessage
104+
105+
from haystack_integrations.components.generators.anthropic import AnthropicFoundryChatGenerator
106+
107+
generator = AnthropicFoundryChatGenerator(model="claude-sonnet-4-5")
108+
result = generator.run(messages=[ChatMessage.from_user("What is Microsoft Foundry?")])
109+
print(result["replies"][0].text)
110+
```

0 commit comments

Comments
 (0)