Skip to content

Expose all vector store file kwargs in create to create_and_poll (namely attributes) #2362

Open
@walsha2

Description

@walsha2

Confirm this is a feature request for the Python library and not the underlying OpenAI API.

  • This is a feature request for the Python library

Describe the feature or improvement you're requesting

Here is the function signature for vector_stores.files.create:

def create(
    self,
    vector_store_id: str,
    *,
    file_id: str,
    attributes: Optional[Dict[str, Union[str, float, bool]]] | NotGiven = NOT_GIVEN,
    chunking_strategy: FileChunkingStrategyParam | NotGiven = NOT_GIVEN,
    # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
    # The extra values given here take precedence over values defined on the client or passed to this method.
    extra_headers: Headers | None = None,
    extra_query: Query | None = None,
    extra_body: Body | None = None,
    timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> VectorStoreFile:

and here is the function signature for vector_stores.files.create_and_poll:

def create_and_poll(
    self,
    file_id: str,
    *,
    vector_store_id: str,
    poll_interval_ms: int | NotGiven = NOT_GIVEN,
    chunking_strategy: FileChunkingStrategyParam | NotGiven = NOT_GIVEN,
) -> VectorStoreFile:

The key item missing here is attributes. This means that if I need to set attributes I cant really use the connivence create_and_poll method since it does not allow me to drill them down to the underlying create call.

Instead, I would need to recreate this method myself just to pass in attributes - no big deal, just seems unnecessary since the method already exists.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions