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

add unsupported_file error type for VectorStoreFileObject #300

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JensWalter
Copy link

I tried listing my vector store file and received an error not part of the spec.

Doing the API call manually I saw that the status code returned is not yet included in the openAPI yaml.

curl https://api.openai.com/v1/vector_stores/vs_Y.../files -H 'OpenAI-Beta: assistants=v2'

the response.

    {
      "id": "file-hAV...",
      "object": "vector_store.file",
      "usage_bytes": 0,
      "created_at": 1722070582,
      "vector_store_id": "vs_....",
      "status": "failed",
      "last_error": {
        "code": "unsupported_file",
        "message": "The file type is not supported."
      },
      "chunking_strategy": {
        "type": "static",
        "static": {
          "max_chunk_size_tokens": 800,
          "chunk_overlap_tokens": 400
        }
      }
    },

So I added the status code to the enum.

@vrurg
Copy link

vrurg commented Jul 30, 2024

I don't think it worth a new issue only because it's just another enum, so I report it here. Another code I saw and which is not specced yet: "invalid_file".

{
  "id": "...",
  "object": "vector_store.file",
  "usage_bytes": 0,
  "created_at": 1722298943,
  "vector_store_id": "...",
  "status": "failed",
  "last_error": {
    "code": "invalid_file",
    "message": "The file could not be parsed because it is too large."
  },
  "chunking_strategy": {
    "type": "static",
    "static": {
      "max_chunk_size_tokens": 800,
      "chunk_overlap_tokens": 400
    }
  }
}

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

Successfully merging this pull request may close these issues.

2 participants