mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-19 02:54:28 -05:00
Update credential error message to guide LLM behavior
When a block requires credentials the user hasn't connected, the tool response now tells the LLM that a sign-in button is visible in the chat UI, and instructs it to stop and wait rather than suggesting workarounds or directing users to settings. This message is never shown to the end user — the frontend suppresses the raw tool response and shows the ChatCredentialsSetup widget instead. Resolves SECRT-2011
This commit is contained in:
@@ -202,8 +202,11 @@ class RunBlockTool(BaseTool):
|
||||
|
||||
return SetupRequirementsResponse(
|
||||
message=(
|
||||
f"Block '{block.name}' requires credentials that are not configured. "
|
||||
"Please set up the required credentials before running this block."
|
||||
f"Block '{block.name}' requires credentials that the user has not yet connected. "
|
||||
"A sign-in button has appeared in the chat for the user to connect their account. "
|
||||
"STOP HERE and tell the user to click the sign-in button shown above in the chat. "
|
||||
"Do NOT send further messages, suggest workarounds, or direct them to settings. "
|
||||
"Wait for the user to complete sign-in before continuing."
|
||||
),
|
||||
session_id=session_id,
|
||||
setup_info=SetupInfo(
|
||||
|
||||
Reference in New Issue
Block a user