Skip to content

Commit 6b86b2b

Browse files
authored
Merge pull request d-run#245 from samzong/fix/api-call
fix(api-call): endpoint error
2 parents 496b99f + 94834c1 commit 6b86b2b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/zh/docs/en/models/api-call.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ A model endpoint is a URL or API address that allows users to access and send re
3434
| Invocation Method | Endpoint |
3535
| ----------------- | ------------------- |
3636
| MaaS by Token | `chat.d.run` |
37-
| Model Service | `<region>-02.d.run` |
37+
| Model Service | `<region>.d.run` |
3838

3939
## API Invocation Examples
4040

@@ -67,7 +67,7 @@ print(response.choices[0].text)
6767
To invoke models using the Model Service method, follow these steps:
6868

6969
1. **Obtain API Key**: Log in to your user console and create a new API Key
70-
2. **Set Endpoint**: Replace the SDK endpoint with `<region>-02.d.run`
70+
2. **Set Endpoint**: Replace the SDK endpoint with `<region>.d.run`
7171
3. **Invoke Model**: Use the official model name along with the new API Key for invocation
7272

7373
**Example Code (Python)**:
@@ -76,7 +76,7 @@ To invoke models using the Model Service method, follow these steps:
7676
import openai
7777

7878
openai.api_key = "your-api-key" # Replace with your API Key
79-
openai.api_base = "<region>-02.d.run"
79+
openai.api_base = "<region>.d.run"
8080

8181
response = openai.Completion.create(
8282
model="u-1100a15812cc/qwen2",

docs/zh/docs/models/api-call.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ d.run 提供了两种大模型的托管方式,您可以根据需求选择其
3333
| 调用方式 | Endpoint |
3434
| ------------- | ------------------- |
3535
| MaaS by Token | `chat.d.run` |
36-
| 模型服务 | `<region>-02.d.run` |
36+
| 模型服务 | `<region>.d.run` |
3737

3838
## API 调用示例
3939

0 commit comments

Comments
 (0)