{"id":13619156,"url":"https://github.com/mariochavez/chroma","last_synced_at":"2025-07-22T14:34:39.893Z","repository":{"id":161704293,"uuid":"636376429","full_name":"mariochavez/chroma","owner":"mariochavez","description":"Ruby client for Chroma DB","archived":false,"fork":false,"pushed_at":"2024-12-11T19:51:05.000Z","size":136,"stargazers_count":78,"open_issues_count":2,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-27T04:58:00.667Z","etag":null,"topics":["llm","ruby-gem","vectorstore"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mariochavez.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-05-04T17:58:17.000Z","updated_at":"2025-06-07T12:51:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"67537dd4-54c8-4cb0-a1ba-ca0b670daddc","html_url":"https://github.com/mariochavez/chroma","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/mariochavez/chroma","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariochavez%2Fchroma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariochavez%2Fchroma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariochavez%2Fchroma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariochavez%2Fchroma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mariochavez","download_url":"https://codeload.github.com/mariochavez/chroma/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariochavez%2Fchroma/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266510687,"owners_count":23940696,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["llm","ruby-gem","vectorstore"],"created_at":"2024-08-01T21:00:35.509Z","updated_at":"2025-07-22T14:34:39.869Z","avatar_url":"https://github.com/mariochavez.png","language":"Jupyter Notebook","funding_links":[],"categories":["Jupyter Notebook","Open Source"],"sub_categories":["API Libraries"],"readme":"# Chroma's Ruby client\n\nChroma is the open-source embedding database. Chroma makes it easy to build LLM apps by making knowledge, facts, and skills pluggable for LLMs.\n\nThis Ruby gem is a client to connect to Chroma's database via its API.\n\nFind more information about Chroma on how to install at their website. [https://www.trychroma.com/](https://www.trychroma.com/)\n\n## Description\n\nChroma-rb is a Ruby client for Chroma Database. It works with version 0.3.22 or better **(Please see requirements below)**.\n\nA small example usage\n\n```ruby\nrequire \"logger\"\n\n# Requiere Chroma Ruby client.\nrequire \"chroma-db\"\n\n# Configure Chroma's host. Here you can specify your own host.\nChroma.connect_host = \"http://localhost:8000\"\nChroma.logger = Logger.new($stdout)\nChroma.log_level = Chroma::LEVEL_ERROR\n\n# Check current Chrome server version\nversion = Chroma::Resources::Database.version\nputs version\n\n# Create a new collection\ncollection = Chroma::Resources::Collection.create(collection_name, {lang: \"ruby\", gem: \"chroma-db\"})\n\n# Add embeddings\nembeddings = [\n  Chroma::Resources::Embedding.new(id: \"1\", embedding: [1.3, 2.6, 3.1], metadata: {client: \"chroma-rb\"}, document: \"ruby\"),\n  Chroma::Resources::Embedding.new(id: \"2\", embedding: [3.7, 2.8, 0.9], metadata: {client: \"chroma-rb\"}, document: \"rails\")\n]\ncollection.add(embeddings)\n```\n\nFor a complete example, please refer to the Jupyter Noterbook [Chroma gem](https://github.com/mariochavez/chroma/blob/main/notebook/Chroma%20Gem.ipynb)\n\n### Hosted Chroma\n\nYou can use this gem with Chroma hosted service at [https://trychroma.com](https://trychroma.com). In the configuration\noptions, you can set the `api_key` to use the hosted service. Also, you can set the `tenant` and `database` to use\nthe hosted service, by default they are set to `default_tenant` and `default_database`.\n\n```ruby\nChroma.api_key = \"cd75e50bf8213fb7ce57c05b\"\nChroma.tenant = \"my_tenant\"     # Optional\nChroma.database = \"my_database\" # Optional\n```\n\n## Requirements\n\n- Ruby 3.1.4 or newer\n- Chroma Database 0.4.24 or later running as a client/server model.\n\nFor Chroma database 0.3.22 or older, please use version 0.3.0 of this gem.\n\n## Installation\n\nTo install the gem and add to the application's Gemfile, execute:\n\n    bundle add chroma-db\n\nIf bundler is not being used to manage dependencies, install the gem by executing:\n\n    gem install chroma-db\n\n## Use the Jupyter notebook\n\nTo use the Jupyter Noterbook [Chroma gem](https://github.com/mariochavez/chroma/blob/main/notebook/Chroma%20Gem.ipynb) in this repository, please install python 3.9 or better, iruby and Jupyter notebook dependencies:\n\n    pip install jupyterlab notebook ipywidgets\n    gem install iruby\n    iruby register --force\n\n**NOTE:** Notebook has an example on how to create embeddings using [Ollama](https://ollama.com) and [Nomic embed text](https://ollama.com/library/nomic-embed-text) with a simple Ruby HTTP client.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`.\n\nTo generate Rdoc documentation for the gem, run `bundle exec rake rdoc`.\n\n## Rails integration\n\nIf you are looking for a solution to embed your ActiveRecord models into ChromaDB, look at [Cromable gem](https://github.com/AliOsm/chromable)\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at \u003chttps://github.com/mariochavez/chroma\u003e. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/mariochavez/chroma/blob/main/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://github.com/mariochavez/chroma/blob/main/LICENSE.txt).\n\n## Code of Conduct\n\nEveryone interacting in the Chroma project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/mariochavez/chroma/blob/main/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmariochavez%2Fchroma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmariochavez%2Fchroma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmariochavez%2Fchroma/lists"}