cocoindex 0.1.80__tar.gz → 0.1.82__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 (358) hide show
  1. cocoindex-0.1.82/CONTRIBUTING.md +1 -0
  2. {cocoindex-0.1.80 → cocoindex-0.1.82}/Cargo.lock +1 -1
  3. {cocoindex-0.1.80 → cocoindex-0.1.82}/Cargo.toml +1 -1
  4. {cocoindex-0.1.80 → cocoindex-0.1.82}/PKG-INFO +6 -6
  5. {cocoindex-0.1.80 → cocoindex-0.1.82}/README.md +5 -5
  6. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/docs/about/community.md +1 -1
  7. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/docs/ai/llm.mdx +24 -1
  8. cocoindex-0.1.80/docs/docs/about/contributing.md → cocoindex-0.1.82/docs/docs/contributing/guide.md +6 -53
  9. cocoindex-0.1.82/docs/docs/contributing/new_built_in_target.mdx +136 -0
  10. cocoindex-0.1.82/docs/docs/contributing/setup_dev_environment.md +47 -0
  11. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/docs/custom_ops/custom_targets.mdx +107 -4
  12. cocoindex-0.1.82/docs/docs/examples/examples/academic_papers_index.md +340 -0
  13. cocoindex-0.1.82/docs/docs/examples/examples/codebase_index.md +203 -0
  14. cocoindex-0.1.82/docs/docs/examples/examples/custom_targets.md +224 -0
  15. cocoindex-0.1.82/docs/docs/examples/examples/docs_to_knowledge_graph.md +355 -0
  16. cocoindex-0.1.82/docs/docs/examples/examples/image_search.md +214 -0
  17. cocoindex-0.1.82/docs/docs/examples/examples/manual_extraction.md +274 -0
  18. cocoindex-0.1.82/docs/docs/examples/examples/multi_format_index.md +204 -0
  19. cocoindex-0.1.82/docs/docs/examples/examples/patient_form_extraction.md +271 -0
  20. cocoindex-0.1.82/docs/docs/examples/examples/photo_search.md +189 -0
  21. cocoindex-0.1.82/docs/docs/examples/examples/product_recommendation.md +377 -0
  22. cocoindex-0.1.82/docs/docs/examples/examples/simple_vector_index.md +170 -0
  23. cocoindex-0.1.82/docs/docs/examples/index.md +11 -0
  24. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/docusaurus.config.ts +16 -1
  25. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/package.json +8 -7
  26. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/sidebars.ts +25 -2
  27. cocoindex-0.1.82/docs/src/components/GitHubButton/index.tsx +56 -0
  28. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/src/css/custom.css +18 -4
  29. cocoindex-0.1.82/docs/src/theme/DocCard/index.tsx +81 -0
  30. cocoindex-0.1.82/docs/src/theme/DocCard/styles.module.css +60 -0
  31. cocoindex-0.1.82/docs/src/theme/DocCardList/index.tsx +86 -0
  32. cocoindex-0.1.82/docs/src/theme/DocCardList/styles.module.css +158 -0
  33. cocoindex-0.1.82/docs/static/img/examples/academic_papers_index.png +0 -0
  34. cocoindex-0.1.82/docs/static/img/examples/codebase_index.png +0 -0
  35. cocoindex-0.1.82/docs/static/img/examples/custom_targets.png +0 -0
  36. cocoindex-0.1.82/docs/static/img/examples/docs_to_knowledge_graph.png +0 -0
  37. cocoindex-0.1.82/docs/static/img/examples/image_search.png +0 -0
  38. cocoindex-0.1.82/docs/static/img/examples/manual_extraction.png +0 -0
  39. cocoindex-0.1.82/docs/static/img/examples/multi_format_index.png +0 -0
  40. cocoindex-0.1.82/docs/static/img/examples/patient_form_extraction.png +0 -0
  41. cocoindex-0.1.82/docs/static/img/examples/photo_search.png +0 -0
  42. cocoindex-0.1.82/docs/static/img/examples/product_recommendation.png +0 -0
  43. cocoindex-0.1.82/docs/static/img/examples/simple_vector_index.png +0 -0
  44. cocoindex-0.1.82/docs/static/img/icon.svg +28 -0
  45. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/yarn.lock +1450 -1441
  46. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/amazon_s3_embedding/.env.example +4 -0
  47. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/azure_blob_embedding/.env.example +4 -0
  48. cocoindex-0.1.82/examples/code_embedding/.env +6 -0
  49. cocoindex-0.1.82/examples/face_recognition/.env +6 -0
  50. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/fastapi_server_docker/.env +4 -0
  51. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/gdrive_text_embedding/.env.example +4 -0
  52. cocoindex-0.1.82/examples/image_search/.env +5 -0
  53. cocoindex-0.1.82/examples/manuals_llm_extraction/.env +6 -0
  54. cocoindex-0.1.82/examples/multi_format_indexing/.env +6 -0
  55. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/multi_format_indexing/README.md +2 -0
  56. {cocoindex-0.1.80/examples/patient_intake_extraction → cocoindex-0.1.82/examples/paper_metadata}/.env.example +4 -0
  57. cocoindex-0.1.82/examples/pdf_embedding/.env +6 -0
  58. cocoindex-0.1.82/examples/text_embedding/.env +6 -0
  59. cocoindex-0.1.82/examples/text_embedding_qdrant/.env +6 -0
  60. {cocoindex-0.1.80 → cocoindex-0.1.82}/python/cocoindex/cli.py +5 -46
  61. {cocoindex-0.1.80 → cocoindex-0.1.82}/python/cocoindex/convert.py +120 -36
  62. {cocoindex-0.1.80 → cocoindex-0.1.82}/python/cocoindex/flow.py +54 -63
  63. {cocoindex-0.1.80 → cocoindex-0.1.82}/python/cocoindex/functions.py +3 -3
  64. {cocoindex-0.1.80 → cocoindex-0.1.82}/python/cocoindex/op.py +80 -68
  65. cocoindex-0.1.82/python/cocoindex/subprocess_exec.py +241 -0
  66. {cocoindex-0.1.80 → cocoindex-0.1.82}/python/cocoindex/tests/test_convert.py +63 -44
  67. {cocoindex-0.1.80 → cocoindex-0.1.82}/python/cocoindex/tests/test_transform_flow.py +32 -0
  68. cocoindex-0.1.82/python/cocoindex/user_app_loader.py +51 -0
  69. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/builder/exec_ctx.rs +3 -0
  70. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/builder/plan.rs +2 -2
  71. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/execution/db_tracking.rs +50 -12
  72. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/execution/db_tracking_setup.rs +20 -18
  73. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/execution/dumper.rs +1 -0
  74. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/execution/evaluator.rs +25 -18
  75. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/execution/indexing_status.rs +1 -0
  76. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/execution/live_updater.rs +8 -3
  77. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/execution/memoization.rs +2 -1
  78. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/execution/row_indexer.rs +334 -261
  79. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/execution/source_indexer.rs +234 -118
  80. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/lib_context.rs +13 -13
  81. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/factory_bases.rs +39 -35
  82. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/functions/split_recursively.rs +5 -1
  83. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/interface.rs +19 -27
  84. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/py_factory.rs +13 -13
  85. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/sources/amazon_s3.rs +9 -2
  86. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/sources/azure_blob.rs +8 -1
  87. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/sources/google_drive.rs +8 -2
  88. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/sources/local_file.rs +7 -1
  89. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/targets/kuzu.rs +17 -17
  90. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/targets/neo4j.rs +15 -15
  91. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/targets/postgres.rs +11 -11
  92. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/targets/qdrant.rs +14 -14
  93. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/service/error.rs +1 -1
  94. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/service/flows.rs +1 -0
  95. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/setup/components.rs +6 -6
  96. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/setup/db_metadata.rs +3 -3
  97. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/setup/driver.rs +55 -57
  98. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/setup/flow_features.rs +2 -1
  99. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/setup/states.rs +30 -30
  100. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/utils/fingerprint.rs +4 -0
  101. cocoindex-0.1.80/CONTRIBUTING.md +0 -1
  102. cocoindex-0.1.80/docs/src/components/HomepageFeatures/index.tsx +0 -71
  103. cocoindex-0.1.80/docs/src/components/HomepageFeatures/styles.module.css +0 -11
  104. cocoindex-0.1.80/docs/static/img/icon.svg +0 -39
  105. cocoindex-0.1.80/examples/face_recognition/.env +0 -2
  106. cocoindex-0.1.80/examples/image_search/.env +0 -1
  107. cocoindex-0.1.80/examples/manuals_llm_extraction/.env +0 -2
  108. cocoindex-0.1.80/examples/multi_format_indexing/.env +0 -2
  109. cocoindex-0.1.80/examples/pdf_embedding/.env +0 -2
  110. cocoindex-0.1.80/examples/product_recommendation/.env +0 -2
  111. cocoindex-0.1.80/examples/text_embedding/.env +0 -2
  112. cocoindex-0.1.80/examples/text_embedding_qdrant/.env +0 -2
  113. {cocoindex-0.1.80 → cocoindex-0.1.82}/.cargo/config.toml +0 -0
  114. {cocoindex-0.1.80 → cocoindex-0.1.82}/.env.lib_debug +0 -0
  115. {cocoindex-0.1.80 → cocoindex-0.1.82}/.github/ISSUE_TEMPLATE//360/237/220/233-bug-report.md" +0 -0
  116. {cocoindex-0.1.80 → cocoindex-0.1.82}/.github/ISSUE_TEMPLATE//360/237/222/241-feature-request.md" +0 -0
  117. {cocoindex-0.1.80 → cocoindex-0.1.82}/.github/scripts/update_version.sh +0 -0
  118. {cocoindex-0.1.80 → cocoindex-0.1.82}/.github/workflows/CI.yml +0 -0
  119. {cocoindex-0.1.80 → cocoindex-0.1.82}/.github/workflows/_doc_release.yml +0 -0
  120. {cocoindex-0.1.80 → cocoindex-0.1.82}/.github/workflows/_test.yml +0 -0
  121. {cocoindex-0.1.80 → cocoindex-0.1.82}/.github/workflows/docs.yml +0 -0
  122. {cocoindex-0.1.80 → cocoindex-0.1.82}/.github/workflows/format.yml +0 -0
  123. {cocoindex-0.1.80 → cocoindex-0.1.82}/.github/workflows/release.yml +0 -0
  124. {cocoindex-0.1.80 → cocoindex-0.1.82}/.gitignore +0 -0
  125. {cocoindex-0.1.80 → cocoindex-0.1.82}/.pre-commit-config.yaml +0 -0
  126. {cocoindex-0.1.80 → cocoindex-0.1.82}/CODE_OF_CONDUCT.md +0 -0
  127. {cocoindex-0.1.80 → cocoindex-0.1.82}/LICENSE +0 -0
  128. {cocoindex-0.1.80 → cocoindex-0.1.82}/dev/neo4j.yaml +0 -0
  129. {cocoindex-0.1.80 → cocoindex-0.1.82}/dev/postgres.yaml +0 -0
  130. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/.gitignore +0 -0
  131. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/README.md +0 -0
  132. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/docs/core/basics.md +0 -0
  133. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/docs/core/cli.mdx +0 -0
  134. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/docs/core/data_example.svg +0 -0
  135. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/docs/core/data_types.mdx +0 -0
  136. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/docs/core/flow_def.mdx +0 -0
  137. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/docs/core/flow_example.svg +0 -0
  138. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/docs/core/flow_methods.mdx +0 -0
  139. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/docs/core/settings.mdx +0 -0
  140. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/docs/custom_ops/custom_functions.mdx +0 -0
  141. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/docs/getting_started/installation.md +0 -0
  142. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/docs/getting_started/markdown_files.zip +0 -0
  143. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/docs/getting_started/overview.md +0 -0
  144. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/docs/getting_started/quickstart.md +0 -0
  145. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/docs/ops/functions.md +0 -0
  146. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/docs/ops/sources.md +0 -0
  147. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/docs/ops/targets.md +0 -0
  148. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/docs/query.mdx +0 -0
  149. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/docs/tutorials/live_updates.md +0 -0
  150. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/docs/tutorials/manage_flow_dynamically.mdx +0 -0
  151. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/src/theme/Root.js +0 -0
  152. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/static/.nojekyll +0 -0
  153. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/static/img/docusaurus.png +0 -0
  154. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/static/img/favicon.ico +0 -0
  155. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/static/img/incremental-etl.gif +0 -0
  156. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/static/robots.txt +0 -0
  157. {cocoindex-0.1.80 → cocoindex-0.1.82}/docs/tsconfig.json +0 -0
  158. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/amazon_s3_embedding/.gitignore +0 -0
  159. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/amazon_s3_embedding/README.md +0 -0
  160. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/amazon_s3_embedding/main.py +0 -0
  161. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/amazon_s3_embedding/pyproject.toml +0 -0
  162. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/azure_blob_embedding/.gitignore +0 -0
  163. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/azure_blob_embedding/README.md +0 -0
  164. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/azure_blob_embedding/main.py +0 -0
  165. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/azure_blob_embedding/pyproject.toml +0 -0
  166. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/code_embedding/README.md +0 -0
  167. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/code_embedding/main.py +0 -0
  168. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/code_embedding/pyproject.toml +0 -0
  169. {cocoindex-0.1.80/examples/code_embedding → cocoindex-0.1.82/examples/custom_output_files}/.env +0 -0
  170. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/custom_output_files/.gitignore +0 -0
  171. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/custom_output_files/README.md +0 -0
  172. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/custom_output_files/data/bizarre_animals.md +0 -0
  173. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/custom_output_files/data/chunk_norris.md +0 -0
  174. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/custom_output_files/main.py +0 -0
  175. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/custom_output_files/pyproject.toml +0 -0
  176. {cocoindex-0.1.80/examples/custom_output_files → cocoindex-0.1.82/examples/docs_to_knowledge_graph}/.env +0 -0
  177. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/docs_to_knowledge_graph/README.md +0 -0
  178. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/docs_to_knowledge_graph/main.py +0 -0
  179. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/docs_to_knowledge_graph/pyproject.toml +0 -0
  180. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/face_recognition/README.md +0 -0
  181. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/face_recognition/images/Carter_welcomes_Reagan.jpg +0 -0
  182. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/face_recognition/images/Solvay_conference_1927.jpg +0 -0
  183. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/face_recognition/images/Steve_Jobs_and_Bill_Gates_(522695099).jpg +0 -0
  184. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/face_recognition/images/einplanck3.jpg +0 -0
  185. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/face_recognition/main.py +0 -0
  186. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/face_recognition/pyproject.toml +0 -0
  187. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/fastapi_server_docker/.dockerignore +0 -0
  188. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/fastapi_server_docker/README.md +0 -0
  189. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/fastapi_server_docker/compose.yaml +0 -0
  190. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/fastapi_server_docker/dockerfile +0 -0
  191. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/fastapi_server_docker/files/1810.04805v2.md +0 -0
  192. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/fastapi_server_docker/main.py +0 -0
  193. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/fastapi_server_docker/requirements.txt +0 -0
  194. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/gdrive_text_embedding/.gitignore +0 -0
  195. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/gdrive_text_embedding/README.md +0 -0
  196. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/gdrive_text_embedding/main.py +0 -0
  197. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/gdrive_text_embedding/pyproject.toml +0 -0
  198. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/image_search/README.md +0 -0
  199. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/image_search/colpali_main.py +0 -0
  200. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/image_search/frontend/.gitignore +0 -0
  201. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/image_search/frontend/index.html +0 -0
  202. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/image_search/frontend/package-lock.json +0 -0
  203. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/image_search/frontend/package.json +0 -0
  204. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/image_search/frontend/src/App.jsx +0 -0
  205. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/image_search/frontend/src/main.jsx +0 -0
  206. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/image_search/frontend/src/style.css +0 -0
  207. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/image_search/frontend/vite.config.js +0 -0
  208. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/image_search/img/cat1.jpeg +0 -0
  209. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/image_search/img/dog1.jpeg +0 -0
  210. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/image_search/img/elephant1.jpg +0 -0
  211. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/image_search/img/giraffe.jpg +0 -0
  212. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/image_search/main.py +0 -0
  213. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/image_search/pyproject.toml +0 -0
  214. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/live_updates/.env +0 -0
  215. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/live_updates/README.md +0 -0
  216. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/live_updates/data/bizarre_animals.md +0 -0
  217. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/live_updates/data/chunk_norris.md +0 -0
  218. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/live_updates/main.py +0 -0
  219. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/live_updates/pyproject.toml +0 -0
  220. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/manuals_llm_extraction/README.md +0 -0
  221. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/manuals_llm_extraction/main.py +0 -0
  222. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/manuals_llm_extraction/manuals/array.pdf +0 -0
  223. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/manuals_llm_extraction/manuals/base64.pdf +0 -0
  224. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/manuals_llm_extraction/manuals/copy.pdf +0 -0
  225. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/manuals_llm_extraction/manuals/glob.pdf +0 -0
  226. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/manuals_llm_extraction/pyproject.toml +0 -0
  227. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/multi_format_indexing/main.py +0 -0
  228. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/multi_format_indexing/pyproject.toml +0 -0
  229. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/multi_format_indexing/source_files/1706.03762v7.pdf +0 -0
  230. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/multi_format_indexing/source_files/1810.04805v2.pdf +0 -0
  231. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/multi_format_indexing/source_files/2502.06786v3.pdf +0 -0
  232. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/multi_format_indexing/source_files/healthcare_industry_test_p101.jpg +0 -0
  233. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/multi_format_indexing/source_files/healthcare_industry_test_p86.jpg +0 -0
  234. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/multi_format_indexing/source_files/healthcare_industry_test_p9.jpg +0 -0
  235. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/multi_format_indexing/source_files/restaurant_brands_international_2023.jpg +0 -0
  236. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/multi_format_indexing/source_files/sweetgreen_2023.jpg +0 -0
  237. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/paper_metadata/.gitignore +0 -0
  238. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/paper_metadata/README.md +0 -0
  239. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/paper_metadata/main.py +0 -0
  240. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/paper_metadata/papers/1706.03762v7.pdf +0 -0
  241. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/paper_metadata/papers/1810.04805v2.pdf +0 -0
  242. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/paper_metadata/papers/2502.06786v3.pdf +0 -0
  243. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/paper_metadata/papers/2502.20346v1.pdf +0 -0
  244. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/paper_metadata/pyproject.toml +0 -0
  245. {cocoindex-0.1.80/examples/paper_metadata → cocoindex-0.1.82/examples/patient_intake_extraction}/.env.example +0 -0
  246. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/patient_intake_extraction/README.md +0 -0
  247. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/patient_intake_extraction/data/README.md +0 -0
  248. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/patient_intake_extraction/data/patient_forms/Patient_Intake_Form_David_Artificial.docx +0 -0
  249. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/patient_intake_extraction/data/patient_forms/Patient_Intake_Form_Emily_Artificial.pdf +0 -0
  250. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/patient_intake_extraction/data/patient_forms/Patient_Intake_Form_Joe_Artificial.pdf +0 -0
  251. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/patient_intake_extraction/data/patient_forms/Patient_Intake_From_Jane_Artificial.docx +0 -0
  252. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/patient_intake_extraction/main.py +0 -0
  253. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/patient_intake_extraction/pyproject.toml +0 -0
  254. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/pdf_embedding/README.md +0 -0
  255. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/pdf_embedding/main.py +0 -0
  256. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/pdf_embedding/pdf_files/1706.03762v7.pdf +0 -0
  257. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/pdf_embedding/pdf_files/1810.04805v2.pdf +0 -0
  258. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/pdf_embedding/pdf_files/rfc8259.pdf +0 -0
  259. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/pdf_embedding/pyproject.toml +0 -0
  260. {cocoindex-0.1.80/examples/docs_to_knowledge_graph → cocoindex-0.1.82/examples/product_recommendation}/.env +0 -0
  261. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/product_recommendation/README.md +0 -0
  262. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/product_recommendation/img/cocoinsight.png +0 -0
  263. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/product_recommendation/img/neo4j.png +0 -0
  264. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/product_recommendation/main.py +0 -0
  265. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/product_recommendation/products/p1.json +0 -0
  266. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/product_recommendation/products/p2.json +0 -0
  267. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/product_recommendation/products/p3.json +0 -0
  268. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/product_recommendation/products/p4.json +0 -0
  269. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/product_recommendation/products/p5.json +0 -0
  270. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/product_recommendation/products/p6.json +0 -0
  271. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/product_recommendation/products/p7.json +0 -0
  272. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/product_recommendation/products/p8.json +0 -0
  273. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/product_recommendation/products/p9.json +0 -0
  274. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/product_recommendation/pyproject.toml +0 -0
  275. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/text_embedding/README.md +0 -0
  276. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/text_embedding/Text_Embedding.ipynb +0 -0
  277. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/text_embedding/main.py +0 -0
  278. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/text_embedding/markdown_files/1706.03762v7.md +0 -0
  279. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/text_embedding/markdown_files/1810.04805v2.md +0 -0
  280. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/text_embedding/markdown_files/rfc8259.md +0 -0
  281. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/text_embedding/pyproject.toml +0 -0
  282. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/text_embedding_qdrant/README.md +0 -0
  283. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/text_embedding_qdrant/main.py +0 -0
  284. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/text_embedding_qdrant/markdown_files/rfc8259.md +0 -0
  285. {cocoindex-0.1.80 → cocoindex-0.1.82}/examples/text_embedding_qdrant/pyproject.toml +0 -0
  286. {cocoindex-0.1.80 → cocoindex-0.1.82}/pyproject.toml +0 -0
  287. {cocoindex-0.1.80 → cocoindex-0.1.82}/python/cocoindex/__init__.py +0 -0
  288. {cocoindex-0.1.80 → cocoindex-0.1.82}/python/cocoindex/auth_registry.py +0 -0
  289. {cocoindex-0.1.80 → cocoindex-0.1.82}/python/cocoindex/index.py +0 -0
  290. {cocoindex-0.1.80 → cocoindex-0.1.82}/python/cocoindex/lib.py +0 -0
  291. {cocoindex-0.1.80 → cocoindex-0.1.82}/python/cocoindex/llm.py +0 -0
  292. {cocoindex-0.1.80 → cocoindex-0.1.82}/python/cocoindex/py.typed +0 -0
  293. {cocoindex-0.1.80 → cocoindex-0.1.82}/python/cocoindex/runtime.py +0 -0
  294. {cocoindex-0.1.80 → cocoindex-0.1.82}/python/cocoindex/setting.py +0 -0
  295. {cocoindex-0.1.80 → cocoindex-0.1.82}/python/cocoindex/setup.py +0 -0
  296. {cocoindex-0.1.80 → cocoindex-0.1.82}/python/cocoindex/sources.py +0 -0
  297. {cocoindex-0.1.80 → cocoindex-0.1.82}/python/cocoindex/targets.py +0 -0
  298. {cocoindex-0.1.80 → cocoindex-0.1.82}/python/cocoindex/tests/__init__.py +0 -0
  299. {cocoindex-0.1.80 → cocoindex-0.1.82}/python/cocoindex/tests/test_optional_database.py +0 -0
  300. {cocoindex-0.1.80 → cocoindex-0.1.82}/python/cocoindex/tests/test_typing.py +0 -0
  301. {cocoindex-0.1.80 → cocoindex-0.1.82}/python/cocoindex/tests/test_validation.py +0 -0
  302. {cocoindex-0.1.80 → cocoindex-0.1.82}/python/cocoindex/typing.py +0 -0
  303. {cocoindex-0.1.80 → cocoindex-0.1.82}/python/cocoindex/utils.py +0 -0
  304. {cocoindex-0.1.80 → cocoindex-0.1.82}/python/cocoindex/validation.py +0 -0
  305. {cocoindex-0.1.80 → cocoindex-0.1.82}/ruff.toml +0 -0
  306. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/base/duration.rs +0 -0
  307. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/base/field_attrs.rs +0 -0
  308. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/base/json_schema.rs +0 -0
  309. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/base/mod.rs +0 -0
  310. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/base/schema.rs +0 -0
  311. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/base/spec.rs +0 -0
  312. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/base/value.rs +0 -0
  313. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/builder/analyzed_flow.rs +0 -0
  314. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/builder/analyzer.rs +0 -0
  315. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/builder/flow_builder.rs +0 -0
  316. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/builder/mod.rs +0 -0
  317. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/execution/mod.rs +0 -0
  318. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/execution/stats.rs +0 -0
  319. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/lib.rs +0 -0
  320. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/llm/anthropic.rs +0 -0
  321. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/llm/gemini.rs +0 -0
  322. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/llm/litellm.rs +0 -0
  323. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/llm/mod.rs +0 -0
  324. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/llm/ollama.rs +0 -0
  325. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/llm/openai.rs +0 -0
  326. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/llm/openrouter.rs +0 -0
  327. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/llm/vllm.rs +0 -0
  328. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/llm/voyage.rs +0 -0
  329. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/functions/embed_text.rs +0 -0
  330. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/functions/extract_by_llm.rs +0 -0
  331. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/functions/mod.rs +0 -0
  332. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/functions/parse_json.rs +0 -0
  333. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/functions/test_utils.rs +0 -0
  334. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/mod.rs +0 -0
  335. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/registration.rs +0 -0
  336. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/registry.rs +0 -0
  337. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/sdk.rs +0 -0
  338. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/sources/mod.rs +0 -0
  339. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/sources/shared/mod.rs +0 -0
  340. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/sources/shared/pattern_matcher.rs +0 -0
  341. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/targets/mod.rs +0 -0
  342. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/targets/shared/mod.rs +0 -0
  343. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/targets/shared/property_graph.rs +0 -0
  344. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/ops/targets/shared/table_columns.rs +0 -0
  345. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/prelude.rs +0 -0
  346. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/py/convert.rs +0 -0
  347. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/py/mod.rs +0 -0
  348. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/server.rs +0 -0
  349. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/service/mod.rs +0 -0
  350. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/settings.rs +0 -0
  351. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/setup/auth_registry.rs +0 -0
  352. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/setup/mod.rs +0 -0
  353. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/utils/concur_control.rs +0 -0
  354. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/utils/db.rs +0 -0
  355. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/utils/immutable.rs +0 -0
  356. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/utils/mod.rs +0 -0
  357. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/utils/retryable.rs +0 -0
  358. {cocoindex-0.1.80 → cocoindex-0.1.82}/src/utils/yaml_ser.rs +0 -0
@@ -0,0 +1 @@
1
+ We love contributions from our community ❤️. Please check out our [contributing guide](https://cocoindex.io/docs/contributing/guide).
@@ -1283,7 +1283,7 @@ dependencies = [
1283
1283
 
1284
1284
  [[package]]
1285
1285
  name = "cocoindex"
1286
- version = "0.1.80"
1286
+ version = "0.1.82"
1287
1287
  dependencies = [
1288
1288
  "anyhow",
1289
1289
  "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.80"
5
+ version = "0.1.82"
6
6
  edition = "2024"
7
7
  rust-version = "1.88"
8
8
  readme = "README.md"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cocoindex
3
- Version: 0.1.80
3
+ Version: 0.1.82
4
4
  Requires-Dist: click>=8.1.8
5
5
  Requires-Dist: rich>=14.0.0
6
6
  Requires-Dist: python-dotenv>=1.1.0
@@ -79,17 +79,17 @@ Ultra performant data transformation framework for AI, with core engine written
79
79
 
80
80
  </br>
81
81
 
82
- CocoIndex makes it super easy to transform data with AI workloads, and keep source data and target in sync effortlessly.
82
+ CocoIndex makes it effortless to transform data with AI, and keep source data and target in sync. Whether you’re building a vector index for RAG, creating knowledge graphs, or performing any custom data transformations — goes beyond SQL.
83
83
 
84
84
  </br>
85
85
 
86
86
  <p align="center">
87
- <img src="https://cocoindex.io/images/venn-features.png" alt="CocoIndex Features" width='400'>
87
+ <img width="4187" height="1883" alt="CocoIndex Features" src="https://github.com/user-attachments/assets/6147673f-0daf-4313-a0c7-7c4205ba2e31" />
88
88
  </p>
89
89
 
90
90
  </br>
91
91
 
92
- Either creating embedding, building knowledge graphs, or any data transformations - beyond traditional SQL.
92
+
93
93
 
94
94
  ## Exceptional velocity
95
95
  Just declare transformation in dataflow with ~100 lines of python
@@ -114,8 +114,8 @@ CocoIndex follows the idea of [Dataflow](https://en.wikipedia.org/wiki/Dataflow_
114
114
 
115
115
  **Particularly**, developers don't explicitly mutate data by creating, updating and deleting. They just need to define transformation/formula for a set of source data.
116
116
 
117
- ## Build like LEGO
118
- Native builtins for different source, targets and transformations. Standardize interface, make it 1-line code switch between different components.
117
+ ## Plug-and-Play Building Blocks
118
+ Native builtins for different source, targets and transformations. Standardize interface, make it 1-line code switch between different components - as easy as assembling building blocks.
119
119
 
120
120
  <p align="center">
121
121
  <img src="https://cocoindex.io/images/components.svg" alt="CocoIndex Features">
@@ -50,17 +50,17 @@ Ultra performant data transformation framework for AI, with core engine written
50
50
 
51
51
  </br>
52
52
 
53
- CocoIndex makes it super easy to transform data with AI workloads, and keep source data and target in sync effortlessly.
53
+ CocoIndex makes it effortless to transform data with AI, and keep source data and target in sync. Whether you’re building a vector index for RAG, creating knowledge graphs, or performing any custom data transformations — goes beyond SQL.
54
54
 
55
55
  </br>
56
56
 
57
57
  <p align="center">
58
- <img src="https://cocoindex.io/images/venn-features.png" alt="CocoIndex Features" width='400'>
58
+ <img width="4187" height="1883" alt="CocoIndex Features" src="https://github.com/user-attachments/assets/6147673f-0daf-4313-a0c7-7c4205ba2e31" />
59
59
  </p>
60
60
 
61
61
  </br>
62
62
 
63
- Either creating embedding, building knowledge graphs, or any data transformations - beyond traditional SQL.
63
+
64
64
 
65
65
  ## Exceptional velocity
66
66
  Just declare transformation in dataflow with ~100 lines of python
@@ -85,8 +85,8 @@ CocoIndex follows the idea of [Dataflow](https://en.wikipedia.org/wiki/Dataflow_
85
85
 
86
86
  **Particularly**, developers don't explicitly mutate data by creating, updating and deleting. They just need to define transformation/formula for a set of source data.
87
87
 
88
- ## Build like LEGO
89
- Native builtins for different source, targets and transformations. Standardize interface, make it 1-line code switch between different components.
88
+ ## Plug-and-Play Building Blocks
89
+ Native builtins for different source, targets and transformations. Standardize interface, make it 1-line code switch between different components - as easy as assembling building blocks.
90
90
 
91
91
  <p align="center">
92
92
  <img src="https://cocoindex.io/images/components.svg" alt="CocoIndex Features">
@@ -12,7 +12,7 @@ We are super excited for community contributions of all kinds - whether it's cod
12
12
  We would love to foster an inclusive, welcoming, and supportive environment. Contributing to CocoIndex should feel collaborative, friendly and enjoyable for everyone. Together, we can build better AI applications through robust data infrastructure.
13
13
 
14
14
  :::tip Start hacking CocoIndex
15
- Check out our [Contributing guide](./contributing) to get started!
15
+ Check out our [Contributing guide](/docs/contributing/guide) to get started!
16
16
  :::
17
17
 
18
18
 
@@ -20,7 +20,7 @@ We support the following types of LLM APIs:
20
20
  | API Name | `LlmApiType` enum | Text Generation | Text Embedding |
21
21
  |----------|---------------------|--------------------|--------------------|
22
22
  | [OpenAI](#openai) | `LlmApiType.OPENAI` | ✅ | ✅ |
23
- | [Ollama](#ollama) | `LlmApiType.OLLAMA` | ✅ | |
23
+ | [Ollama](#ollama) | `LlmApiType.OLLAMA` | ✅ | |
24
24
  | [Google Gemini](#google-gemini) | `LlmApiType.GEMINI` | ✅ | ✅ |
25
25
  | [Vertex AI](#vertex-ai) | `LlmApiType.VERTEX_AI` | ✅ | ✅ |
26
26
  | [Anthropic](#anthropic) | `LlmApiType.ANTHROPIC` | ✅ | ❌ |
@@ -141,6 +141,29 @@ cocoindex.LlmSpec(
141
141
  </TabItem>
142
142
  </Tabs>
143
143
 
144
+ For text embedding with Ollama, you'll need to pull an embedding model first:
145
+
146
+ ```bash
147
+ ollama pull nomic-embed-text
148
+ ```
149
+
150
+ Then, a spec for Ollama embedding looks like this:
151
+
152
+ <Tabs>
153
+ <TabItem value="python" label="Python" default>
154
+
155
+ ```python
156
+ cocoindex.functions.EmbedText(
157
+ api_type=cocoindex.LlmApiType.OLLAMA,
158
+ model="nomic-embed-text",
159
+ # Optional, use Ollama's default port (11434) on localhost if not specified
160
+ address="http://localhost:11434",
161
+ )
162
+ ```
163
+
164
+ </TabItem>
165
+ </Tabs>
166
+
144
167
  ### Google Gemini
145
168
 
146
169
  Google exposes Gemini through Google AI Studio APIs.
@@ -1,68 +1,20 @@
1
1
  ---
2
- title: Contributing
3
- description: Learn how to contribute to CocoIndex
2
+ title: Contributing Guide
3
+ description: How to contribute to CocoIndex
4
4
  ---
5
5
 
6
- # Contributing
7
-
8
6
  [CocoIndex](https://github.com/cocoindex-io/cocoindex) is an open source project. We are respectful, open and friendly. This guide explains how to get involved and contribute to [CocoIndex](https://github.com/cocoindex-io/cocoindex).
9
7
 
10
- ## Issues:
11
-
12
- We use [GitHub Issues](https://github.com/cocoindex-io/cocoindex/issues) to track bugs and feature requests.
8
+ Our [Discord server](https://discord.com/invite/zpA9S2DR7s) is constantly open.
9
+ If you are unsure about anything, it is a good place to discuss! We'd love to collaborate and will always be friendly.
13
10
 
14
11
  ## Good First Issues
15
12
 
16
13
  We tag issues with the ["good first issue"](https://github.com/cocoindex-io/cocoindex/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) label for beginner contributors.
17
14
 
18
15
  ## How to Contribute
19
- - If you decide to work on an issue, unless the PR can be sent immediately (e.g. just a few lines of code), we recommend you to leave a comment on the issue like **`I'm working on it`** or **`Can I work on this issue?`** to avoid duplicating work.
16
+ - If you decide to take an issue, we recommend you to leave a comment on the issue like **`Can I work on this issue?`** so we could assign it to you. This helps you and others avoid duplicating work.
20
17
  - For larger features, we recommend you to discuss with us first in our [Discord server](https://discord.com/invite/zpA9S2DR7s) to coordinate the design and work.
21
- - Our [Discord server](https://discord.com/invite/zpA9S2DR7s) is constantly open. If you are unsure about anything, it is a good place to discuss! We'd love to collaborate and will always be friendly.
22
-
23
- ## Start hacking! Setting Up Development Environment
24
- Follow the steps below to get cocoindex built on the latest codebase locally - if you are making changes to cocoindex functionality and want to test it out.
25
-
26
- - 🦀 [Install Rust](https://rust-lang.org/tools/install)
27
-
28
- If you don't have Rust installed, run
29
- ```sh
30
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
31
- ```
32
- Already have Rust? Make sure it's up to date
33
- ```sh
34
- rustup update
35
- ```
36
-
37
- - Setup Python virtual environment:
38
- ```sh
39
- python3 -m venv .venv
40
- ```
41
- Activate the virtual environment, before any installing / building / running:
42
-
43
- ```sh
44
- . .venv/bin/activate
45
- ```
46
-
47
- - Install required tools:
48
- ```sh
49
- pip install maturin
50
- ```
51
-
52
- - Build the library. Run at the root of cocoindex directory:
53
- ```sh
54
- maturin develop -E all,dev
55
- ```
56
-
57
- - Install and enable pre-commit hooks. This ensures all checks run automatically before each commit:
58
- ```sh
59
- pre-commit install
60
- ```
61
-
62
- - Before running a specific example, set extra environment variables, for exposing extra traces, allowing dev UI, etc.
63
- ```sh
64
- . ./.env.lib_debug
65
- ```
66
18
 
67
19
  ## Submit Your Code
68
20
  CocoIndex is committed to the highest standards of code quality. Please ensure your code is thoroughly tested before submitting a PR.
@@ -89,6 +41,7 @@ In your PR description, please include:
89
41
  - Note if it's a breaking change
90
42
  - Reference any related GitHub issues
91
43
 
44
+
92
45
  A core team member will review your PR within one business day and provide feedback on any required changes. Once approved and all tests pass, the reviewer will squash and merge your PR into the main branch.
93
46
 
94
47
  Your contribution will then be part of CocoIndex! We'll highlight your contribution in our release notes 🌴.
@@ -0,0 +1,136 @@
1
+ ---
2
+ title: New Built-in Target
3
+ description: Learn how to create a new built-in target in CocoIndex.
4
+ toc_max_heading_level: 4
5
+ ---
6
+
7
+ import Tabs from '@theme/Tabs';
8
+ import TabItem from '@theme/TabItem';
9
+
10
+ A target connects CocoIndex flow and external systems, and needs to synchronize changes of data from the CocoIndex flow to outside.
11
+
12
+ ## Built-in Targets and Custom Targets
13
+
14
+ CocoIndex allows you to create [custom targets](/docs/custom_ops/custom_targets) by Python SDK.
15
+ Custom targets share the gist as built-in targets, but the interface is simplified, so it only supports a subset of capabilities.
16
+ The most notable difference is that custom target API exposed by Python SDK doesn't provide schema of the data to be exported, so it only fits most of the use cases where the target schema is fixed.
17
+ But the built-in targets get the schema, so it can be used to define general-purpose targets.
18
+
19
+ You're recommended to read the [custom target documentation](/docs/custom_ops/custom_targets) first as a starting point.
20
+
21
+ ## Life of a Built-in Target
22
+
23
+ The core logic of a built-in target is the *Target Connector*, which is an implementation of the trait [`TargetFactoryBase`](https://github.com/search?q=repo%3Acocoindex-io%2Fcocoindex%20%22trait%20TargetFactoryBase%22&type=code).
24
+
25
+ *Users* provide a *Target Spec* when they export specific data (in the form of [Data Collector](/docs/core/flow_def#data-collector)) to the target.
26
+
27
+ ```mermaid
28
+ flowchart TD
29
+ FlowAnalyzer[CocoIndex Flow Analyzer] --> DataSchema[Data Schema]
30
+ ExecutionEngine[CocoIndex Execution Engine] --> Mutations[mutations]
31
+
32
+ TargetSpec[Target Spec] --> BuildMethod(build#40;#41;)
33
+ DataSchema --> BuildMethod
34
+
35
+ BuildMethod --> SetupKeyState[Setup Key & State]
36
+ BuildMethod --> ExportContext[Export Context]
37
+
38
+ SetupKeyState --> InternalStorage[(Internal Storage)]
39
+ SetupKeyState --> DiffMethod(diff_setup_states#40;#41;)
40
+ InternalStorage --> |previous versions| DiffMethod
41
+
42
+ DiffMethod --> SetupChange[Setup Change]
43
+
44
+ SetupChange --> ApplySetupMethod(apply_setup_changes#40;#41;)
45
+ ApplySetupMethod --> |setup changes #40;DDL#41;| TargetInfra[Target Infrastructure]
46
+
47
+ ExportContext --> ApplyMutationMethod(apply_mutation#40;#41;)
48
+ Mutations --> ApplyMutationMethod
49
+ ApplyMutationMethod --> |data changes #40;DML#41;| TargetInfra
50
+
51
+ %% Styling
52
+ classDef cocoClass fill:#aaa,color:black
53
+ classDef storageClass fill:#aaa,color:black
54
+ classDef methodClass fill:#ffc,color:black,font-weight:bold
55
+
56
+ class BuildMethod,DiffMethod,ApplySetupMethod,ApplyMutationMethod methodClass
57
+ class InternalStorage,TargetInfra storageClass
58
+ class TargetSpec,SetupKeyState,ExportContext,SetupChange,DataSchema,Mutations dataClass
59
+ class FlowAnalyzer,ExecutionEngine cocoClass
60
+ ```
61
+
62
+
63
+ ### States / Contexts Building
64
+
65
+ *CocoIndex* analyzes the flow before execution. For each target, it will have the information of *Data Schema* exported to the target, and the *Target Spec*.
66
+ The *Target Connector* (an implementation of `TargetFactoryBase`) takes them by the `build()` method, to digest this information and return necessary information for setup changes and data changes, including a *Setup Key*, a *Setup State* and a *Export Context* for each target.
67
+
68
+ *Setup Key* and *Setup State* provides information to decide how to setup the target.
69
+ Both *Setup Key* and *Setup State* are persisted in CocoIndex's [internal storage](/docs/core/basics#internal-storage), to keep track of targets' states.
70
+
71
+ - *Setup Key* is a key used to uniquely identify the target. It should remain stable across different calls.
72
+ If it changes, CocoIndex considers it as a different target.
73
+ For example, for Postgres, we use the table name as the setup key.
74
+
75
+ - *Setup State* is a state of the target.
76
+ *Setup Key* and *Setup State* should contain sufficient information to decide how to setup the target.
77
+ For example, for Postgres, we use the table name and its schema as the setup state.
78
+
79
+ :::note
80
+
81
+ Note that different CocoIndex data types may be projected to the same column type in Postgres, e.g. all _Struct_ and _Table_ types are projected to `jsonb`.
82
+ It's sufficient to keep `jsonb` instead of the specific CocoIndex type in *Setup State*, so the *Setup State* doesn't need to be changed too often.
83
+
84
+ For historical reasons, we already put the specific CocoIndex type in *Setup State* for Postgres targets, and it's not easy to update it with a smooth migration, so we keep it for now.
85
+ But for new targets, it's recommended to keep just sufficient information to define the target.
86
+
87
+ :::
88
+
89
+ *Export Context* is an in-memory object that contains necessary information and objects to apply data changes.
90
+ For example, it may hold a database connection pool, or a prepared statement for upserting/deleting data, etc.
91
+
92
+ ### Apply Setup Changes
93
+
94
+ *CocoIndex* calls the *Target Connector* (`diff_setup_states()`) to compare the current *Setup State* with previous ones, which returns *Setup Change* object to describe the change (or no change).
95
+ For example, for Postgres, the *Setup Change* object contains information such as which table needs to be created/dropped, which column needs to be added/dropped, etc.
96
+
97
+ *CocoIndex* further passes the *Setup Change* to the *Target Connector* (`apply_setup_changes()`), which is responsible for applying the *Setup Change* to the target infrastructure.
98
+ Here's the place for the target connector to issue the actual commands to setup, drop or update the target infrastructure.
99
+
100
+ :::note
101
+
102
+ Here CocoIndex may pass multiple versions of possible existing states to the target connector via `diff_setup_states()`. This is because there may be failures or interrupts in the previous setup attempts, so CocoIndex doesn't always clearly know the exact state of the target. CocoIndex needs to keep multiple versions of states on track (the existing one and the pending ones) until the next `apply_setup_changes()` is successful.
103
+
104
+ For example, consider the following scenarios:
105
+
106
+ - A Postgres target's initial state describes it has a column `col_1`.
107
+ - Later, after the flow changes, a new column `col_2` is collected, so a new version of target state has columns `col_1` and `col_2`. But the attempt to apply this setup change doesn't go through (e.g. connection to the database is broken, in general CocoIndex doesn't know the exact state the backend ends up with).
108
+ - Now the user updates the column name from `col_2` to `col_3` in their flow. In the next attempt to apply the setup change, we get a setup state with `col_1` and `col_3`.
109
+
110
+ - To apply setup changes for the latest, CocoIndex will pass two versions existing setup states to the target connector via `diff_setup_states()`, one with `col_1`, the other with `col_1` and `col_2`. The new setup state has `col_1` and `col_3`. And the target connector needs to create a setup change that take both of the possible existing states into account. The change should be "drop `col_2` and add `col_3`".
111
+ - When applying the setup change in `apply_setup_changes()`, the target connector should do this idempotently, i.e. it should be a no-op if the column `col_2` already doesn't exist (by `DROP IF EXISTS`), so it works well on either possible existing state.
112
+ - After this setup change is applied successfully, CocoIndex clearly knows the target's current state (i.e. with columns `col_1` and `col_3`), and safely forgets all previous states.
113
+
114
+ :::
115
+
116
+ ### Apply Data Changes
117
+
118
+ *CocoIndex* calls the *Target Connector* (`apply_mutation()`) to apply data changes, by list of mutations (upserts and deletes) together with their *Export Context*.
119
+ The method should apply these mutations in an idempotent way, i.e. it should be a no-op if the mutation is already applied.
120
+ For example, for Postgres, upserts are done by `INSERT ... ON CONFLICT ... DO UPDATE SET ...`, and deletes are done by `DELETE ... WHERE ...`.
121
+
122
+ ### Notes on Multiple Targets
123
+
124
+ The interface of multiple methods in `TargetFactoryBase` (`build()`, `apply_setup_changes()`, `apply_mutation()`) takes a batch of inputs coming from multiple targets of the same type. This gives a chance for the connector to handle dependencies between them (if any) and apply changes in the correct order.
125
+ For example, to support property graph databases, relationships depend on nodes, so nodes need to be added before relationships, and on deletion it happens in reverse order.
126
+ This is not a consideration for target types that different targets are independent of each other.
127
+
128
+ ## Examples
129
+
130
+ The following target implementations provide good examples:
131
+
132
+ - [Postgres](/docs/ops/targets#postgres), see [related code](https://github.com/search?q=repo%3Acocoindex-io%2Fcocoindex+path%3A%2Ftarget%2F+Postgres&type=code).
133
+ It provides a good example for targets with specific column types in the schema.
134
+
135
+ - [Qdrant](/docs/ops/targets#qdrant), see [related code](https://github.com/search?q=repo%3Acocoindex-io%2Fcocoindex+path%3A%2Ftarget%2F+Qdrant&type=code).
136
+ It provides a good example for targets without specific column types in the schema, as Qdrant's payloads are JSON objects.
@@ -0,0 +1,47 @@
1
+ ---
2
+ title: Setup Development Environment
3
+ description: Learn how to setup your development environment to develop CocoIndex
4
+ ---
5
+
6
+ Follow the steps below to get CocoIndex built on the latest codebase locally - if you are making changes to CocoIndex functionality and want to test it out.
7
+
8
+ - 🦀 [Install Rust](https://rust-lang.org/tools/install)
9
+
10
+ If you don't have Rust installed, run
11
+ ```sh
12
+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
13
+ ```
14
+ Already have Rust? Make sure it's up to date
15
+ ```sh
16
+ rustup update
17
+ ```
18
+
19
+ - Setup Python virtual environment:
20
+ ```sh
21
+ python3 -m venv .venv
22
+ ```
23
+ Activate the virtual environment, before any installing / building / running:
24
+
25
+ ```sh
26
+ . .venv/bin/activate
27
+ ```
28
+
29
+ - Install required tools:
30
+ ```sh
31
+ pip install maturin
32
+ ```
33
+
34
+ - Build the library. Run at the root of cocoindex directory:
35
+ ```sh
36
+ maturin develop -E all,dev
37
+ ```
38
+
39
+ - Install and enable pre-commit hooks. This ensures all checks run automatically before each commit:
40
+ ```sh
41
+ pre-commit install
42
+ ```
43
+
44
+ - Before running a specific example, set extra environment variables, for exposing extra traces, allowing dev UI, etc.
45
+ ```sh
46
+ . ./.env.lib_debug
47
+ ```
@@ -8,12 +8,29 @@ import Tabs from '@theme/Tabs';
8
8
  import TabItem from '@theme/TabItem';
9
9
 
10
10
  A custom target allows you to export data to any destination you want, such as databases, cloud storage, file systems, APIs, or other external systems.
11
+ You can either continuously update the destination to keep it in sync with the latest exported data, or simply publish the changes as a changelog to somewhere.
12
+
13
+ ## Overview
11
14
 
12
15
  Custom targets are defined by two components:
13
16
 
14
17
  * A **target spec** that configures the behavior and connection parameters for the target.
15
18
  * A **target connector** that handles the actual data export operations.
16
19
 
20
+ When you define a flow within CocoIndex, you define how data are transformed, collected and exported, without worrying about how to handle data change (insert, update, delete). CocoIndex handles it for you.
21
+ However, a target connects CocoIndex flow and external systems, and needs to synchronize changes of data from the CocoIndex flow to outside.
22
+ The implementation of a target connector needs to deal with changes, in two aspects:
23
+
24
+ - **Setup changes**.
25
+ They're for basic setup of a target's corresponding infrastructure (e.g. a table, a directory) without specific data.
26
+ When users add a new target, delete an existing target, or make changes to the target spec,
27
+ the framework will trigger the connector to apply these setup changes by calling `apply_setup_change()`.
28
+ The connector needs apply corresponding setup changes to the external system, e.g. create/delete a table, update/delete a directory, etc.
29
+
30
+ - **Data changes**.
31
+ They're changes of specific data exported to the target.
32
+ During the flow is running, when new rows-to-export appear, or existing ones are updated or deleted in the CocoIndex flow, the framework will trigger the connector to apply these data changes by calling `mutate()`, e.g. insert/update/delete a row in a table, write/delete a file, etc.
33
+
17
34
  ## Target Spec
18
35
 
19
36
  The target spec defines the configuration parameters for your custom target. When you use this target in a flow (typically by calling [`export()`](/docs/core/flow_def#export)), you instantiate this target spec with specific parameter values.
@@ -44,7 +61,7 @@ Notes:
44
61
 
45
62
  A target connector handles the actual data export operations for your custom target. It defines how data should be written to your target destination.
46
63
 
47
- Target connectors implement two categories of methods: **setup methods** for managing target infrastructure (similar to DDL operations in databases), and **data methods** for handling specific data operations (similar to DML operations).
64
+ Target connectors implement two categories of methods: setup methods to deal with setup changes, and data methods to deal with data changes.
48
65
 
49
66
  <Tabs>
50
67
  <TabItem value="python" label="Python" default>
@@ -171,8 +188,94 @@ For example,
171
188
 
172
189
  This is to make sure when the system if left in an intermediate state, e.g. interrupted in the middle between a change is made and CocoIndex notes down the change is completed, the targets can still be gracefully rolled forward to the desired states after the system is resumed.
173
190
 
174
- ## Examples
175
191
 
176
- The cocoindex repository contains the following examples of custom targets:
192
+ ## Example
193
+
194
+ In this example, we define a custom target that accepts data with the following fields:
195
+ - `filename` (key field)
196
+ - `author` (value field)
197
+ - `html` (value field)
198
+
199
+ <Tabs>
200
+ <TabItem value="python" label="Python" default>
201
+
202
+ ```python
203
+ import dataclasses
204
+ import cocoindex
205
+
206
+ # 1. Define the target spec
207
+ class MyCustomTarget(cocoindex.op.TargetSpec):
208
+ """Spec of the custom target, to configure the target location etc."""
209
+ location: str
210
+
211
+ # 2. Define the value dataclass for exported data
212
+ @dataclasses.dataclass
213
+ class LocalFileTargetValues:
214
+ """Represents value fields of exported data."""
215
+ author: str
216
+ html: str
217
+
218
+ # 3. Define the target connector
219
+ @cocoindex.op.target_connector(spec_cls=MyCustomTarget)
220
+ class LocalFileTargetConnector:
221
+ @staticmethod
222
+ def get_persistent_key(spec: MyCustomTarget, target_name: str) -> str:
223
+ return spec.location
224
+
225
+ @staticmethod
226
+ def apply_setup_change(
227
+ key: str, previous: MyCustomTarget | None, current: MyCustomTarget | None
228
+ ) -> None:
229
+ # Setup/teardown logic here
230
+ ...
231
+
232
+ @staticmethod
233
+ def mutate(
234
+ *all_mutations: tuple[MyCustomTarget, dict[str, LocalFileTargetValues | None]],
235
+ ) -> None:
236
+ """Apply data mutations to the target."""
237
+ for spec, mutations in all_mutations:
238
+ for filename, mutation in mutations.items():
239
+ if mutation is None:
240
+ # Delete the file
241
+ ...
242
+ else:
243
+ # Write the file with author and html content
244
+ ...
245
+
246
+ # 4. Usage in a flow
247
+ @cocoindex.flow_def(name="ExampleFlow")
248
+ def example_flow(flow_builder: cocoindex.FlowBuilder, data_scope: cocoindex.DataScope) -> None:
249
+ # Add data source
250
+ data_scope["documents"] = flow_builder.add_source(...)
251
+
252
+ # Create collector
253
+ output_data = data_scope.add_collector()
254
+
255
+ # Collect data
256
+ with data_scope["documents"].row() as doc:
257
+ # Create the "author" and "fieldname" field
258
+ ...
259
+
260
+ # Collect the data
261
+ output_data.collect(filename=doc["filename"], author=doc["author"], html=doc["transformed_html"])
262
+
263
+ # Export to custom target
264
+ output_data.export(
265
+ "OutputData",
266
+ MyCustomTarget(location=...),
267
+ primary_key_fields=["filename"],
268
+ )
269
+ ```
270
+
271
+ In this example, the type for data in `all_mutations` is `dict[str, LocalFileTargetValues | None]`:
272
+ - `str` is the `DataKeyType` (the filename)
273
+ - `LocalFileTargetValues` is the `DataValueType` (containing `html` and `author` fields)
274
+ - The `mutate()` method receives tuples of `(MyCustomTarget, dict[str, LocalFileTargetValues | None])`
275
+
276
+ For simplicity, the type hints can be omitted and a `dict` will be created instead of a dataclass instance, and `author` and `html` will be the keys of the dict.
277
+
278
+ </TabItem>
279
+ </Tabs>
177
280
 
178
- * In the [custom_output_files](https://github.com/cocoindex-io/cocoindex/blob/main/examples/custom_output_files/main.py) example, `LocalFileTarget` exports data to local HTML files.
281
+ See the [custom_output_files](https://github.com/cocoindex-io/cocoindex/blob/main/examples/custom_output_files/main.py) for the an end-to-end example.