Skip to content

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.

Azure embeddings documentation for knowledge (#2957)

Mike Plachta47b97d9b7fa0
diff --git a/docs/concepts/knowledge.mdx b/docs/concepts/knowledge.mdx
index 022d090d9..0da2ac4db 100644
--- a/docs/concepts/knowledge.mdx
+++ b/docs/concepts/knowledge.mdx
@@ -602,6 +602,30 @@ agent = Agent(
)
```
+#### Configuring Azure OpenAI Embeddings
+
+When using Azure OpenAI embeddings:
+1. Make sure you deploy the embedding model in Azure platform first
+2. Then you need to use the following configuration:
+
+```python
+agent = Agent(
+ role="Researcher",
+ goal="Research topics",
+ backstory="Expert researcher",
+ knowledge_sources=[knowledge_source],
+ embedder={
+ "provider": "azure",
+ "config": {
+ "api_key": "your-azure-api-key",
+ "model": "text-embedding-ada-002", # change to the model you are using and is deployed in Azure
+ "api_base": "https://your-azure-endpoint.openai.azure.com/",
+ "api_version": "2024-02-01"
+ }
+ }
+)
+```
+
## Advanced Features
### Query Rewriting