Skip to content

JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.

Python

fix(memory): 用户画像 fetcher pc 端补 Authorization header

zhouguohaoe565e1a01a5d
diff --git a/jiuwenswarm/agents/harness/common/rails/office_ace_user_profile/fetcher.py b/jiuwenswarm/agents/harness/common/rails/office_ace_user_profile/fetcher.py
index 4e9681d7e6..4692d208b9 100644
--- a/jiuwenswarm/agents/harness/common/rails/office_ace_user_profile/fetcher.py
+++ b/jiuwenswarm/agents/harness/common/rails/office_ace_user_profile/fetcher.py
@@ -125,6 +125,7 @@ class UserProfileFetcher:
# pc 端 appapi 用 X-Chat-User-Id 头传递用户身份;cloud 端 internal 用 path actor_id。
if not self._is_cloud():
headers["X-Chat-User-Id"] = self._config.user_id
+ headers["Authorization"] = f"Bearer {self._config.api_key}"
url = self._build_url()
last_err: Optional[str] = None