|
| 1 | +# V2 API Implementation Status |
| 2 | + |
| 3 | +## Overview |
| 4 | +This directory contains an experimental implementation of the ChromaDB v2 API client. |
| 5 | + |
| 6 | +**⚠️ Important:** The v2 API does not yet exist in ChromaDB. This implementation is based on anticipated v2 API design and is provided for experimental/preview purposes only. |
| 7 | + |
| 8 | +## Current Status |
| 9 | + |
| 10 | +### What's Implemented |
| 11 | +- Basic client structure (`ServerClient`, `CloudClient`) |
| 12 | +- Authentication providers (Basic, Token, ChromaToken) |
| 13 | +- Model classes for v2 operations |
| 14 | +- Collection operations interface |
| 15 | +- Query builder pattern |
| 16 | + |
| 17 | +### Known Issues |
| 18 | +1. **API Endpoints:** Currently modified to use `/api/v1` endpoints as a temporary workaround |
| 19 | +2. **Tenant/Database Support:** v2 expects multi-tenancy which v1 doesn't support |
| 20 | +3. **Response Models:** Field names and structure differ between v1 and v2 |
| 21 | +4. **Tests:** Most tests will fail against current ChromaDB versions |
| 22 | + |
| 23 | +## CI/CD Configuration |
| 24 | + |
| 25 | +The repository includes GitHub Actions workflows for v2 API testing: |
| 26 | +- `.github/workflows/v2-api-tests.yml` - Main test workflow |
| 27 | +- `.github/workflows/v2-api-pr-validation.yml` - PR validation |
| 28 | +- `.github/workflows/v2-api-nightly.yml` - Nightly compatibility tests |
| 29 | +- `.github/workflows/v2-api-release.yml` - Release workflow |
| 30 | + |
| 31 | +**Note:** These workflows are currently expected to fail until ChromaDB implements the actual v2 API. |
| 32 | + |
| 33 | +## Usage |
| 34 | + |
| 35 | +### For Experimental Development Only |
| 36 | +```java |
| 37 | +// This code will not work with current ChromaDB versions |
| 38 | +ServerClient client = ServerClient.builder() |
| 39 | + .baseUrl("http://localhost:8000") |
| 40 | + .auth(AuthProvider.none()) |
| 41 | + .build(); |
| 42 | + |
| 43 | +// Operations will fail or behave unexpectedly |
| 44 | +Collection collection = client.createCollection("my_collection"); |
| 45 | +``` |
| 46 | + |
| 47 | +## Recommendations |
| 48 | + |
| 49 | +1. **Do not use in production** - This is experimental code |
| 50 | +2. **Use v1 Client** - For all actual ChromaDB operations, use the stable v1 client in `tech.amikos.chromadb.Client` |
| 51 | +3. **Monitor ChromaDB releases** - Watch for official v2 API announcements |
| 52 | + |
| 53 | +## Future Work |
| 54 | + |
| 55 | +When ChromaDB releases the actual v2 API: |
| 56 | +1. Update all endpoints from the temporary v1 paths |
| 57 | +2. Align model classes with actual v2 response structures |
| 58 | +3. Implement proper tenant/database handling |
| 59 | +4. Update tests to match real v2 behavior |
| 60 | +5. Remove this warning documentation |
| 61 | + |
| 62 | +## Contributing |
| 63 | + |
| 64 | +If you're interested in the v2 API development: |
| 65 | +- Check ChromaDB's official repository for v2 API proposals |
| 66 | +- Test against ChromaDB development branches if available |
| 67 | +- Report issues specific to v2 API design (not current failures) |
0 commit comments