Skip to content

Commit 62a8d86

Browse files
committed
Add azure docs
1 parent ced0245 commit 62a8d86

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: Azure OpenAI
3+
---
4+
5+
!!! note
6+
7+
Support the Open Ai service provided by Microsoft, product address: [https://azure.microsoft.com/zh-cn/products/cognitive-services/openai-service/](https://azure.microsoft.com/zh-cn/products/cognitive-services/openai-service/)
8+
9+
### Required
10+
11+
---
12+
13+
!!! note
14+
15+
The following are some configurations that must be specified to invoke the service.
16+
17+
| name | description |
18+
|:----------:|-----------------------------------------------------------------------------|
19+
| `apiHost` | Created zone markers in the format `${your-resource-name}.openai.azure.com` |
20+
| `apiKey` | Azure token |
21+
| `provider` | Specify `ProviderModel.azure` |
22+
| `model` | Model name deployed in Azure |
23+
| `version` | Model version deployed in Azure |
24+
25+
### Example
26+
27+
---
28+
29+
```java
30+
// Automatic resource release
31+
try(OpenAiClient client=OpenAiClient.builder()
32+
.apiHost("https://eus-chatgpt.openai.azure.com")
33+
.apiKey(System.getProperty("azure.token"))
34+
.provider(ProviderModel.azure)
35+
.model("text-davinci-002")
36+
.version("2022-12-01")
37+
.build())
38+
{
39+
client.createCompletion(configure).getChoices();
40+
}
41+
```
42+

docs/mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,7 @@ nav:
4848
- reference/models.md
4949
- reference/completions.md
5050
- reference/completions_chat.md
51+
- Provider:
52+
- reference/provider/azure.md
5153
- released.md
5254
- powered_by.md

0 commit comments

Comments
 (0)