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

compute vector store usage bytes #31

Open
phact opened this issue May 22, 2024 · 0 comments · May be fixed by #84
Open

compute vector store usage bytes #31

phact opened this issue May 22, 2024 · 0 comments · May be fixed by #84
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@phact
Copy link
Collaborator

phact commented May 22, 2024

No description provided.

@phact phact added enhancement New feature or request good first issue Good for newcomers labels May 22, 2024
phact added a commit that referenced this issue Dec 2, 2024
Fixes #31

Compute vector store usage bytes in `create_vector_store` and `create_vector_store_file` functions.

* **`impl/routes_v2/vector_stores.py`**:
  - Import `os` and `HTTPException`.
  - Compute `usage_bytes` in `create_vector_store` by summing `usage_bytes` of each file.
  - Compute `usage_bytes` in `create_vector_store_file` by reading file size from the database.
  - Return `DeleteVectorStoreFileResponse` in `delete_vector_store_file`.

* **`client/.github/workflows/run-tests.yml`**:
  - Add a new job for running vector store bytes tests.

* **`client/tests/astra-assistants/test_vector_store_bytes.py`**:
  - Add a new test file to verify the `usage_bytes` attribute for vector stores.
  - Set up the test environment and write a test function that creates a vector store, attaches files to it, and verifies the `usage_bytes` attribute.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/datastax/astra-assistants-api/issues/31?shareId=XXXX-XXXX-XXXX-XXXX).
@phact phact linked a pull request Dec 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant