Scenarios
In Playground, you can perform online debugging on created model APIs, supporting single API debugging and multi-API comparison debugging. It displays in real time the model actually hit by each request along with metrics such as TTFT, TPS, Token, and cost, helping you verify the configuration and connectivity of model APIs and compare the performance of different APIs.
Prerequisites
The model API has been created.
A consumer has been created (you need to select a calling identity during debugging), and this consumer has permission to call this model API.
Operation Steps
Single API Debugging
Step 1: Enter Playground
2. On the instance list page, click the ID of the gateway instance you want to configure to go to its basic information page.
3. In the left sidebar, click Playground > API Debugging > Single API Debugging.
4. In the Debug API dropdown, manually select the API to debug.
Note:
All calls in Playground are real requests and will consume the Token quota of the consumer associated with this API.
Step 2: Configure Required Items
|
Debugging API | Yes | Select the model API to debug from the drop-down list. |
Consumer | Yes | Select the calling identity from the drop-down list. |
Model Name | Required when a pass-through model service is detected under the selected API. | The gateway will directly use the model_name parameter to initiate calls. Ensure that the correct model name is entered. |
Step 3: Configure Parameters
|
System Prompt | System prompt, presets the model persona and behavior boundaries. | - |
Max Tokens | Limit the maximum model output, 256 to 4096. | 2048 |
Top-P | Dynamically filter candidate tokens by probability mass, 0 to 1. | 0.9 |
Temperature | Adjust sampling randomness, 0 to 2. | 0.7 |
Streaming output | Return while generating | On |
Turn Limit | Control context memory depth, 1 to 20 (recommended setting: 1 to 5). | 5 |
Step 4: Send a Message and View the Result
1. Enter a message in the input box (press Shift+Enter to add a line break), and click Send.
2. The message stream displays user messages and assistant replies.
3. View the metrics card: it refreshes automatically after each response is completed.
Step 5: Manage Conversations
New chat: resets messages and cumulative metrics.
Save as report: saves the debugging results as a report.
Multi-API Comparative Debugging
Step 1: Enter Playground
2. On the instance list page, click the ID of the gateway instance you want to configure to go to its basic information page.
3. In the left sidebar, click Playground > API Debugging > Multi-API Comparison.
4. Multi-API comparison debugging supports debugging up to three model APIs simultaneously. Manually select the APIs you want to debug.
Step 2: Configure Required Items
|
Debugging API | Yes | Select the model API to debug from the drop-down list. |
Consumer | Yes | Select the calling identity from the drop-down list. |
Model Name | Required when a pass-through model service is detected under the selected API. | The gateway will directly use the model_name parameter to initiate calls. Ensure that the correct model name is entered. |
Step 3: Configure Parameters
You can select the "Parameter Sync" checkbox. After it is selected, all APIs share one set of parameters for debugging. You can also adjust parameters separately if needed.
|
System Prompt | System prompt, presets the model persona and behavior boundaries | - |
Max Tokens | Limit the maximum model output, 256 to 4096. | 2048 |
Top-P | Dynamically filter candidate tokens by probability mass, 0 to 1. | 0.9 |
Temperature | Adjust sampling randomness, 0 to 2. | 0.7 |
Streaming output | Return while generating | On |
Turn Limit | Control context memory depth, 1 to 20 (recommended setting: 1 to 5). | 5 |
Step 4: Send a Message and View the Result
1. Enter a message in the input box (press Shift+Enter to add a line break), and click Send.
2. The message stream displays user messages and assistant replies.
3. View the metrics card: it refreshes automatically after each response is completed.
Step 5: Manage Conversations
New chat: resets messages and cumulative metrics.
Save as report: saves the debugging results as a report.
Viewing Report
2. On the instance list page, click the ID of the gateway instance you want to configure to go to its basic information page.
3. In the left sidebar, click Playground > Test Reports to view the details of reports saved during debugging in the report list.