flows-network / docs

docs for flows.network
https://docs.flows.network/
2 stars 3 forks source link

Open AI's new API Key format is not supported on the flows.network #39

Closed angad-singhh closed 6 months ago

angad-singhh commented 6 months ago

Problem

The problem is associated with Open AI API Key authentication in [ github-pr-review / github-pr-summarize ]. Currently flows.network only supports the old API key format of Open AI, which is 51 characters, but right now Open AI provides a 56 characters API key by default.

Explanation

=> Previously OpenAI used to generate a USER specific API key of length 51 characters, but right now Open AI by default gives us a project specific API Key length of 56 characters, which is also preferred key format according to OpenAI for security reasons. [https://platform.openai.com/docs/api-reference/authentication](click here)

=> As current API authentication in flows.network is based on previous 51 character API format and does not support new default/preffered API key format of OpenAI API Key 56 character, the authentication process throws an error.

Example

Old format : { sk-RvFHUsS.................................jhs87jfn } [ 51 characters ] New format: { sk-proj-jh76jbAsfaj.............................lnRd79s } [ 56 characters ]

Why do we need this:

Although the issue is not big, but it would be better if new API format is also accepted, as this problem will also be valid for other flows bots where Open AI API key will be used.

angad-singhh commented 6 months ago

We can either mention this in docs/readme of the templates that only USER key is allowed or add the authentication for new format on the portal.

DarumaDocker commented 6 months ago

Fixed. @angad-singhh We have changed the limit from only allowing 51 characters to at least 51 characters, because the API key associated with the Service account can be longer than 56.