You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using a sk-proj-B7_95Ibyt........ key causes a runtime error
In Private Shared Sub ListAvailableModels()
23 Dim Ist As JSONItem
Try
Ist = New JSONItem(data)
Catch err As JSONException
Raise New OpenAlException(client)
End Try
ERROR --> * If Ist = Nil Or Not Ist. HasName("data") Then Raise New OpenAlException(Ist)
Ist = Ist.Value("data")
For i As Integer = 0 To Ist.Count - 1
Dim m As New OpenAl. Model (Ist.Child (i))
ModelList.Append(m)
Next
' text-moderation-stable and text-moderation-latest are the two models that
' may be used with the Moderation endpoint, but they are not listed by the
' Models endpoint, so they're added here
ModelList.Append(New OpenAl.Model(New JSONItem(TEXT_MODERATION_L
ModelList.Append(New OpenAl.Model(New JSONItem(TEXT_MODERATION_S
End Sub
Stack
OpenAl.Model.ListAvailableModels
OpenAl.Model.Count
DemoWindow.SetAP|KeyBtn.Action Main Thread +
It looks like project scoped API keys can have their permissions limited, including limits on listing the available models (i.e. no access to the /v1/models endpoint). This is a problem since we're assuming that /v1/models will always be accessible to a valid API key. Just about every operation in this wrapper begins by checking the specified model name against the list of available models.
I'll have to think about how to accommodate project scoped keys. In the meantime, try changing the key's permission to allow reading the model list.
No description provided.
The text was updated successfully, but these errors were encountered: