mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-14 04:15:35 +00:00
Set up no agent run for a request with no token or API key
The answer routes refuse such a request with 401, but only after building the agent, so a public agent's prompt tools were pre-fetched, and their actions run, for nobody. Anonymous chat without an agent key is not supported, so the processor now stops before any setup and the route answers 401 as before.
This commit is contained in:
1 parent
daf6af57ae
commit
029189fe0c
3 files changed
+66
No files matched your search
@@ -22,6 +22,7 @@ def _processor() -> StreamProcessor:
|
||||
sp.agent_config = {}
|
||||
sp.retriever_config = {"retriever_name": "classic", "chunks": 2, "doc_token_limit": 50000}
|
||||
sp.data = {}
|
||||
sp.decoded_token = {"sub": "u"}
|
||||
return sp
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user