mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-13 14:50:00 +00:00
Add request_id field to improve request tracking and debugging (for Tongyi model) (#30110)
- **Description**: Added the request_id field to the check_response function to improve request tracking and debugging, applicable for the Tongyi model. - **Issue**: None - **Dependencies**: None - **Twitter handle**: None - **Add tests and docs**: None - **Lint and test**: Ran `make format`, `make lint`, and `make test` to ensure the code meets formatting and testing requirements.
This commit is contained in:
parent
1ee8aceaee
commit
f0153414d5
@ -59,6 +59,7 @@ def check_response(resp: Any) -> Any:
|
||||
return resp
|
||||
elif resp["status_code"] in [400, 401]:
|
||||
raise ValueError(
|
||||
f"request_id: {resp['request_id']} \n "
|
||||
f"status_code: {resp['status_code']} \n "
|
||||
f"code: {resp['code']} \n message: {resp['message']}"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user