cocoindex 0.1.33__tar.gz → 0.1.35__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. {cocoindex-0.1.33 → cocoindex-0.1.35}/Cargo.lock +1 -1
  2. {cocoindex-0.1.33 → cocoindex-0.1.35}/Cargo.toml +1 -1
  3. {cocoindex-0.1.33 → cocoindex-0.1.35}/PKG-INFO +58 -25
  4. {cocoindex-0.1.33 → cocoindex-0.1.35}/README.md +57 -24
  5. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/docs/core/flow_methods.mdx +3 -3
  6. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/gdrive_text_embedding/main.py +3 -3
  7. cocoindex-0.1.35/examples/image_search_example/.env +1 -0
  8. cocoindex-0.1.35/examples/image_search_example/README.md +61 -0
  9. cocoindex-0.1.35/examples/image_search_example/frontend/.gitignore +136 -0
  10. cocoindex-0.1.35/examples/image_search_example/frontend/index.html +12 -0
  11. cocoindex-0.1.35/examples/image_search_example/frontend/package-lock.json +1265 -0
  12. cocoindex-0.1.35/examples/image_search_example/frontend/package.json +18 -0
  13. cocoindex-0.1.35/examples/image_search_example/frontend/src/App.jsx +53 -0
  14. cocoindex-0.1.35/examples/image_search_example/frontend/src/main.jsx +10 -0
  15. cocoindex-0.1.35/examples/image_search_example/frontend/src/style.css +83 -0
  16. cocoindex-0.1.35/examples/image_search_example/frontend/vite.config.js +10 -0
  17. cocoindex-0.1.35/examples/image_search_example/img/cat1.jpeg +0 -0
  18. cocoindex-0.1.35/examples/image_search_example/img/dog1.jpeg +0 -0
  19. cocoindex-0.1.35/examples/image_search_example/img/elephant1.jpg +0 -0
  20. cocoindex-0.1.35/examples/image_search_example/img/giraffe.jpg +0 -0
  21. cocoindex-0.1.35/examples/image_search_example/main.py +125 -0
  22. cocoindex-0.1.35/examples/image_search_example/requirements.txt +5 -0
  23. {cocoindex-0.1.33 → cocoindex-0.1.35}/python/cocoindex/__init__.py +1 -1
  24. {cocoindex-0.1.33 → cocoindex-0.1.35}/python/cocoindex/cli.py +22 -24
  25. {cocoindex-0.1.33 → cocoindex-0.1.35}/python/cocoindex/flow.py +94 -87
  26. {cocoindex-0.1.33 → cocoindex-0.1.35}/python/cocoindex/setup.py +4 -4
  27. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/base/spec.rs +232 -11
  28. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/builder/analyzed_flow.rs +3 -3
  29. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/execution/db_tracking_setup.rs +13 -8
  30. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/llm/anthropic.rs +16 -10
  31. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/llm/gemini.rs +12 -6
  32. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/ops/factory_bases.rs +29 -5
  33. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/ops/interface.rs +6 -1
  34. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/ops/storages/neo4j.rs +127 -81
  35. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/ops/storages/postgres.rs +22 -6
  36. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/ops/storages/qdrant.rs +9 -1
  37. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/py/mod.rs +98 -8
  38. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/setup/components.rs +30 -38
  39. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/setup/db_metadata.rs +10 -5
  40. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/setup/driver.rs +99 -48
  41. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/setup/states.rs +35 -42
  42. {cocoindex-0.1.33 → cocoindex-0.1.35}/.cargo/config.toml +0 -0
  43. {cocoindex-0.1.33 → cocoindex-0.1.35}/.env.lib_debug +0 -0
  44. {cocoindex-0.1.33 → cocoindex-0.1.35}/.github/ISSUE_TEMPLATE//360/237/220/233-bug-report.md +0 -0
  45. {cocoindex-0.1.33 → cocoindex-0.1.35}/.github/ISSUE_TEMPLATE//360/237/222/241-feature-request.md +0 -0
  46. {cocoindex-0.1.33 → cocoindex-0.1.35}/.github/scripts/update_version.sh +0 -0
  47. {cocoindex-0.1.33 → cocoindex-0.1.35}/.github/workflows/CI.yml +0 -0
  48. {cocoindex-0.1.33 → cocoindex-0.1.35}/.github/workflows/_test.yml +0 -0
  49. {cocoindex-0.1.33 → cocoindex-0.1.35}/.github/workflows/docs.yml +0 -0
  50. {cocoindex-0.1.33 → cocoindex-0.1.35}/.github/workflows/release.yml +0 -0
  51. {cocoindex-0.1.33 → cocoindex-0.1.35}/.gitignore +0 -0
  52. {cocoindex-0.1.33 → cocoindex-0.1.35}/.vscode/settings.json +0 -0
  53. {cocoindex-0.1.33 → cocoindex-0.1.35}/CODE_OF_CONDUCT.md +0 -0
  54. {cocoindex-0.1.33 → cocoindex-0.1.35}/CONTRIBUTING.md +0 -0
  55. {cocoindex-0.1.33 → cocoindex-0.1.35}/LICENSE +0 -0
  56. {cocoindex-0.1.33 → cocoindex-0.1.35}/dev/neo4j.yaml +0 -0
  57. {cocoindex-0.1.33 → cocoindex-0.1.35}/dev/postgres.yaml +0 -0
  58. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/.gitignore +0 -0
  59. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/README.md +0 -0
  60. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/docs/about/community.md +0 -0
  61. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/docs/about/contributing.md +0 -0
  62. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/docs/ai/llm.mdx +0 -0
  63. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/docs/core/basics.md +0 -0
  64. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/docs/core/cli.mdx +0 -0
  65. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/docs/core/custom_function.mdx +0 -0
  66. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/docs/core/data_example.svg +0 -0
  67. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/docs/core/data_types.mdx +0 -0
  68. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/docs/core/flow_def.mdx +0 -0
  69. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/docs/core/flow_example.svg +0 -0
  70. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/docs/core/initialization.mdx +0 -0
  71. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/docs/getting_started/installation.md +0 -0
  72. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/docs/getting_started/markdown_files.zip +0 -0
  73. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/docs/getting_started/overview.md +0 -0
  74. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/docs/getting_started/quickstart.md +0 -0
  75. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/docs/ops/functions.md +0 -0
  76. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/docs/ops/sources.md +0 -0
  77. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/docs/ops/storages.md +0 -0
  78. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/docusaurus.config.ts +0 -0
  79. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/package.json +0 -0
  80. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/sidebars.ts +0 -0
  81. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/src/components/HomepageFeatures/index.tsx +0 -0
  82. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/src/components/HomepageFeatures/styles.module.css +0 -0
  83. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/src/css/custom.css +0 -0
  84. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/src/theme/Root.js +0 -0
  85. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/static/.nojekyll +0 -0
  86. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/static/img/docusaurus.png +0 -0
  87. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/static/img/favicon.ico +0 -0
  88. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/static/img/icon.svg +0 -0
  89. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/static/robots.txt +0 -0
  90. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/tsconfig.json +0 -0
  91. {cocoindex-0.1.33 → cocoindex-0.1.35}/docs/yarn.lock +0 -0
  92. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/code_embedding/.env +0 -0
  93. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/code_embedding/README.md +0 -0
  94. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/code_embedding/main.py +0 -0
  95. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/code_embedding/pyproject.toml +0 -0
  96. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/docs_to_knowledge_graph/.env +0 -0
  97. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/docs_to_knowledge_graph/README.md +0 -0
  98. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/docs_to_knowledge_graph/main.py +0 -0
  99. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/docs_to_knowledge_graph/markdown_files/1706.03762v7.md +0 -0
  100. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/docs_to_knowledge_graph/markdown_files/1810.04805v2.md +0 -0
  101. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/docs_to_knowledge_graph/markdown_files/rfc8259.md +0 -0
  102. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/docs_to_knowledge_graph/pyproject.toml +0 -0
  103. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/fastapi_server_docker/.dockerignore +0 -0
  104. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/fastapi_server_docker/.env +0 -0
  105. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/fastapi_server_docker/README.md +0 -0
  106. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/fastapi_server_docker/compose.yaml +0 -0
  107. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/fastapi_server_docker/dockerfile +0 -0
  108. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/fastapi_server_docker/main.py +0 -0
  109. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/fastapi_server_docker/requirements.txt +0 -0
  110. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/fastapi_server_docker/sample_code/main.py +0 -0
  111. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/fastapi_server_docker/src/cocoindex_funs.py +0 -0
  112. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/gdrive_text_embedding/.env.example +0 -0
  113. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/gdrive_text_embedding/.gitignore +0 -0
  114. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/gdrive_text_embedding/README.md +0 -0
  115. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/gdrive_text_embedding/data/1706.03762v7.docx +0 -0
  116. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/gdrive_text_embedding/data/1810.04805v2.docx +0 -0
  117. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/gdrive_text_embedding/pyproject.toml +0 -0
  118. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/manuals_llm_extraction/.env +0 -0
  119. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/manuals_llm_extraction/README.md +0 -0
  120. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/manuals_llm_extraction/main.py +0 -0
  121. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/manuals_llm_extraction/manuals/array.pdf +0 -0
  122. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/manuals_llm_extraction/manuals/base64.pdf +0 -0
  123. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/manuals_llm_extraction/manuals/copy.pdf +0 -0
  124. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/manuals_llm_extraction/manuals/glob.pdf +0 -0
  125. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/manuals_llm_extraction/pyproject.toml +0 -0
  126. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/pdf_embedding/.env +0 -0
  127. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/pdf_embedding/README.md +0 -0
  128. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/pdf_embedding/main.py +0 -0
  129. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/pdf_embedding/pdf_files/1706.03762v7.pdf +0 -0
  130. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/pdf_embedding/pdf_files/1810.04805v2.pdf +0 -0
  131. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/pdf_embedding/pdf_files/rfc8259.pdf +0 -0
  132. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/pdf_embedding/pyproject.toml +0 -0
  133. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/product_taxonomy_knowledge_graph/.env +0 -0
  134. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/product_taxonomy_knowledge_graph/README.md +0 -0
  135. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/product_taxonomy_knowledge_graph/img/cocoinsight.png +0 -0
  136. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/product_taxonomy_knowledge_graph/img/neo4j.png +0 -0
  137. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/product_taxonomy_knowledge_graph/main.py +0 -0
  138. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/product_taxonomy_knowledge_graph/products/p1.json +0 -0
  139. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/product_taxonomy_knowledge_graph/products/p2.json +0 -0
  140. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/product_taxonomy_knowledge_graph/products/p3.json +0 -0
  141. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/product_taxonomy_knowledge_graph/products/p4.json +0 -0
  142. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/product_taxonomy_knowledge_graph/products/p5.json +0 -0
  143. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/product_taxonomy_knowledge_graph/products/p6.json +0 -0
  144. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/product_taxonomy_knowledge_graph/products/p7.json +0 -0
  145. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/product_taxonomy_knowledge_graph/products/p8.json +0 -0
  146. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/product_taxonomy_knowledge_graph/products/p9.json +0 -0
  147. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/product_taxonomy_knowledge_graph/pyproject.toml +0 -0
  148. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/text_embedding/.env +0 -0
  149. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/text_embedding/README.md +0 -0
  150. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/text_embedding/Text_Embedding.ipynb +0 -0
  151. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/text_embedding/main.py +0 -0
  152. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/text_embedding/markdown_files/1706.03762v7.md +0 -0
  153. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/text_embedding/markdown_files/1810.04805v2.md +0 -0
  154. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/text_embedding/markdown_files/rfc8259.md +0 -0
  155. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/text_embedding/pyproject.toml +0 -0
  156. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/text_embedding_qdrant/.env +0 -0
  157. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/text_embedding_qdrant/README.md +0 -0
  158. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/text_embedding_qdrant/main.py +0 -0
  159. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/text_embedding_qdrant/markdown_files/rfc8259.md +0 -0
  160. {cocoindex-0.1.33 → cocoindex-0.1.35}/examples/text_embedding_qdrant/pyproject.toml +0 -0
  161. {cocoindex-0.1.33 → cocoindex-0.1.35}/pyproject.toml +0 -0
  162. {cocoindex-0.1.33 → cocoindex-0.1.35}/python/cocoindex/auth_registry.py +0 -0
  163. {cocoindex-0.1.33 → cocoindex-0.1.35}/python/cocoindex/convert.py +0 -0
  164. {cocoindex-0.1.33 → cocoindex-0.1.35}/python/cocoindex/functions.py +0 -0
  165. {cocoindex-0.1.33 → cocoindex-0.1.35}/python/cocoindex/index.py +0 -0
  166. {cocoindex-0.1.33 → cocoindex-0.1.35}/python/cocoindex/lib.py +0 -0
  167. {cocoindex-0.1.33 → cocoindex-0.1.35}/python/cocoindex/llm.py +0 -0
  168. {cocoindex-0.1.33 → cocoindex-0.1.35}/python/cocoindex/op.py +0 -0
  169. {cocoindex-0.1.33 → cocoindex-0.1.35}/python/cocoindex/py.typed +0 -0
  170. {cocoindex-0.1.33 → cocoindex-0.1.35}/python/cocoindex/query.py +0 -0
  171. {cocoindex-0.1.33 → cocoindex-0.1.35}/python/cocoindex/runtime.py +0 -0
  172. {cocoindex-0.1.33 → cocoindex-0.1.35}/python/cocoindex/setting.py +0 -0
  173. {cocoindex-0.1.33 → cocoindex-0.1.35}/python/cocoindex/sources.py +0 -0
  174. {cocoindex-0.1.33 → cocoindex-0.1.35}/python/cocoindex/storages.py +0 -0
  175. {cocoindex-0.1.33 → cocoindex-0.1.35}/python/cocoindex/tests/__init__.py +0 -0
  176. {cocoindex-0.1.33 → cocoindex-0.1.35}/python/cocoindex/tests/test_convert.py +0 -0
  177. {cocoindex-0.1.33 → cocoindex-0.1.35}/python/cocoindex/typing.py +0 -0
  178. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/base/field_attrs.rs +0 -0
  179. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/base/json_schema.rs +0 -0
  180. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/base/mod.rs +0 -0
  181. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/base/schema.rs +0 -0
  182. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/base/value.rs +0 -0
  183. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/builder/analyzer.rs +0 -0
  184. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/builder/flow_builder.rs +0 -0
  185. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/builder/mod.rs +0 -0
  186. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/builder/plan.rs +0 -0
  187. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/execution/db_tracking.rs +0 -0
  188. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/execution/dumper.rs +0 -0
  189. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/execution/evaluator.rs +0 -0
  190. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/execution/live_updater.rs +0 -0
  191. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/execution/memoization.rs +0 -0
  192. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/execution/mod.rs +0 -0
  193. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/execution/query.rs +0 -0
  194. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/execution/row_indexer.rs +0 -0
  195. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/execution/source_indexer.rs +0 -0
  196. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/execution/stats.rs +0 -0
  197. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/lib.rs +0 -0
  198. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/lib_context.rs +0 -0
  199. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/llm/mod.rs +2 -2
  200. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/llm/ollama.rs +0 -0
  201. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/llm/openai.rs +0 -0
  202. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/ops/functions/extract_by_llm.rs +0 -0
  203. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/ops/functions/mod.rs +0 -0
  204. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/ops/functions/parse_json.rs +0 -0
  205. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/ops/functions/split_recursively.rs +0 -0
  206. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/ops/mod.rs +0 -0
  207. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/ops/py_factory.rs +0 -0
  208. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/ops/registration.rs +0 -0
  209. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/ops/registry.rs +0 -0
  210. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/ops/sdk.rs +0 -0
  211. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/ops/sources/google_drive.rs +0 -0
  212. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/ops/sources/local_file.rs +0 -0
  213. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/ops/sources/mod.rs +0 -0
  214. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/ops/storages/mod.rs +0 -0
  215. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/ops/storages/spec.rs +0 -0
  216. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/prelude.rs +0 -0
  217. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/py/convert.rs +0 -0
  218. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/server.rs +0 -0
  219. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/service/error.rs +0 -0
  220. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/service/flows.rs +0 -0
  221. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/service/mod.rs +0 -0
  222. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/service/search.rs +0 -0
  223. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/settings.rs +0 -0
  224. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/setup/auth_registry.rs +0 -0
  225. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/setup/mod.rs +0 -0
  226. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/utils/db.rs +0 -0
  227. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/utils/fingerprint.rs +0 -0
  228. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/utils/immutable.rs +0 -0
  229. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/utils/mod.rs +0 -0
  230. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/utils/retriable.rs +0 -0
  231. {cocoindex-0.1.33 → cocoindex-0.1.35}/src/utils/yaml_ser.rs +0 -0
@@ -533,7 +533,7 @@ dependencies = [
533
533
 
534
534
  [[package]]
535
535
  name = "cocoindex"
536
- version = "0.1.33"
536
+ version = "0.1.35"
537
537
  dependencies = [
538
538
  "anyhow",
539
539
  "async-openai",
@@ -2,7 +2,7 @@
2
2
  name = "cocoindex"
3
3
  # Version used for local development is always higher than others to take precedence.
4
4
  # Will be overridden for specific release versions.
5
- version = "0.1.33"
5
+ version = "0.1.35"
6
6
  edition = "2021"
7
7
 
8
8
  [profile.release]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cocoindex
3
- Version: 0.1.33
3
+ Version: 0.1.35
4
4
  Requires-Dist: sentence-transformers>=3.3.1
5
5
  Requires-Dist: click>=8.1.8
6
6
  Requires-Dist: rich>=14.0.0
@@ -28,44 +28,74 @@ Project-URL: Homepage, https://cocoindex.io/
28
28
  [![PyPI version](https://img.shields.io/pypi/v/cocoindex?color=5B5BD6)](https://pypi.org/project/cocoindex/)
29
29
  [![PyPI - Downloads](https://img.shields.io/pypi/dm/cocoindex)](https://pypistats.org/packages/cocoindex)
30
30
 
31
- <!-- [![Python](https://img.shields.io/badge/python-3.11%20to%203.13-5B5BD6?logo=python&logoColor=white)](https://www.python.org/) -->
32
31
  [![CI](https://github.com/cocoindex-io/cocoindex/actions/workflows/CI.yml/badge.svg?event=push&color=5B5BD6)](https://github.com/cocoindex-io/cocoindex/actions/workflows/CI.yml)
33
32
  [![release](https://github.com/cocoindex-io/cocoindex/actions/workflows/release.yml/badge.svg?event=push&color=5B5BD6)](https://github.com/cocoindex-io/cocoindex/actions/workflows/release.yml)
34
33
  [![Discord](https://img.shields.io/discord/1314801574169673738?logo=discord&color=5B5BD6&logoColor=white)](https://discord.com/invite/zpA9S2DR7s)
35
- <!--[![LinkedIn](https://img.shields.io/badge/LinkedIn-CocoIndex-5B5BD6?logo=linkedin&logoColor=white)](https://www.linkedin.com/company/cocoindex) -->
36
- <!--[![X (Twitter)](https://img.shields.io/twitter/follow/cocoindex_io)](https://twitter.com/intent/follow?screen_name=cocoindex_io) -->
37
-
38
34
  </div>
39
35
 
40
- CocoIndex is the world's first open-source engine that supports both custom transformation logic and incremental updates specialized for data indexing.
36
+ **CocoIndex** is an ultra performant data transformation framework, with its core engine written in Rust. The problem it tries to solve is to make it easy to prepare fresh data for AI - either creating embedding, building knowledge graphs, or performing other data transformations - and take real-time data pipelines beyond traditional SQL.
37
+
38
+ <p align="center">
39
+ <img src="https://cocoindex.io/images/cocoindex-features.png" alt="CocoIndex Features" width="500">
40
+ </p>
41
+
42
+ The philosophy is to have the framework handle the source updates, and having developers only worry about defining a series of data transformation, inspired by spreadsheet.
43
+
44
+ ## Dataflow programming
45
+ Unlike a workflow orchestration framework where data is usually opaque, in CocoIndex, data and data operations are first class citizens. CocoIndex follows the idea of [Dataflow](https://en.wikipedia.org/wiki/Dataflow_programming) programming model. Each transformation creates a new field solely based on input fields, without hidden states and value mutation. All data before/after each transformation is observable, with lineage out of the box.
46
+
47
+ **Particularly**, users don't explicitly mutate data by creating, updating and deleting. Rather, they define something like - for a set of source data, this is the transformation or formula. The framework takes care of the data operations such as when to create, update, or delete.
48
+
49
+ ```python
50
+ # import
51
+ data['content'] = flow_builder.add_source(...)
52
+
53
+ # transform
54
+ data['out'] = data['content']
55
+ .transform(...)
56
+ .transform(...)
57
+
58
+ # collect data
59
+ collector.collect(...)
60
+
61
+ # export to db, vector db, graph db ...
62
+ collector.export(...)
63
+ ```
64
+
65
+ ## Data Freshness
66
+ As a data framework, CocoIndex takes it to the next level on data freshness. **Incremental processing** is one of the core values provided by CocoIndex.
67
+
41
68
  <p align="center">
42
- <img src="https://cocoindex.io/images/venn.svg" alt="CocoIndex">
69
+ <img src="https://github.com/user-attachments/assets/f4eb29b3-84ee-4fa0-a1e2-80eedeeabde6" alt="Incremental Processing" width="700">
43
70
  </p>
44
- With CocoIndex, users declare the transformation, CocoIndex creates & maintains an index, and keeps the derived index up to date based on source update, with minimal computation and changes.
71
+
72
+ The frameworks takes care of
73
+ - Change data capture.
74
+ - Figure out what exactly needs to be updated, and only updating that without having to recompute everything.
75
+
76
+ This makes it fast to reflect any source updates to the target store. If you have concerns with surfacing stale data to AI agents and are spending lots of efforts working on infra piece to optimize the latency, the framework actually handles it for you.
45
77
 
46
78
 
47
79
  ## Quick Start:
48
- If you're new to CocoIndex 🤗, we recommend checking out the 📖 [Documentation](https://cocoindex.io/docs) and ⚡ [Quick Start Guide](https://cocoindex.io/docs/getting_started/quickstart). We also have a ▶️ [quick start video tutorial](https://youtu.be/gv5R8nOXsWU?si=9ioeKYkMEnYevTXT) for you to jump start.
80
+ If you're new to CocoIndex, we recommend checking out
81
+ - 📖 [Documentation](https://cocoindex.io/docs)
82
+ - ⚡ [Quick Start Guide](https://cocoindex.io/docs/getting_started/quickstart)
83
+ - 🎬 [Quick Start Video Tutorial](https://youtu.be/gv5R8nOXsWU?si=9ioeKYkMEnYevTXT)
49
84
 
50
85
  ### Setup
86
+
51
87
  1. Install CocoIndex Python library
52
88
 
53
89
  ```bash
54
90
  pip install -U cocoindex
55
91
  ```
56
92
 
57
- 2. Setup Postgres with pgvector extension; or bring up a Postgres database using docker compose:
93
+ 2. [Install Postgres](https://cocoindex.io/docs/getting_started/installation#-install-postgres) if you don't have one. CocoIndex uses it for incremental processing.
58
94
 
59
- - Make sure Docker Compose is installed: [docs](https://docs.docker.com/compose/install/)
60
- - Start a Postgres SQL database for cocoindex using our docker compose config:
61
95
 
62
- ```bash
63
- docker compose -f <(curl -L https://raw.githubusercontent.com/cocoindex-io/cocoindex/refs/heads/main/dev/postgres.yaml) up -d
64
- ```
96
+ ### Define data flow
65
97
 
66
- ### Start your first indexing flow!
67
- Follow [Quick Start Guide](https://cocoindex.io/docs/getting_started/quickstart) to define your first indexing flow.
68
- A common indexing flow looks like:
98
+ Follow [Quick Start Guide](https://cocoindex.io/docs/getting_started/quickstart) to define your first indexing flow. An example flow looks like:
69
99
 
70
100
  ```python
71
101
  @cocoindex.flow_def(name="TextEmbedding")
@@ -106,10 +136,11 @@ def text_embedding_flow(flow_builder: cocoindex.FlowBuilder, data_scope: cocoind
106
136
  ```
107
137
 
108
138
  It defines an index flow like this:
109
- ![Flow diagram](docs/docs/core/flow_example.svg)
110
139
 
111
- ### Play with existing example and demo
112
- Go to the [examples directory](examples) to try out with any of the examples, following instructions under specific example directory.
140
+ <img width="363" alt="Data Flow" src="https://github.com/user-attachments/assets/2ea7be6d-3d94-42b1-b2bd-22515577e463" />
141
+
142
+
143
+ ## 🚀 Examples and demo
113
144
 
114
145
  | Example | Description |
115
146
  |---------|-------------|
@@ -121,8 +152,10 @@ Go to the [examples directory](examples) to try out with any of the examples, fo
121
152
  | [Docs to Knowledge Graph](examples/docs_to_knowledge_graph) | Extract relationships from Markdown documents and build a knowledge graph |
122
153
  | [Embeddings to Qdrant](examples/text_embedding_qdrant) | Index documents in a Qdrant collection for semantic search |
123
154
  | [FastAPI Server with Docker](examples/fastapi_server_docker) | Run the semantic search server in a Dockerized FastAPI setup |
155
+ | [Product_Taxonomy_Knowledge_Graph](examples/product_taxonomy_knowledge_graph) | Build knowledge graph for product recommendations |
156
+ | [Image Search with Vision API](examples/image_search_example) | Generates detailed captions for images using a vision model, embeds them, enables semantic search via FastAPI and served on a React frontend.|
124
157
 
125
- More coming and stay tuned! If there's any specific examples you would like to see, please let us know in our [Discord community](https://discord.com/invite/zpA9S2DR7s) 🌱.
158
+ More coming and stay tuned 👀!
126
159
 
127
160
  ## 📖 Documentation
128
161
  For detailed documentation, visit [CocoIndex Documentation](https://cocoindex.io/docs), including a [Quickstart guide](https://cocoindex.io/docs/getting_started/quickstart).
@@ -136,13 +169,13 @@ Welcome with a huge coconut hug 🥥⋆。˚🤗. We are super excited for commu
136
169
  Join our community here:
137
170
 
138
171
  - 🌟 [Star us on GitHub](https://github.com/cocoindex-io/cocoindex)
139
- - 💬 [Start a GitHub Discussion](https://github.com/cocoindex-io/cocoindex/discussions)
140
172
  - 👋 [Join our Discord community](https://discord.com/invite/zpA9S2DR7s)
141
- - 𝕏 [Follow us on X](https://x.com/cocoindex_io)
142
- - 🐚 [Follow us on LinkedIn](https://www.linkedin.com/company/cocoindex/about/)
143
173
  - ▶️ [Subscribe to our YouTube channel](https://www.youtube.com/@cocoindex-io)
144
174
  - 📜 [Read our blog posts](https://cocoindex.io/blogs/)
145
175
 
176
+ ## Support us:
177
+ We are constantly improving, and more features and examples are coming soon. If you love this project, please drop us a star ⭐ at GitHub repo [![GitHub](https://img.shields.io/github/stars/cocoindex-io/cocoindex?color=5B5BD6)](https://github.com/cocoindex-io/cocoindex) to stay tuned and help us grow.
178
+
146
179
  ## License
147
180
  CocoIndex is Apache 2.0 licensed.
148
181
 
@@ -12,44 +12,74 @@
12
12
  [![PyPI version](https://img.shields.io/pypi/v/cocoindex?color=5B5BD6)](https://pypi.org/project/cocoindex/)
13
13
  [![PyPI - Downloads](https://img.shields.io/pypi/dm/cocoindex)](https://pypistats.org/packages/cocoindex)
14
14
 
15
- <!-- [![Python](https://img.shields.io/badge/python-3.11%20to%203.13-5B5BD6?logo=python&logoColor=white)](https://www.python.org/) -->
16
15
  [![CI](https://github.com/cocoindex-io/cocoindex/actions/workflows/CI.yml/badge.svg?event=push&color=5B5BD6)](https://github.com/cocoindex-io/cocoindex/actions/workflows/CI.yml)
17
16
  [![release](https://github.com/cocoindex-io/cocoindex/actions/workflows/release.yml/badge.svg?event=push&color=5B5BD6)](https://github.com/cocoindex-io/cocoindex/actions/workflows/release.yml)
18
17
  [![Discord](https://img.shields.io/discord/1314801574169673738?logo=discord&color=5B5BD6&logoColor=white)](https://discord.com/invite/zpA9S2DR7s)
19
- <!--[![LinkedIn](https://img.shields.io/badge/LinkedIn-CocoIndex-5B5BD6?logo=linkedin&logoColor=white)](https://www.linkedin.com/company/cocoindex) -->
20
- <!--[![X (Twitter)](https://img.shields.io/twitter/follow/cocoindex_io)](https://twitter.com/intent/follow?screen_name=cocoindex_io) -->
21
-
22
18
  </div>
23
19
 
24
- CocoIndex is the world's first open-source engine that supports both custom transformation logic and incremental updates specialized for data indexing.
20
+ **CocoIndex** is an ultra performant data transformation framework, with its core engine written in Rust. The problem it tries to solve is to make it easy to prepare fresh data for AI - either creating embedding, building knowledge graphs, or performing other data transformations - and take real-time data pipelines beyond traditional SQL.
21
+
22
+ <p align="center">
23
+ <img src="https://cocoindex.io/images/cocoindex-features.png" alt="CocoIndex Features" width="500">
24
+ </p>
25
+
26
+ The philosophy is to have the framework handle the source updates, and having developers only worry about defining a series of data transformation, inspired by spreadsheet.
27
+
28
+ ## Dataflow programming
29
+ Unlike a workflow orchestration framework where data is usually opaque, in CocoIndex, data and data operations are first class citizens. CocoIndex follows the idea of [Dataflow](https://en.wikipedia.org/wiki/Dataflow_programming) programming model. Each transformation creates a new field solely based on input fields, without hidden states and value mutation. All data before/after each transformation is observable, with lineage out of the box.
30
+
31
+ **Particularly**, users don't explicitly mutate data by creating, updating and deleting. Rather, they define something like - for a set of source data, this is the transformation or formula. The framework takes care of the data operations such as when to create, update, or delete.
32
+
33
+ ```python
34
+ # import
35
+ data['content'] = flow_builder.add_source(...)
36
+
37
+ # transform
38
+ data['out'] = data['content']
39
+ .transform(...)
40
+ .transform(...)
41
+
42
+ # collect data
43
+ collector.collect(...)
44
+
45
+ # export to db, vector db, graph db ...
46
+ collector.export(...)
47
+ ```
48
+
49
+ ## Data Freshness
50
+ As a data framework, CocoIndex takes it to the next level on data freshness. **Incremental processing** is one of the core values provided by CocoIndex.
51
+
25
52
  <p align="center">
26
- <img src="https://cocoindex.io/images/venn.svg" alt="CocoIndex">
53
+ <img src="https://github.com/user-attachments/assets/f4eb29b3-84ee-4fa0-a1e2-80eedeeabde6" alt="Incremental Processing" width="700">
27
54
  </p>
28
- With CocoIndex, users declare the transformation, CocoIndex creates & maintains an index, and keeps the derived index up to date based on source update, with minimal computation and changes.
55
+
56
+ The frameworks takes care of
57
+ - Change data capture.
58
+ - Figure out what exactly needs to be updated, and only updating that without having to recompute everything.
59
+
60
+ This makes it fast to reflect any source updates to the target store. If you have concerns with surfacing stale data to AI agents and are spending lots of efforts working on infra piece to optimize the latency, the framework actually handles it for you.
29
61
 
30
62
 
31
63
  ## Quick Start:
32
- If you're new to CocoIndex 🤗, we recommend checking out the 📖 [Documentation](https://cocoindex.io/docs) and ⚡ [Quick Start Guide](https://cocoindex.io/docs/getting_started/quickstart). We also have a ▶️ [quick start video tutorial](https://youtu.be/gv5R8nOXsWU?si=9ioeKYkMEnYevTXT) for you to jump start.
64
+ If you're new to CocoIndex, we recommend checking out
65
+ - 📖 [Documentation](https://cocoindex.io/docs)
66
+ - ⚡ [Quick Start Guide](https://cocoindex.io/docs/getting_started/quickstart)
67
+ - 🎬 [Quick Start Video Tutorial](https://youtu.be/gv5R8nOXsWU?si=9ioeKYkMEnYevTXT)
33
68
 
34
69
  ### Setup
70
+
35
71
  1. Install CocoIndex Python library
36
72
 
37
73
  ```bash
38
74
  pip install -U cocoindex
39
75
  ```
40
76
 
41
- 2. Setup Postgres with pgvector extension; or bring up a Postgres database using docker compose:
77
+ 2. [Install Postgres](https://cocoindex.io/docs/getting_started/installation#-install-postgres) if you don't have one. CocoIndex uses it for incremental processing.
42
78
 
43
- - Make sure Docker Compose is installed: [docs](https://docs.docker.com/compose/install/)
44
- - Start a Postgres SQL database for cocoindex using our docker compose config:
45
79
 
46
- ```bash
47
- docker compose -f <(curl -L https://raw.githubusercontent.com/cocoindex-io/cocoindex/refs/heads/main/dev/postgres.yaml) up -d
48
- ```
80
+ ### Define data flow
49
81
 
50
- ### Start your first indexing flow!
51
- Follow [Quick Start Guide](https://cocoindex.io/docs/getting_started/quickstart) to define your first indexing flow.
52
- A common indexing flow looks like:
82
+ Follow [Quick Start Guide](https://cocoindex.io/docs/getting_started/quickstart) to define your first indexing flow. An example flow looks like:
53
83
 
54
84
  ```python
55
85
  @cocoindex.flow_def(name="TextEmbedding")
@@ -90,10 +120,11 @@ def text_embedding_flow(flow_builder: cocoindex.FlowBuilder, data_scope: cocoind
90
120
  ```
91
121
 
92
122
  It defines an index flow like this:
93
- ![Flow diagram](docs/docs/core/flow_example.svg)
94
123
 
95
- ### Play with existing example and demo
96
- Go to the [examples directory](examples) to try out with any of the examples, following instructions under specific example directory.
124
+ <img width="363" alt="Data Flow" src="https://github.com/user-attachments/assets/2ea7be6d-3d94-42b1-b2bd-22515577e463" />
125
+
126
+
127
+ ## 🚀 Examples and demo
97
128
 
98
129
  | Example | Description |
99
130
  |---------|-------------|
@@ -105,8 +136,10 @@ Go to the [examples directory](examples) to try out with any of the examples, fo
105
136
  | [Docs to Knowledge Graph](examples/docs_to_knowledge_graph) | Extract relationships from Markdown documents and build a knowledge graph |
106
137
  | [Embeddings to Qdrant](examples/text_embedding_qdrant) | Index documents in a Qdrant collection for semantic search |
107
138
  | [FastAPI Server with Docker](examples/fastapi_server_docker) | Run the semantic search server in a Dockerized FastAPI setup |
139
+ | [Product_Taxonomy_Knowledge_Graph](examples/product_taxonomy_knowledge_graph) | Build knowledge graph for product recommendations |
140
+ | [Image Search with Vision API](examples/image_search_example) | Generates detailed captions for images using a vision model, embeds them, enables semantic search via FastAPI and served on a React frontend.|
108
141
 
109
- More coming and stay tuned! If there's any specific examples you would like to see, please let us know in our [Discord community](https://discord.com/invite/zpA9S2DR7s) 🌱.
142
+ More coming and stay tuned 👀!
110
143
 
111
144
  ## 📖 Documentation
112
145
  For detailed documentation, visit [CocoIndex Documentation](https://cocoindex.io/docs), including a [Quickstart guide](https://cocoindex.io/docs/getting_started/quickstart).
@@ -120,12 +153,12 @@ Welcome with a huge coconut hug 🥥⋆。˚🤗. We are super excited for commu
120
153
  Join our community here:
121
154
 
122
155
  - 🌟 [Star us on GitHub](https://github.com/cocoindex-io/cocoindex)
123
- - 💬 [Start a GitHub Discussion](https://github.com/cocoindex-io/cocoindex/discussions)
124
156
  - 👋 [Join our Discord community](https://discord.com/invite/zpA9S2DR7s)
125
- - 𝕏 [Follow us on X](https://x.com/cocoindex_io)
126
- - 🐚 [Follow us on LinkedIn](https://www.linkedin.com/company/cocoindex/about/)
127
157
  - ▶️ [Subscribe to our YouTube channel](https://www.youtube.com/@cocoindex-io)
128
158
  - 📜 [Read our blog posts](https://cocoindex.io/blogs/)
129
159
 
160
+ ## Support us:
161
+ We are constantly improving, and more features and examples are coming soon. If you love this project, please drop us a star ⭐ at GitHub repo [![GitHub](https://img.shields.io/github/stars/cocoindex-io/cocoindex?color=5B5BD6)](https://github.com/cocoindex-io/cocoindex) to stay tuned and help us grow.
162
+
130
163
  ## License
131
164
  CocoIndex is Apache 2.0 licensed.
@@ -70,7 +70,7 @@ This is to achieve best efficiency.
70
70
 
71
71
  ### One time update
72
72
 
73
- <Tabs>
73
+ <Tabs queryString="code_lang">
74
74
  <TabItem value="shell" label="Shell" default>
75
75
 
76
76
  The `cocoindex update` subcommand creates/updates data in the target storage.
@@ -108,7 +108,7 @@ A data source may enable one or multiple *change capture mechanisms*:
108
108
 
109
109
  Change capture mechanisms enable CocoIndex to continuously capture changes from the source data and update the target data accordingly, under live update mode.
110
110
 
111
- <Tabs>
111
+ <Tabs queryString="code_lang">
112
112
  <TabItem value="shell" label="Shell" default>
113
113
 
114
114
  To perform live update, run the `cocoindex update` subcommand with `-L` option:
@@ -191,7 +191,7 @@ with cocoindex.FlowLiveUpdater(demo_flow) as my_updater:
191
191
 
192
192
  CocoIndex allows you to run the transformations defined by the flow without updating the target storage.
193
193
 
194
- <Tabs>
194
+ <Tabs queryString="code_lang">
195
195
  <TabItem value="shell" label="Shell" default>
196
196
 
197
197
  The `cocoindex evaluate` subcommand runs the transformation and dumps flow outputs.
@@ -53,9 +53,9 @@ query_handler = cocoindex.query.SimpleSemanticsQueryHandler(
53
53
  default_similarity_metric=cocoindex.VectorSimilarityMetric.COSINE_SIMILARITY)
54
54
 
55
55
  @cocoindex.main_fn()
56
- async def _run():
56
+ def _run():
57
57
  # Use a `FlowLiveUpdater` to keep the flow data updated.
58
- async with cocoindex.FlowLiveUpdater(gdrive_text_embedding_flow):
58
+ with cocoindex.FlowLiveUpdater(gdrive_text_embedding_flow):
59
59
  # Run queries in a loop to demonstrate the query capabilities.
60
60
  while True:
61
61
  try:
@@ -74,4 +74,4 @@ async def _run():
74
74
 
75
75
  if __name__ == "__main__":
76
76
  load_dotenv(override=True)
77
- asyncio.run(_run())
77
+ _run()
@@ -0,0 +1 @@
1
+ COCOINDEX_DATABASE_URL="postgresql://cocoindex:cocoindex@127.0.0.1:5432/cocoindex"
@@ -0,0 +1,61 @@
1
+ # Image Search with CocoIndex
2
+
3
+ ![image](https://github.com/user-attachments/assets/3a696344-c9b4-46e8-9413-6229dbb8672a)
4
+
5
+ - QDrant for Vector Storage
6
+ - Ollama Gemma3 (Image to Text)
7
+ - CLIP ViT-L/14 - Embeddings Model
8
+
9
+ ## Make sure Postgres and Qdrant are running
10
+ ```
11
+ docker run -d --name qdrant -p 6334:6334 qdrant/qdrant:latest
12
+ export COCOINDEX_DATABASE_URL="postgres://cocoindex:cocoindex@localhost/cocoindex"
13
+ ```
14
+
15
+ ## Create QDrant Collection
16
+ ```
17
+ curl -X PUT
18
+ 'http://localhost:6333/collections/image_search' \
19
+ --header 'Content-Type: application/json' \
20
+ --data-raw '{
21
+ "vectors": {
22
+ "embedding": {
23
+ "size": 768,
24
+ "distance": "Cosine"
25
+ }
26
+ }
27
+ }'
28
+
29
+ ```
30
+
31
+ ## Run Ollama
32
+ ```
33
+ ollama pull gemma3
34
+ ollama serve
35
+ ```
36
+
37
+ ## Create virtual environment and install dependencies
38
+ ```
39
+ python -m venv .venv
40
+ source .venv/bin/activate
41
+ pip install -r requirements.txt
42
+ ```
43
+
44
+ ### Place your images in the `img` directory.
45
+
46
+
47
+ ## Run Backend
48
+ ```
49
+ python main.py cocoindex setup
50
+ python main.py cocoindex update
51
+ uvicorn main:app --reload --host 0.0.0.0 --port 8000
52
+ ```
53
+
54
+ ## Run Frontend
55
+ ```
56
+ cd frontend
57
+ npm install
58
+ npm run dev
59
+ ```
60
+
61
+ Go to `http://localhost:5174` to search.
@@ -0,0 +1,136 @@
1
+ # Logs
2
+ logs
3
+ *.log
4
+ npm-debug.log*
5
+ yarn-debug.log*
6
+ yarn-error.log*
7
+ lerna-debug.log*
8
+ .pnpm-debug.log*
9
+
10
+ # Diagnostic reports (https://nodejs.org/api/report.html)
11
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12
+
13
+ # Runtime data
14
+ pids
15
+ *.pid
16
+ *.seed
17
+ *.pid.lock
18
+
19
+ # Directory for instrumented libs generated by jscoverage/JSCover
20
+ lib-cov
21
+
22
+ # Coverage directory used by tools like istanbul
23
+ coverage
24
+ *.lcov
25
+
26
+ # nyc test coverage
27
+ .nyc_output
28
+
29
+ # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30
+ .grunt
31
+
32
+ # Bower dependency directory (https://bower.io/)
33
+ bower_components
34
+
35
+ # node-waf configuration
36
+ .lock-wscript
37
+
38
+ # Compiled binary addons (https://nodejs.org/api/addons.html)
39
+ build/Release
40
+
41
+ # Dependency directories
42
+ node_modules/
43
+ jspm_packages/
44
+
45
+ # Snowpack dependency directory (https://snowpack.dev/)
46
+ web_modules/
47
+
48
+ # TypeScript cache
49
+ *.tsbuildinfo
50
+
51
+ # Optional npm cache directory
52
+ .npm
53
+
54
+ # Optional eslint cache
55
+ .eslintcache
56
+
57
+ # Optional stylelint cache
58
+ .stylelintcache
59
+
60
+ # Microbundle cache
61
+ .rpt2_cache/
62
+ .rts2_cache_cjs/
63
+ .rts2_cache_es/
64
+ .rts2_cache_umd/
65
+
66
+ # Optional REPL history
67
+ .node_repl_history
68
+
69
+ # Output of 'npm pack'
70
+ *.tgz
71
+
72
+ # Yarn Integrity file
73
+ .yarn-integrity
74
+
75
+ # dotenv environment variable files
76
+ .env
77
+ .env.development.local
78
+ .env.test.local
79
+ .env.production.local
80
+ .env.local
81
+
82
+ # parcel-bundler cache (https://parceljs.org/)
83
+ .cache
84
+ .parcel-cache
85
+
86
+ # Next.js build output
87
+ .next
88
+ out
89
+
90
+ # Nuxt.js build / generate output
91
+ .nuxt
92
+ dist
93
+
94
+ # Gatsby files
95
+ .cache/
96
+ # Comment in the public line in if your project uses Gatsby and not Next.js
97
+ # https://nextjs.org/blog/next-9-1#public-directory-support
98
+ # public
99
+
100
+ # vuepress build output
101
+ .vuepress/dist
102
+
103
+ # vuepress v2.x temp and cache directory
104
+ .temp
105
+ .cache
106
+
107
+ # vitepress build output
108
+ **/.vitepress/dist
109
+
110
+ # vitepress cache directory
111
+ **/.vitepress/cache
112
+
113
+ # Docusaurus cache and generated files
114
+ .docusaurus
115
+
116
+ # Serverless directories
117
+ .serverless/
118
+
119
+ # FuseBox cache
120
+ .fusebox/
121
+
122
+ # DynamoDB Local files
123
+ .dynamodb/
124
+
125
+ # TernJS port file
126
+ .tern-port
127
+
128
+ # Stores VSCode versions used for testing VSCode extensions
129
+ .vscode-test
130
+
131
+ # yarn v2
132
+ .yarn/cache
133
+ .yarn/unplugged
134
+ .yarn/build-state.yml
135
+ .yarn/install-state.gz
136
+ .pnp.*
@@ -0,0 +1,12 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Image Search</title>
7
+ </head>
8
+ <body>
9
+ <div id="root"></div>
10
+ <script type="module" src="/src/main.jsx"></script>
11
+ </body>
12
+ </html>