Skip to content

Commit

Permalink
add traceid
Browse files Browse the repository at this point in the history
  • Loading branch information
wj-Mcat committed Jun 25, 2024
1 parent 621ce45 commit 680450b
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 680450b

Please sign in to comment.