mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-12 16:15:14 +00:00
Read the public-link flag safely on processors built without init
Callers that build a StreamProcessor without __init__ and stub the agent key lookup never set the flag, and configuring the agent then failed. It now reads as not a public-link caller.
This commit is contained in:
1 parent
121b6dd071
commit
72e1dc5fc3
1 file changed
+3
-1
@@ -1002,7 +1002,9 @@ class StreamProcessor:
|
||||
agent_id, self.initial_user_id
|
||||
)
|
||||
self.agent_id = str(agent_id) if agent_id else None
|
||||
self.agent_config["public_link_caller"] = bool(self.agent_id and self.public_link_usage)
|
||||
self.agent_config["public_link_caller"] = bool(
|
||||
self.agent_id and getattr(self, "public_link_usage", False)
|
||||
)
|
||||
|
||||
# Determine the effective API key (explicit > agent-derived)
|
||||
effective_key = self.data.get("api_key") or self.agent_key
|
||||
|
||||
Reference in new issue
Block a user