Skip to content
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

Checking whether the API key is valid or not. #9

Open
Vishal-Padia opened this issue Oct 23, 2023 · 0 comments
Open

Checking whether the API key is valid or not. #9

Vishal-Padia opened this issue Oct 23, 2023 · 0 comments

Comments

@Vishal-Padia
Copy link

When testing FinSight, I noticed that adding random gibberish to the text field allows a document to be uploaded, even though the output is not returned. To improve security, consider adding validation to check if the API key is valid before processing the document. Rather than just failing silently, display an error message like "Invalid API key" to alert the user.

Since there's no direct way to validate the key, you could estimate the average processing time based on document length and network latency. If the processing takes significantly longer than expected, it likely indicates an invalid key. Use this heuristic to trigger the error message.

Overall, FinSight is an impressive application and congratulations on winning the LLM Hackathon! While not critical, adding API key validation would improve security and provide better error handling. Providing explicit failure messages instead of just failing silently improves the user experience.

In summary:

Add API key validation to prevent processing with invalid keys
Display clear error message like "Invalid API key" instead of silent failure
Estimate expected processing time and use slow responses as a heuristic to detect invalid keys
Well done on building an excellent application! API key validation would further improve security and UX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant