Skip to content

Issue with Model List Retrieval #76

@godv23

Description

@godv23

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.

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