Skip to content

Commit 9b55a77

Browse files
authored
Merge pull request #264 from Cloud-Code-AI/262-update-ci-cd-flow-to-build-docs-at-cloudcode-ai-domain
Added more info on how to use different llm providers
2 parents 6bae15c + c49a729 commit 9b55a77

File tree

2 files changed

+51
-1
lines changed

2 files changed

+51
-1
lines changed

docs/pages/self_hosting_guide/_meta.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
"prepare_configuration": "Prepare Configuration",
66
"deploy_api": "Deploy API",
77
"generating_tests": "Generating Tests",
8-
"executing_tests": "Executing Tests"
8+
"executing_tests": "Executing Tests",
9+
"using_azure_openai_with_kaizen": "Using Azure OpenAI with Kaizen"
910
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: How to Integrate Azure OpenAI with Kaizen
3+
date: 2024-30-06
4+
author: sauravpanda
5+
---
6+
7+
## How to Integrate Azure OpenAI with Kaizen?
8+
9+
This post addresses a great question raised by Edwin regarding the integration of Azure OpenAI with Kaizen. Let's dive into the steps needed to make this integration work seamlessly.
10+
11+
### Step 1: Set Environment Variables
12+
13+
First, you need to add the necessary environment variables in your `.env` file. These variables are essential for authenticating and interacting with the Azure OpenAI service.
14+
15+
```python
16+
os.environ["AZURE_API_KEY"] = "<YOUR_AZURE_API_KEY>"
17+
os.environ["AZURE_API_BASE"] = "<YOUR_AZURE_API_BASE_URL>"
18+
os.environ["AZURE_API_VERSION"] = "<YOUR_AZURE_API_VERSION>"
19+
```
20+
21+
Replace `<YOUR_AZURE_API_KEY>`, `<YOUR_AZURE_API_BASE_URL>`, and `<YOUR_AZURE_API_VERSION>` with your actual Azure OpenAI credentials.
22+
23+
### Step 2: Update `config.json`
24+
25+
Next, update your `config.json` file to include the model configuration for Azure. This configuration will specify which model deployment to use and the associated costs per token.
26+
27+
```json
28+
{
29+
...
30+
"model_config": {
31+
"model": "azure/<NAME-OF-DEPLOYMENT>",
32+
"input_cost_per_token": 0.000005,
33+
"output_cost_per_token": 0.000015
34+
},
35+
...
36+
}
37+
```
38+
39+
Replace `<NAME-OF-DEPLOYMENT>` with the name of your Azure OpenAI deployment.
40+
41+
### Conclusion
42+
43+
By following these steps, you can successfully integrate Azure OpenAI with Kaizen. This setup allows you to utilize Azure's powerful language models within your Kaizen projects efficiently.
44+
45+
Feel free to reach out if you have any questions or need further assistance!
46+
47+
---
48+
49+
If you found this post helpful, make sure to check out our other guides and tutorials. Happy coding!

0 commit comments

Comments
 (0)