Skip to content

Commit

Permalink
add traceid (#352)
Browse files Browse the repository at this point in the history
* add traceid

* update lint
  • Loading branch information
wj-Mcat authored Jun 25, 2024
1 parent 0f87d06 commit d98a918
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions erniebot/src/erniebot/backends/aistudio.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,8 @@ def _add_aistudio_fields_to_headers(self, headers: HeadersType) -> HeadersType:
"Key 'Authorization' already exists in `headers`: %r",
headers["Authorization"],
)
if "EB_SDK_TRACE_APP_ID" in os.environ:
headers["X-EB-SDK-TRACE-APP-ID"] = os.getenv("EB_SDK_TRACE_APP_ID", "")

headers["Authorization"] = f"token {self._access_token}"
return headers

0 comments on commit d98a918

Please sign in to comment.