Skip to content

Credentials - Do not store empty credentials. #251

Closed
@sangee2004

Description

@sangee2004

gptscript version v0.0.0-dev-656ae77b-dirty

Steps to reproduce the problem:

  1. Execute the following script which has a tool that has credential tool served from gihub
Tools: github.com/sangee2004/slack-message/toolcred.gpt

Send a message to "sangeetest" channel saying "hello new from gptscript".
  1. When prompted for entering the credential - quit (clt c) or just hit enter (no credential is entered).

This results in an empty credential to be stored.

  1. Execute the script again. We will not be prompted to enter the credentials and the script will fail.

Expected Behavior:
When user has not entered any credentials , we should not store the credentials. This way , when the script is executed the next time user will be prompted to the enter the credentials instead of failing right away.

Note:
Should we also consider stripping empty spaces before and after the credential string before storing and using the keys .

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions