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 vector_store.file #249

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

JensWalter
Copy link
Contributor

I tried listing my vector store file and received the following error.

value: JSONDeserialize(Error("unknown variant `unsupported_file`, expected one of `internal_error`,
 `file_not_found`, `parsing_error`, `unhandled_mime_type`", line: 204, column: 34))

Doing the API call manually I saw that the status code returned is not yet supported in async-aponai.

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.

@64bit
Copy link
Owner

64bit commented Jul 28, 2024

Thank you for the PR!

It appears that upstream spec is missing this too, you'd do them a favor if you report it there too:
https://github.com/openai/openai-openapi/blob/master/openapi.yaml#L12935-L12940

@JensWalter
Copy link
Contributor Author

thanks for the hint, I also opened a PR upstream, openai/openai-openapi#300

Copy link
Owner

@64bit 64bit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like they have finally updated it in spec and some of variant are outdated in this repo. Good that this variant is still present, I'll go ahead and merge this.

Thank you for the fix!

@64bit 64bit merged commit 7bb0858 into 64bit:main Aug 29, 2024
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