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

Issue with Model List Retrieval #76

Open
godv23 opened this issue Nov 28, 2023 · 0 comments
Open

Issue with Model List Retrieval #76

godv23 opened this issue Nov 28, 2023 · 0 comments

Comments

@godv23
Copy link

godv23 commented Nov 28, 2023

Issue with Model List Retrieval

import requests
 
url = "https://api.openai.com/v1/models"

payload={}

headers = {
  'Authorization': 'Bearer sk-'
}

response = requests.request("GET", url, headers=headers, data=payload, allow_redirects=False)

print(response.text)

The official API response is as follows:

{
  "object": "list",
  "data": [
    {
      "id": "text-search-babbage-doc-001",
      "object": "model",
      "created": 1651172509,
      "owned_by": "openai-dev"
    }, ......

The project's response is as follows:

{
"data": [
  {
     "created_at":1701168825,
     "id": "gpt35",
     "model": "gpt-35-turbo-16k",
     "object": "deployment",
     "owner": "organization-owner",......

In this case, the id represents the name of the official model,
but the project returns the id as the deployment name on Azure.
Some applications may retrieve this name, leading to errors.

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