{"id":21689656,"url":"https://github.com/3zcurdia/chroma","last_synced_at":"2025-08-20T15:06:39.370Z","repository":{"id":189281808,"uuid":"680353849","full_name":"3zcurdia/chroma","owner":"3zcurdia","description":"ChromaDB Client for elixir","archived":false,"fork":false,"pushed_at":"2024-06-04T01:45:00.000Z","size":66,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-05T13:59:27.693Z","etag":null,"topics":["hex-package","vectorstore"],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/chroma/","language":"Elixir","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/3zcurdia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-08-19T01:32:02.000Z","updated_at":"2024-06-18T05:41:45.078Z","dependencies_parsed_at":"2023-10-04T10:01:05.020Z","dependency_job_id":"e82ad6a8-7f75-47e6-8bf9-3329560f8ec8","html_url":"https://github.com/3zcurdia/chroma","commit_stats":null,"previous_names":["3zcurdia/chroma"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3zcurdia%2Fchroma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3zcurdia%2Fchroma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3zcurdia%2Fchroma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3zcurdia%2Fchroma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/3zcurdia","download_url":"https://codeload.github.com/3zcurdia/chroma/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248546640,"owners_count":21122356,"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","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":["hex-package","vectorstore"],"created_at":"2024-11-25T17:27:07.051Z","updated_at":"2025-04-12T09:34:58.423Z","avatar_url":"https://github.com/3zcurdia.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chroma\n\nA [ChromaDB](https://trychroma.com) client for Elixir.\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed\nby adding `chroma` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:chroma, \"~\u003e 0.1.2\"}\n  ]\nend\n```\n\n## Configuration\n\nIn your config file you can setup the following:\n\n```elixir\nconfig :chroma, \n  host: \"http://localhost:8000\",\n  api_base: \"api\",\n  api_version: \"v1\"\n```\n\nBy default the config is set to `api/v1`\n\n## Usage\n\nTo verify that the client is connected to the server, you can use the `version` function from the `Chroma.Database` module:\n\n```elixir\nChroma.Database.version\n```\n\nTo handle all collection actions, you can use the `Chroma.Collection` module:\n\n```elixir\n  {:ok, collection} = Chroma.Collection.create(\"my_collection\", %{name: \"string\", age: \"int\"})\n  {:ok, collection} = Chroma.Collection.get_or_create(\"my_collection\", %{name: \"string\", age: \"int\"})\n  {:ok, collection} = Chroma.Collection.get(\"my_collection\")\n  Chroma.Collection.delete(\"my_collection\")\n```\n\nThe client does not generate embeddings, but you can generate embeddings using [bumblebee](https://github.com/elixir-nx/bumblebee) with the [TextEmbedding module](https://hexdocs.pm/bumblebee/Bumblebee.Text.html#text_embedding/3-examples), you can find an example on this [livebook](https://github.com/3zcurdia/chroma/tree/main/livebooks/text-embedding.livemd).\n\nOnce you get the embeddings for your documents, you can index them using the `add` function from the `Chroma.Collection` module:\n\n```elixir\n  {:ok, collection} = Chroma.Collection.get_or_create(\"my_collection\", %{type: \"Text\"})\n  Chroma.Collection.add(collection, \n    %{\n      embeddings: embeddings,\n      documents: documents,\n      metadata: metadata,\n      ids: ids\n    }\n  )\n```\n\nThis will add the documents, embeddings and metadata to the collection. Now you can query using a query embeddings list:\n\n```elixir\n  Chroma.Collection.query(collection, \n    %{\n      embeddings: query_embeddings,\n        query_embeddings: query_embeddings,\n        where: %{\"metadata_field\": \"is_equal_to_this\"},\n        where_document: %{\"$contains\" =\u003e \"search_string\"}\n    }\n  )\n```\n\nTo understand better how to query, you can check the [ChromaDB usage guide](https://docs.trychroma.com/usage-guide). You can also check the [livebook](https://github.com/3zcurdia/chroma/tree/main/livebooks/chroma-example.livemd) where you can find a full example of how to use the client.\n\n## License\n\nChroma is released under the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3zcurdia%2Fchroma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F3zcurdia%2Fchroma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3zcurdia%2Fchroma/lists"}