Development Testing Best Practices
The following efficient workflow is recommended for developer testing needs:
- Quick Verification: Testing basic functionality using the cURL command
curl --location "http://127.0.0.1:50005/v1/chat/completions" --header "Content-Type: application/json" --data '{"model": "grok-2", "messages": [{"role": "user", "content": "测试"}]}'
- ATM: Enable
API_HATD=true
Avoid generating test data residuals - Multi-model switching: test different versions of grok-2, grok-3, etc. by modifying the model parameters
- automated test: Directly reuse existing test scripts by utilizing OpenAI format compatibility.
The development environment allows you to set theENABLE_MIRROR_API
Set to false to turn off non-essential interfaces and focus on core functionality testing.
This answer comes from the articleGrok-Mirror: one-click deployment of a profitable Grok mirror siteThe