Closed
Description
gptscript version v0.0.0-dev-f4284f43-dirty
Steps to reproduce the problem:
- Execute the following gptscript with a tool that has a credential with name -
slack-message-credential-tool
defined locally in it.
Tools: github.com/sangee2004/slack-message
Send a message to "sangeetest" channel saying "hello from gptscript".
- User is prompted to enter the credentials as part of this script execution.
At this time , the following credential gets cached
gptscript credential --all-contexts
CONTEXT TOOL
default slack-message-credential-tool
- Now execute the following script which has a local credential with name -
slack-message-credential-tool
credential: slack-message-credential-tool
Tools: github.com/gptscript-ai/slack-message
Send a message to "sangeetest" channel saying "hello from gptscript".
---
name: slack-message-credential-tool
#!/usr/bin/env bash
output=$(gptscript -q --disable-cache sys.prompt '{"message":"Please enter your slack credential.","fields":"credential","sensitive":"true"}')
credential=$(echo $output | jq -r '.credential')
echo "{\"env\":{\"\GPTSCRIPT_SLACK_TOKEN":\"$credential\"}}"
This results in trying to serve the credentials from cached entry ( it fails right now because of #237).
Expected Behavior:
We do not expect credentials from cached entry to be used in this case and user should be prompted to enter credentials.