{"id":28493395,"url":"https://github.com/qdrant/qdrant-txtai","last_synced_at":"2025-07-08T11:31:13.459Z","repository":{"id":104791083,"uuid":"543555321","full_name":"qdrant/qdrant-txtai","owner":"qdrant","description":"An integration of Qdrant ANN vector database backend with txtai ","archived":false,"fork":false,"pushed_at":"2024-08-14T03:40:42.000Z","size":242,"stargazers_count":24,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-08T09:08:36.546Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qdrant.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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":"2022-09-30T10:52:29.000Z","updated_at":"2024-11-27T07:44:47.000Z","dependencies_parsed_at":"2024-05-16T05:53:16.935Z","dependency_job_id":null,"html_url":"https://github.com/qdrant/qdrant-txtai","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/qdrant/qdrant-txtai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qdrant%2Fqdrant-txtai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qdrant%2Fqdrant-txtai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qdrant%2Fqdrant-txtai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qdrant%2Fqdrant-txtai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qdrant","download_url":"https://codeload.github.com/qdrant/qdrant-txtai/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qdrant%2Fqdrant-txtai/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264259664,"owners_count":23580856,"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":[],"created_at":"2025-06-08T09:08:40.640Z","updated_at":"2025-07-08T11:31:13.454Z","avatar_url":"https://github.com/qdrant.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# qdrant-txtai\n\n[txtai](https://github.com/neuml/txtai) simplifies building AI-powered semantic \nsearch applications using Transformers. It leverages the neural embeddings and\ntheir properties to encode high-dimensional data in a lower-dimensional space \nand allows to find similar objects based on their embeddings' proximity. \n\nImplementing such applications in real-world use cases requires storing the\nembeddings efficiently, namely in a vector database like \n[Qdrant](https://qdrant.tech). It offers not only a powerful engine for neural\nsearch, but also allows setting up a whole cluster if your data does not fit\na single machine anymore. It is production-grade and can be launched easily\nwith Docker.\n\nCombining the easiness of txtai with Qdrant's performance enables you to build\nproduction-ready semantic search applications way faster than before.\n\n## Installation\n\nThe library might be installed with pip as following:\n\n```bash\npip install qdrant-txtai\n```\n\n## Usage\n\nRunning the txtai application with Qdrant as vector storage requires launching\na Qdrant instance. That might be done easily with Docker:\n\n```bash\ndocker run -p 6333:6333 -p:6334:6334 qdrant/qdrant:latest\n```\n\nRunning the txtai application might be done either programmatically or by \nproviding configuration in a YAML file.\n\n### Programmatically\n\n```python\nfrom txtai.embeddings import Embeddings\n\nembeddings = Embeddings({\n    \"path\": \"sentence-transformers/all-MiniLM-L6-v2\",\n    \"backend\": \"qdrant_txtai.ann.qdrant.Qdrant\",\n})\nembeddings.index([(0, \"Correct\", None), (1, \"Not what we hoped\", None)])\nresult = embeddings.search(\"positive\", 1)\nprint(result)\n```\n\n### Via YAML configuration\n\n```yaml\n# app.yml\nembeddings:\n  path: sentence-transformers/all-MiniLM-L6-v2\n  backend: qdrant_txtai.ann.qdrant.Qdrant\n```\n\n```bash\nCONFIG=app.yml uvicorn \"txtai.api:app\"\ncurl -X GET \"http://localhost:8000/search?query=positive\"\n```\n\n## Configuration properties\n\n*qdrant-txtai* allows you to configure both the connection details and some \ninternal properties of the vector collection, which may impact both speed and\naccuracy. Please refer to [Qdrant docs](https://qdrant.github.io/qdrant/redoc/index.html#tag/collections/operation/create_collection)\nif you are interested in the meaning of each property.\n\nThe example below presents all the available options, if we connect to Qdrant server:\n\n```yaml\nembeddings:\n  path: sentence-transformers/all-MiniLM-L6-v2\n  backend: qdrant_txtai.ann.qdrant.Qdrant\n  metric: l2 # allowed values: l1 / l2 / cosine / ip\n  qdrant:\n    url: qdrant.host\n    port: 6333\n    grpc_port: 6334\n    prefer_grpc: true\n    collection: CustomCollectionName\n    https: true # for Qdrant Cloud\n    api_key: XYZ # for Qdrant Cloud\n    search_params:\n      hnsw_ef: 100\n```\n\n### Local in-memory/disk-persisted mode\n\nQdrant Python client, from version 1.1.1, supports local in-memory/disk-persisted mode. \nThat's a good choice for any test scenarios and quick experiments in which you do not \nplan to store lots of vectors. In such a case, spinning a Docker container might be even\nnot required.\n\n#### In-memory storage\n\nIn case you want to have transient storage, for example, in the case of automated tests \nlaunched during your CI/CD pipeline, using Qdrant Local mode with in-memory storage \nmight be a preferred option.\n\n```yaml\nembeddings:\n  path: sentence-transformers/all-MiniLM-L6-v2\n  backend: qdrant_txtai.ann.qdrant.Qdrant\n  metric: l2 # allowed values: l1 / l2 / cosine / ip\n  qdrant:\n    location: ':memory:'\n    prefer_grpc: true\n```\n\n#### On disk storage\n\nHowever, if you prefer to keep the vectors between different runs of your application, \nit might be better to use disk storage and pass the path that should be used to \npersist the data.\n\n```yaml\nembeddings:\n  path: sentence-transformers/all-MiniLM-L6-v2\n  backend: qdrant_txtai.ann.qdrant.Qdrant\n  metric: l2 # allowed values: l1 / l2 / cosine / ip\n  qdrant:\n    path: '/home/qdrant/storage_local'\n    prefer_grpc: true\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqdrant%2Fqdrant-txtai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqdrant%2Fqdrant-txtai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqdrant%2Fqdrant-txtai/lists"}