Skip to content

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

Description

@Vishal-Padia

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions