Skip to content

Do not print credentials in console #483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sangee2004 opened this issue Jun 11, 2024 · 2 comments
Closed

Do not print credentials in console #483

sangee2004 opened this issue Jun 11, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@sangee2004
Copy link
Contributor

gptscript version v0.8.1+da33973d

Steps to reproduce the problem:

  1. Have OpenAI API token already set (sys.openai credential created) by executing any gptscript.
  2. Execute the following script that uses gpt4-v-vision and dalle-image-generation tools.
Tools:  github.com/gptscript-ai/gpt4-v-vision, github.com/gptscript-ai/dalle-image-generation, sys.download

Generate an image of cow and download it in cow.png
Describe the image in file://./cow.png like a kindergarten teacher would.
  1. Notice that when user is prompted for entering the credentials for gpt4-v-vision and dalle-image-generation tools , the credentials are printed in clear text in console
12:33:35 started  [vision(6)] [input={"images":"file://./cow.png","prompt":"Describe the image like a kindergarten teacher would."}]
12:33:35 started  [credential: github.com/gptscript-ai/gpt4-v-vision/credential]
12:33:35 sent     [credential: github.com/gptscript-ai/gpt4-v-vision/credential]
Please enter your OpenAI API token.
? token ***************************************************
12:34:06 ended    [credential: github.com/gptscript-ai/gpt4-v-vision/credential] [output={\"env\": {\"OPENAI_API_KEY\": \"sk-*******************\"}}] ==> This is in clear text
12:34:06 sent     [vision(6)]
12:34:19 ended    [vision(6)] [output={\n    \"id\": \"chatcmpl-9Z1Xv5M9by6w4lA34VOUnPj5zbepX\",\n    \"object\": \"chat.completion\",\n    \"created\"...]
@sangee2004
Copy link
Contributor Author

Tokens are also logged in clear text in "Stack Trace View" option when executing scripts using Chat Builder using "--ui" option.

@sangee2004
Copy link
Contributor Author

Tested with gptscript version v0.0.0-dev-f8d3b44e-dirty

Tokens are not logged in TUI and in "Stack Trace View" option anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants