Skip to content

[Bug]: Undefined array key "chunking_strategy" #425

@dgoetzit

Description

@dgoetzit

Description

When using this library with Azure Open AI and attempting to list the Vector Store Files for a particular Vector Store, the following exception is thrown: Undefined array key "chunking_strategy"

This is due to the expectation in the src/Responses/VectorStores/Files/VectorStoreFileResponse.php from() method that the "chunking_strategy" key will exist.

I'd be happy to open a PR to resolve this if I have some upcoming availability, but also want to ensure that support for Azure Open AI is desired by the maintainers before doing so. It does appear that Azure / OpenAI continue to diverge a bit in their respective APIs, resulting in some maintenance nightmares.

Steps To Reproduce

  1. Use this library with Azure Open AI
  2. Try to list the Vector Store Files for a Vector Store:
$this->client->vectorStores()->files()->list(
    vectorStoreId: $vectorStoreId,
);

OpenAI PHP Client Version

v0.10.1

PHP Version

8.2.20

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Non-OpenAI ModelNot an OpenAI Model.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions