Skip to content

Implement vector store search, retrieve file content operations #360

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

Merged
merged 12 commits into from
Jun 1, 2025

Conversation

cfraz89
Copy link
Contributor

@cfraz89 cfraz89 commented Apr 28, 2025

A basic query looks like this:

    let results = client
        .vector_stores()
        .search(
            &vector_store.id,
            VectorStoreSearchRequest {
                query: "uber profit".into(),
                ..Default::default()
            },
        )
        .await?;
  • Also implement retrieve file contents api
  • Add attributes property to CreateVectorStoreFileRequest
  • Add an example for vector store search.

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.

Thank you for the PR, really quality work - from matching spec to adding example!

I committed a few suggestions to cleanup after example is run - delete vector store and files to avoid any costs.

@64bit 64bit merged commit 0e7a629 into 64bit:main Jun 1, 2025
ifsheldon pushed a commit to ifsheldon/async-openai-wasm that referenced this pull request Jun 2, 2025
…t#360)

* Implement vector search api

* Make ids in ListVectorStoreFilesResponse optional, as they can come back null when there are no files

* Implement vector file content api

* Add Default derive to RankingOptions, make CompountFilter.type non-optional

* Made comparison type non-optional

* Make compound filter a Vec of VectorStoreSearchFilter

* Implement from conversions for filters

* Add vector store retrieval example

* Update example readme

* Add attributes to create vector store

* Update examples/vector-store-retrieval/src/main.rs

* Update examples/vector-store-retrieval/src/main.rs

---------

Co-authored-by: Himanshu Neema <himanshun.iitkgp@gmail.com>
(cherry picked from commit 0e7a629)
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