Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Chromadb Php

Chromadb Php Laravel Package

codewithkyrian/chromadb-php

PHP client for ChromaDB, making it easy to create collections, add and query embeddings, and manage documents/metadata from your Laravel or PHP apps. Lightweight API wrapper to integrate vector search and retrieval workflows without leaving PHP.

View on GitHub
Deep Wiki
Context7

A PHP SDK for interacting with Chroma Vector Database seamlessly.

Frequently asked questions about Chromadb Php
How do I install and connect this ChromaDB PHP package in Laravel?
Run `composer require codewithkyrian/chromadb-php` to install. Use `ChromaDB::local()->connect()` for self-hosted instances or `ChromaDB::cloud('your-api-key')->connect()` for Chroma Cloud. Configure the host, port, and tenant via fluent methods like `withHost()` or `withTenant()`.
Does this package support Laravel’s HTTP client (symfony/http-client) instead of Guzzle?
Yes, the package is PSR-18 compliant and auto-discovers Laravel’s HTTP client. If needed, it falls back to Guzzle. No manual Guzzle installation is required unless explicitly configured.
Can I use this SDK with Chroma Cloud’s forking collections feature?
Absolutely. The package fully supports Chroma Cloud’s forking collections via `ChromaDB::cloud()` and methods like `forkCollection()`. This is useful for A/B testing embeddings or canary deployments in Laravel applications.
How do I handle partial or mixed embeddings (some null, some non-null) in Laravel?
The SDK validates data before ingestion and supports partial embeddings natively. Use `Record::make()` with mixed arrays, and the package will handle validation automatically. This is ideal for incremental data pipelines.
Will this package work with Laravel 10 and PHP 8.1+?
Yes, the package is fully compatible with Laravel 10 and PHP 8.1+. It leverages PHP 8.1 features like named arguments and enums, ensuring seamless integration with modern Laravel applications.
How can I integrate ChromaDB with Laravel Eloquent models?
Use the `toRecord()` method or trait to convert Eloquent models into ChromaDB `Record` objects. For example, `Model::toRecord()` simplifies interactions, allowing you to sync Laravel data with ChromaDB collections effortlessly.
What are the alternatives if Chroma Cloud goes down or has rate limits?
Configure fallback strategies like caching responses with Laravel’s cache system or degrading to keyword search. Monitor Chroma Cloud usage via `collection->usage()` and set Laravel rate limits to manage costs.
How do I handle schema changes in ChromaDB collections when using Laravel migrations?
Track ChromaDB schemas using Laravel migrations by defining schema fields in your migration files. The package provides structured `Record` validation to prevent malformed data ingestion, ensuring consistency.
Can I use this SDK for async operations, like background embedding generation?
Yes, leverage Laravel Queues to dispatch embedding generation tasks. Use `Record::make()->dispatch()` to process embeddings asynchronously, integrating with Chroma Cloud’s async APIs via Laravel Promises.
How do I monitor ChromaDB API usage and costs in a Laravel application?
Use Chroma’s built-in `collection->usage()` method to track API calls and costs. Integrate this with Laravel Debugbar or custom metrics to log ChromaDB usage, helping you optimize performance and budget.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
besmartand-pro/php-quality-config
sentix/ai-chatbot
codifyo/ts-generator-bundle
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor