cocoindex 0.2.23__tar.gz → 0.3.1__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 (477) hide show
  1. {cocoindex-0.2.23 → cocoindex-0.3.1}/.pre-commit-config.yaml +1 -0
  2. {cocoindex-0.2.23 → cocoindex-0.3.1}/Cargo.lock +3 -1
  3. {cocoindex-0.2.23 → cocoindex-0.3.1}/Cargo.toml +2 -1
  4. {cocoindex-0.2.23 → cocoindex-0.3.1}/PKG-INFO +1 -1
  5. {cocoindex-0.2.23 → cocoindex-0.3.1}/THIRD_PARTY_NOTICES.html +1 -1
  6. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/custom_ops/custom_functions.mdx +62 -26
  7. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/examples/examples/01_docs_to_knowledge_graph.md +1 -1
  8. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/sources/index.md +2 -2
  9. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/targets/index.md +0 -3
  10. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/targets/kuzu.md +2 -2
  11. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/targets/neo4j.md +2 -2
  12. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/product_recommendation/README.md +1 -1
  13. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/functions/colpali.py +29 -34
  14. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/functions/sbert.py +6 -3
  15. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/op.py +52 -17
  16. cocoindex-0.3.1/python/cocoindex/runtime.py +74 -0
  17. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/subprocess_exec.py +1 -27
  18. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/execution/live_updater.rs +247 -190
  19. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/execution/source_indexer.rs +55 -51
  20. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/lib_context.rs +5 -2
  21. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/llm/anthropic.rs +7 -13
  22. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/llm/bedrock.rs +10 -16
  23. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/llm/gemini.rs +74 -66
  24. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/llm/mod.rs +2 -2
  25. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/llm/ollama.rs +14 -34
  26. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/llm/openai.rs +3 -7
  27. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/llm/voyage.rs +13 -18
  28. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/factory_bases.rs +80 -2
  29. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/functions/embed_text.rs +42 -23
  30. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/py_factory.rs +94 -28
  31. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/targets/kuzu.rs +3 -6
  32. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/prelude.rs +1 -1
  33. cocoindex-0.3.1/src/py/future.rs +85 -0
  34. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/py/mod.rs +10 -2
  35. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/service/error.rs +10 -4
  36. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/service/flows.rs +1 -0
  37. cocoindex-0.3.1/src/utils/batching.rs +322 -0
  38. cocoindex-0.3.1/src/utils/http.rs +31 -0
  39. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/utils/mod.rs +2 -0
  40. cocoindex-0.2.23/python/cocoindex/runtime.py +0 -44
  41. {cocoindex-0.2.23 → cocoindex-0.3.1}/.cargo/config.toml +0 -0
  42. {cocoindex-0.2.23 → cocoindex-0.3.1}/.env.lib_debug +0 -0
  43. {cocoindex-0.2.23 → cocoindex-0.3.1}/.github/ISSUE_TEMPLATE//360/237/220/233-bug-report.md" +0 -0
  44. {cocoindex-0.2.23 → cocoindex-0.3.1}/.github/ISSUE_TEMPLATE//360/237/222/241-feature-request.md" +0 -0
  45. {cocoindex-0.2.23 → cocoindex-0.3.1}/.github/SECURITY.md +0 -0
  46. {cocoindex-0.2.23 → cocoindex-0.3.1}/.github/scripts/update_version.sh +0 -0
  47. {cocoindex-0.2.23 → cocoindex-0.3.1}/.github/workflows/CI.yml +0 -0
  48. {cocoindex-0.2.23 → cocoindex-0.3.1}/.github/workflows/_docs_release.yml +0 -0
  49. {cocoindex-0.2.23 → cocoindex-0.3.1}/.github/workflows/_test.yml +0 -0
  50. {cocoindex-0.2.23 → cocoindex-0.3.1}/.github/workflows/docs_release.yml +0 -0
  51. {cocoindex-0.2.23 → cocoindex-0.3.1}/.github/workflows/docs_test.yml +0 -0
  52. {cocoindex-0.2.23 → cocoindex-0.3.1}/.github/workflows/format.yml +0 -0
  53. {cocoindex-0.2.23 → cocoindex-0.3.1}/.github/workflows/release.yml +0 -0
  54. {cocoindex-0.2.23 → cocoindex-0.3.1}/.gitignore +0 -0
  55. {cocoindex-0.2.23 → cocoindex-0.3.1}/CODE_OF_CONDUCT.md +0 -0
  56. {cocoindex-0.2.23 → cocoindex-0.3.1}/CONTRIBUTING.md +0 -0
  57. {cocoindex-0.2.23 → cocoindex-0.3.1}/LICENSE +0 -0
  58. {cocoindex-0.2.23 → cocoindex-0.3.1}/README.md +0 -0
  59. {cocoindex-0.2.23 → cocoindex-0.3.1}/about.hbs +0 -0
  60. {cocoindex-0.2.23 → cocoindex-0.3.1}/about.toml +0 -0
  61. {cocoindex-0.2.23 → cocoindex-0.3.1}/dev/README.md +0 -0
  62. {cocoindex-0.2.23 → cocoindex-0.3.1}/dev/generate_cli_docs.py +0 -0
  63. {cocoindex-0.2.23 → cocoindex-0.3.1}/dev/neo4j.yaml +0 -0
  64. {cocoindex-0.2.23 → cocoindex-0.3.1}/dev/postgres.yaml +0 -0
  65. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/.gitignore +0 -0
  66. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/README.md +0 -0
  67. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/about/community.md +0 -0
  68. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/ai/llm.mdx +0 -0
  69. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/contributing/guide.md +0 -0
  70. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/contributing/new_built_in_target.mdx +0 -0
  71. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/contributing/setup_dev_environment.md +0 -0
  72. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/core/basics.md +0 -0
  73. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/core/cli-commands.md +0 -0
  74. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/core/cli.mdx +0 -0
  75. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/core/data_example.svg +0 -0
  76. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/core/data_types.mdx +0 -0
  77. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/core/flow_def.mdx +0 -0
  78. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/core/flow_example.svg +0 -0
  79. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/core/flow_methods.mdx +0 -0
  80. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/core/settings.mdx +0 -0
  81. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/custom_ops/custom_sources.mdx +0 -0
  82. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/custom_ops/custom_targets.mdx +0 -0
  83. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/examples/examples/00_codebase_index.md +0 -0
  84. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/examples/examples/02_academic_papers_index.md +0 -0
  85. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/examples/examples/03_postgres_source.md +0 -0
  86. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/examples/examples/custom_targets.md +0 -0
  87. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/examples/examples/document_ai.md +0 -0
  88. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/examples/examples/image_search.md +0 -0
  89. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/examples/examples/manual_extraction.md +0 -0
  90. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/examples/examples/multi_format_index.md +0 -0
  91. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/examples/examples/patient_form_extraction.md +0 -0
  92. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/examples/examples/photo_search.md +0 -0
  93. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/examples/examples/product_recommendation.md +0 -0
  94. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/examples/examples/simple_vector_index.md +0 -0
  95. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/examples/index.md +0 -0
  96. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/getting_started/installation.md +0 -0
  97. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/getting_started/markdown_files.zip +0 -0
  98. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/getting_started/overview.md +0 -0
  99. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/getting_started/quickstart.md +0 -0
  100. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/ops/functions.md +0 -0
  101. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/query.mdx +0 -0
  102. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/sources/amazons3.md +0 -0
  103. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/sources/azureblob.md +0 -0
  104. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/sources/googledrive.md +0 -0
  105. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/sources/localfile.md +0 -0
  106. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/sources/postgres.md +0 -0
  107. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/targets/lancedb.md +0 -0
  108. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/targets/postgres.md +0 -0
  109. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/targets/qdrant.md +0 -0
  110. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/tutorials/live_updates.md +0 -0
  111. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docs/tutorials/manage_flow_dynamically.mdx +0 -0
  112. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/docusaurus.config.ts +0 -0
  113. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/package.json +0 -0
  114. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/sidebars.ts +0 -0
  115. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/src/components/GitHubButton/index.tsx +0 -0
  116. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/src/css/custom.css +0 -0
  117. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/src/theme/DocCard/index.tsx +0 -0
  118. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/src/theme/DocCard/styles.module.css +0 -0
  119. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/src/theme/DocCardList/index.tsx +0 -0
  120. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/src/theme/DocCardList/styles.module.css +0 -0
  121. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/src/theme/Root.js +0 -0
  122. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/.nojekyll +0 -0
  123. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/docusaurus.png +0 -0
  124. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/academic_papers_index/abstract_chunks.png +0 -0
  125. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/academic_papers_index/basic_info.png +0 -0
  126. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/academic_papers_index/chunk_embedding.png +0 -0
  127. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/academic_papers_index/cover.png +0 -0
  128. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/academic_papers_index/first_page.png +0 -0
  129. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/academic_papers_index/flow.png +0 -0
  130. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/academic_papers_index/metadata.png +0 -0
  131. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/codebase_index/chunk.png +0 -0
  132. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/codebase_index/cover.png +0 -0
  133. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/codebase_index/flow.png +0 -0
  134. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/custom_targets/convert.png +0 -0
  135. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/custom_targets/cover.png +0 -0
  136. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/docs_to_knowledge_graph/cover.png +0 -0
  137. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/docs_to_knowledge_graph/dedupe.png +0 -0
  138. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/docs_to_knowledge_graph/export_document.png +0 -0
  139. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/docs_to_knowledge_graph/export_relationship.png +0 -0
  140. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/docs_to_knowledge_graph/extract_relationship.png +0 -0
  141. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/docs_to_knowledge_graph/flow.png +0 -0
  142. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/docs_to_knowledge_graph/neo4j_browser.png +0 -0
  143. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/docs_to_knowledge_graph/relationship.png +0 -0
  144. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/docs_to_knowledge_graph/summary.png +0 -0
  145. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/document_ai/cover.png +0 -0
  146. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/document_ai/document_ai.png +0 -0
  147. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/document_ai/processor.png +0 -0
  148. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/image_search/cover.png +0 -0
  149. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/image_search/embedding.png +0 -0
  150. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/image_search/flow.png +0 -0
  151. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/image_search/multi_modal_architecture.png +0 -0
  152. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/image_search/result.png +0 -0
  153. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/manual_extraction/cover.png +0 -0
  154. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/manual_extraction/extraction.png +0 -0
  155. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/manual_extraction/flow.png +0 -0
  156. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/manual_extraction/summary.png +0 -0
  157. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/multi_format_index/colpali_architecture.png +0 -0
  158. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/multi_format_index/cover.png +0 -0
  159. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/multi_format_index/embed.png +0 -0
  160. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/multi_format_index/flow.png +0 -0
  161. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/multi_format_index/pages.png +0 -0
  162. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/patient_form_extraction/cover.png +0 -0
  163. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/patient_form_extraction/extraction.png +0 -0
  164. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/patient_form_extraction/fields.png +0 -0
  165. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/patient_form_extraction/flow.png +0 -0
  166. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/patient_form_extraction/tomarkdown.png +0 -0
  167. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/photo_search/cover.png +0 -0
  168. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/photo_search/extraction.png +0 -0
  169. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/photo_search/flow.png +0 -0
  170. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/postgres_source/collector.png +0 -0
  171. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/postgres_source/cover.png +0 -0
  172. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/postgres_source/description.png +0 -0
  173. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/postgres_source/embed.png +0 -0
  174. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/postgres_source/flow.png +0 -0
  175. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/postgres_source/lineage.png +0 -0
  176. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/postgres_source/price.png +0 -0
  177. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/postgres_source/source.png +0 -0
  178. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/product_recommendation/cover.png +0 -0
  179. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/product_recommendation/dedupe.png +0 -0
  180. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/product_recommendation/export_all.png +0 -0
  181. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/product_recommendation/export_product.png +0 -0
  182. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/product_recommendation/export_taxonomy.png +0 -0
  183. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/product_recommendation/extract_product.png +0 -0
  184. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/product_recommendation/extract_taxonomy.png +0 -0
  185. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/product_recommendation/neo4j.png +0 -0
  186. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/product_recommendation/parse_json.png +0 -0
  187. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/product_recommendation/taxonomy.png +0 -0
  188. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/simple_vector_index/chunk.png +0 -0
  189. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/simple_vector_index/cover.png +0 -0
  190. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/simple_vector_index/embed.png +0 -0
  191. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/examples/simple_vector_index/flow.png +0 -0
  192. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/favicon.ico +0 -0
  193. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/icon.svg +0 -0
  194. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/img/incremental-etl.gif +0 -0
  195. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/static/robots.txt +0 -0
  196. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/tsconfig.json +0 -0
  197. {cocoindex-0.2.23 → cocoindex-0.3.1}/docs/yarn.lock +0 -0
  198. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/amazon_s3_embedding/.env.example +0 -0
  199. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/amazon_s3_embedding/.gitignore +0 -0
  200. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/amazon_s3_embedding/README.md +0 -0
  201. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/amazon_s3_embedding/main.py +0 -0
  202. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/amazon_s3_embedding/pyproject.toml +0 -0
  203. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/azure_blob_embedding/.env.example +0 -0
  204. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/azure_blob_embedding/.gitignore +0 -0
  205. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/azure_blob_embedding/README.md +0 -0
  206. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/azure_blob_embedding/main.py +0 -0
  207. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/azure_blob_embedding/pyproject.toml +0 -0
  208. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/code_embedding/.env +0 -0
  209. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/code_embedding/README.md +0 -0
  210. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/code_embedding/main.py +0 -0
  211. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/code_embedding/pyproject.toml +0 -0
  212. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/custom_output_files/.env +0 -0
  213. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/custom_output_files/.gitignore +0 -0
  214. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/custom_output_files/README.md +0 -0
  215. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/custom_output_files/data/bizarre_animals.md +0 -0
  216. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/custom_output_files/data/chunk_norris.md +0 -0
  217. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/custom_output_files/main.py +0 -0
  218. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/custom_output_files/pyproject.toml +0 -0
  219. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/custom_source_hn/.env +0 -0
  220. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/custom_source_hn/.env.example +0 -0
  221. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/custom_source_hn/README.md +0 -0
  222. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/custom_source_hn/main.py +0 -0
  223. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/custom_source_hn/pyproject.toml +0 -0
  224. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/docs_to_knowledge_graph/.env +0 -0
  225. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/docs_to_knowledge_graph/README.md +0 -0
  226. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/docs_to_knowledge_graph/main.py +0 -0
  227. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/docs_to_knowledge_graph/pyproject.toml +0 -0
  228. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/face_recognition/.env +0 -0
  229. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/face_recognition/README.md +0 -0
  230. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/face_recognition/images/Carter_welcomes_Reagan.jpg +0 -0
  231. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/face_recognition/images/Solvay_conference_1927.jpg +0 -0
  232. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/face_recognition/images/Steve_Jobs_and_Bill_Gates_(522695099).jpg +0 -0
  233. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/face_recognition/images/einplanck3.jpg +0 -0
  234. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/face_recognition/main.py +0 -0
  235. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/face_recognition/pyproject.toml +0 -0
  236. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/fastapi_server_docker/.dockerignore +0 -0
  237. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/fastapi_server_docker/.env +0 -0
  238. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/fastapi_server_docker/README.md +0 -0
  239. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/fastapi_server_docker/compose.yaml +0 -0
  240. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/fastapi_server_docker/dockerfile +0 -0
  241. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/fastapi_server_docker/files/1810.04805v2.md +0 -0
  242. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/fastapi_server_docker/main.py +0 -0
  243. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/fastapi_server_docker/requirements.txt +0 -0
  244. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/gdrive_text_embedding/.env.example +0 -0
  245. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/gdrive_text_embedding/.gitignore +0 -0
  246. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/gdrive_text_embedding/README.md +0 -0
  247. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/gdrive_text_embedding/main.py +0 -0
  248. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/gdrive_text_embedding/pyproject.toml +0 -0
  249. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/hn_trending_topics/.env.example +0 -0
  250. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/hn_trending_topics/.gitignore +0 -0
  251. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/hn_trending_topics/README.md +0 -0
  252. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/hn_trending_topics/main.py +0 -0
  253. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/hn_trending_topics/pyproject.toml +0 -0
  254. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/image_search/.env +0 -0
  255. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/image_search/README.md +0 -0
  256. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/image_search/colpali_main.py +0 -0
  257. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/image_search/frontend/.gitignore +0 -0
  258. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/image_search/frontend/index.html +0 -0
  259. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/image_search/frontend/package-lock.json +0 -0
  260. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/image_search/frontend/package.json +0 -0
  261. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/image_search/frontend/src/App.jsx +0 -0
  262. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/image_search/frontend/src/main.jsx +0 -0
  263. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/image_search/frontend/src/style.css +0 -0
  264. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/image_search/frontend/vite.config.js +0 -0
  265. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/image_search/img/cat1.jpeg +0 -0
  266. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/image_search/img/dog1.jpeg +0 -0
  267. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/image_search/img/elephant1.jpg +0 -0
  268. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/image_search/img/giraffe.jpg +0 -0
  269. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/image_search/main.py +0 -0
  270. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/image_search/pyproject.toml +0 -0
  271. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/live_updates/.env +0 -0
  272. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/live_updates/README.md +0 -0
  273. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/live_updates/data/bizarre_animals.md +0 -0
  274. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/live_updates/data/chunk_norris.md +0 -0
  275. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/live_updates/main.py +0 -0
  276. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/live_updates/pyproject.toml +0 -0
  277. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/manuals_llm_extraction/.env +0 -0
  278. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/manuals_llm_extraction/README.md +0 -0
  279. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/manuals_llm_extraction/main.py +0 -0
  280. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/manuals_llm_extraction/manuals/array.pdf +0 -0
  281. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/manuals_llm_extraction/manuals/base64.pdf +0 -0
  282. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/manuals_llm_extraction/manuals/copy.pdf +0 -0
  283. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/manuals_llm_extraction/manuals/glob.pdf +0 -0
  284. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/manuals_llm_extraction/pyproject.toml +0 -0
  285. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/multi_format_indexing/.env +0 -0
  286. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/multi_format_indexing/README.md +0 -0
  287. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/multi_format_indexing/main.py +0 -0
  288. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/multi_format_indexing/pyproject.toml +0 -0
  289. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/multi_format_indexing/source_files/1706.03762v7.pdf +0 -0
  290. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/multi_format_indexing/source_files/1810.04805v2.pdf +0 -0
  291. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/multi_format_indexing/source_files/2502.06786v3.pdf +0 -0
  292. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/multi_format_indexing/source_files/healthcare_industry_test_p101.jpg +0 -0
  293. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/multi_format_indexing/source_files/healthcare_industry_test_p86.jpg +0 -0
  294. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/multi_format_indexing/source_files/healthcare_industry_test_p9.jpg +0 -0
  295. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/multi_format_indexing/source_files/restaurant_brands_international_2023.jpg +0 -0
  296. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/multi_format_indexing/source_files/sweetgreen_2023.jpg +0 -0
  297. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/paper_metadata/.env.example +0 -0
  298. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/paper_metadata/.gitignore +0 -0
  299. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/paper_metadata/README.md +0 -0
  300. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/paper_metadata/main.py +0 -0
  301. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/paper_metadata/papers/1706.03762v7.pdf +0 -0
  302. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/paper_metadata/papers/1810.04805v2.pdf +0 -0
  303. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/paper_metadata/papers/2502.06786v3.pdf +0 -0
  304. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/paper_metadata/papers/2502.20346v1.pdf +0 -0
  305. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/paper_metadata/pyproject.toml +0 -0
  306. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/patient_intake_extraction/.env.example +0 -0
  307. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/patient_intake_extraction/README.md +0 -0
  308. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/patient_intake_extraction/data/README.md +0 -0
  309. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/patient_intake_extraction/data/patient_forms/Patient_Intake_Form_David_Artificial.docx +0 -0
  310. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/patient_intake_extraction/data/patient_forms/Patient_Intake_Form_Emily_Artificial.pdf +0 -0
  311. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/patient_intake_extraction/data/patient_forms/Patient_Intake_Form_Joe_Artificial.pdf +0 -0
  312. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/patient_intake_extraction/data/patient_forms/Patient_Intake_From_Jane_Artificial.docx +0 -0
  313. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/patient_intake_extraction/main.py +0 -0
  314. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/patient_intake_extraction/pyproject.toml +0 -0
  315. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/pdf_elements_embedding/.env +0 -0
  316. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/pdf_elements_embedding/.gitignore +0 -0
  317. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/pdf_elements_embedding/README.md +0 -0
  318. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/pdf_elements_embedding/fetch_manual_urls.sh +0 -0
  319. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/pdf_elements_embedding/main.py +0 -0
  320. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/pdf_elements_embedding/pyproject.toml +0 -0
  321. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/pdf_embedding/.env +0 -0
  322. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/pdf_embedding/README.md +0 -0
  323. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/pdf_embedding/main.py +0 -0
  324. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/pdf_embedding/pdf_files/1706.03762v7.pdf +0 -0
  325. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/pdf_embedding/pdf_files/1810.04805v2.pdf +0 -0
  326. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/pdf_embedding/pdf_files/rfc8259.pdf +0 -0
  327. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/pdf_embedding/pyproject.toml +0 -0
  328. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/postgres_source/.env +0 -0
  329. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/postgres_source/README.md +0 -0
  330. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/postgres_source/main.py +0 -0
  331. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/postgres_source/prepare_source_data.sql +0 -0
  332. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/postgres_source/pyproject.toml +0 -0
  333. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/product_recommendation/.env.example +0 -0
  334. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/product_recommendation/.gitignore +0 -0
  335. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/product_recommendation/img/cocoinsight.png +0 -0
  336. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/product_recommendation/img/neo4j.png +0 -0
  337. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/product_recommendation/main.py +0 -0
  338. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/product_recommendation/products/p1.json +0 -0
  339. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/product_recommendation/products/p2.json +0 -0
  340. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/product_recommendation/products/p3.json +0 -0
  341. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/product_recommendation/products/p4.json +0 -0
  342. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/product_recommendation/products/p5.json +0 -0
  343. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/product_recommendation/products/p6.json +0 -0
  344. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/product_recommendation/products/p7.json +0 -0
  345. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/product_recommendation/products/p8.json +0 -0
  346. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/product_recommendation/products/p9.json +0 -0
  347. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/product_recommendation/pyproject.toml +0 -0
  348. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/text_embedding/.env +0 -0
  349. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/text_embedding/README.md +0 -0
  350. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/text_embedding/Text_Embedding.ipynb +0 -0
  351. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/text_embedding/main.py +0 -0
  352. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/text_embedding/markdown_files/1706.03762v7.md +0 -0
  353. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/text_embedding/markdown_files/1810.04805v2.md +0 -0
  354. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/text_embedding/markdown_files/rfc8259.md +0 -0
  355. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/text_embedding/pyproject.toml +0 -0
  356. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/text_embedding_lancedb/.env +0 -0
  357. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/text_embedding_lancedb/.gitignore +0 -0
  358. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/text_embedding_lancedb/README.md +0 -0
  359. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/text_embedding_lancedb/main.py +0 -0
  360. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/text_embedding_lancedb/markdown_files/rfc8259.md +0 -0
  361. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/text_embedding_lancedb/pyproject.toml +0 -0
  362. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/text_embedding_qdrant/.env +0 -0
  363. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/text_embedding_qdrant/README.md +0 -0
  364. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/text_embedding_qdrant/main.py +0 -0
  365. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/text_embedding_qdrant/markdown_files/rfc8259.md +0 -0
  366. {cocoindex-0.2.23 → cocoindex-0.3.1}/examples/text_embedding_qdrant/pyproject.toml +0 -0
  367. {cocoindex-0.2.23 → cocoindex-0.3.1}/pyproject.toml +0 -0
  368. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/__init__.py +0 -0
  369. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/auth_registry.py +0 -0
  370. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/cli.py +0 -0
  371. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/engine_object.py +0 -0
  372. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/engine_value.py +0 -0
  373. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/flow.py +0 -0
  374. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/functions/__init__.py +0 -0
  375. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/functions/_engine_builtin_specs.py +0 -0
  376. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/index.py +0 -0
  377. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/lib.py +0 -0
  378. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/llm.py +0 -0
  379. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/py.typed +0 -0
  380. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/query_handler.py +0 -0
  381. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/setting.py +0 -0
  382. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/setup.py +0 -0
  383. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/sources/__init__.py +0 -0
  384. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/sources/_engine_builtin_specs.py +0 -0
  385. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/targets/__init__.py +0 -0
  386. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/targets/_engine_builtin_specs.py +0 -0
  387. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/targets/lancedb.py +0 -0
  388. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/tests/__init__.py +0 -0
  389. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/tests/test_engine_object.py +0 -0
  390. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/tests/test_engine_value.py +0 -0
  391. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/tests/test_optional_database.py +0 -0
  392. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/tests/test_transform_flow.py +0 -0
  393. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/tests/test_typing.py +0 -0
  394. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/tests/test_validation.py +0 -0
  395. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/typing.py +0 -0
  396. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/user_app_loader.py +0 -0
  397. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/utils.py +0 -0
  398. {cocoindex-0.2.23 → cocoindex-0.3.1}/python/cocoindex/validation.py +0 -0
  399. {cocoindex-0.2.23 → cocoindex-0.3.1}/ruff.toml +0 -0
  400. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/base/duration.rs +0 -0
  401. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/base/field_attrs.rs +0 -0
  402. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/base/json_schema.rs +0 -0
  403. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/base/mod.rs +0 -0
  404. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/base/schema.rs +0 -0
  405. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/base/spec.rs +0 -0
  406. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/base/value.rs +0 -0
  407. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/builder/analyzed_flow.rs +0 -0
  408. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/builder/analyzer.rs +0 -0
  409. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/builder/exec_ctx.rs +0 -0
  410. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/builder/flow_builder.rs +0 -0
  411. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/builder/mod.rs +0 -0
  412. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/builder/plan.rs +0 -0
  413. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/execution/db_tracking.rs +0 -0
  414. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/execution/db_tracking_setup.rs +0 -0
  415. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/execution/dumper.rs +0 -0
  416. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/execution/evaluator.rs +0 -0
  417. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/execution/indexing_status.rs +0 -0
  418. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/execution/memoization.rs +0 -0
  419. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/execution/mod.rs +0 -0
  420. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/execution/row_indexer.rs +0 -0
  421. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/execution/stats.rs +0 -0
  422. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/lib.rs +0 -0
  423. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/llm/litellm.rs +0 -0
  424. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/llm/openrouter.rs +0 -0
  425. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/llm/vllm.rs +0 -0
  426. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/functions/detect_program_lang.rs +0 -0
  427. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/functions/extract_by_llm.rs +0 -0
  428. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/functions/mod.rs +0 -0
  429. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/functions/parse_json.rs +0 -0
  430. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/functions/split_by_separators.rs +0 -0
  431. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/functions/split_recursively.rs +0 -0
  432. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/functions/test_utils.rs +0 -0
  433. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/interface.rs +0 -0
  434. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/mod.rs +0 -0
  435. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/registration.rs +0 -0
  436. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/registry.rs +0 -0
  437. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/sdk.rs +0 -0
  438. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/shared/mod.rs +0 -0
  439. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/shared/postgres.rs +0 -0
  440. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/shared/program_langs.rs +0 -0
  441. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/shared/split.rs +0 -0
  442. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/sources/amazon_s3.rs +0 -0
  443. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/sources/azure_blob.rs +0 -0
  444. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/sources/google_drive.rs +0 -0
  445. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/sources/local_file.rs +0 -0
  446. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/sources/mod.rs +0 -0
  447. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/sources/postgres.rs +0 -0
  448. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/sources/shared/mod.rs +0 -0
  449. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/sources/shared/pattern_matcher.rs +0 -0
  450. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/targets/mod.rs +0 -0
  451. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/targets/neo4j.rs +0 -0
  452. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/targets/postgres.rs +0 -0
  453. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/targets/qdrant.rs +0 -0
  454. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/targets/shared/mod.rs +0 -0
  455. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/targets/shared/property_graph.rs +0 -0
  456. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/ops/targets/shared/table_columns.rs +0 -0
  457. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/py/convert.rs +0 -0
  458. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/server.rs +0 -0
  459. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/service/mod.rs +0 -0
  460. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/service/query_handler.rs +0 -0
  461. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/settings.rs +0 -0
  462. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/setup/auth_registry.rs +0 -0
  463. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/setup/components.rs +0 -0
  464. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/setup/db_metadata.rs +0 -0
  465. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/setup/driver.rs +0 -0
  466. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/setup/flow_features.rs +0 -0
  467. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/setup/mod.rs +0 -0
  468. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/setup/states.rs +0 -0
  469. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/utils/bytes_decode.rs +0 -0
  470. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/utils/concur_control.rs +0 -0
  471. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/utils/db.rs +0 -0
  472. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/utils/deser.rs +0 -0
  473. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/utils/fingerprint.rs +0 -0
  474. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/utils/immutable.rs +0 -0
  475. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/utils/retryable.rs +0 -0
  476. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/utils/str_sanitize.rs +0 -0
  477. {cocoindex-0.2.23 → cocoindex-0.3.1}/src/utils/yaml_ser.rs +0 -0
@@ -76,3 +76,4 @@ repos:
76
76
  types: [python]
77
77
  pass_filenames: false
78
78
  always_run: false
79
+ args: ["python"]
@@ -1298,7 +1298,7 @@ dependencies = [
1298
1298
 
1299
1299
  [[package]]
1300
1300
  name = "cocoindex"
1301
- version = "0.2.23"
1301
+ version = "0.3.1"
1302
1302
  dependencies = [
1303
1303
  "anyhow",
1304
1304
  "async-openai",
@@ -1363,6 +1363,7 @@ dependencies = [
1363
1363
  "time",
1364
1364
  "tokio",
1365
1365
  "tokio-stream",
1366
+ "tokio-util",
1366
1367
  "tower 0.5.2",
1367
1368
  "tower-http",
1368
1369
  "tree-sitter",
@@ -5667,6 +5668,7 @@ dependencies = [
5667
5668
  "bytes",
5668
5669
  "futures-core",
5669
5670
  "futures-sink",
5671
+ "futures-util",
5670
5672
  "pin-project-lite",
5671
5673
  "tokio",
5672
5674
  ]
@@ -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.2.23"
5
+ version = "0.3.1"
6
6
  edition = "2024"
7
7
  rust-version = "1.89"
8
8
  license = "Apache-2.0"
@@ -157,3 +157,4 @@ serde_path_to_error = "0.1.17"
157
157
  redis = { version = "0.31.0", features = ["tokio-comp", "connection-manager"] }
158
158
  expect-test = "1.5.0"
159
159
  encoding_rs = "0.8.35"
160
+ tokio-util = { version = "0.7.16", features = ["rt"] }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cocoindex
3
- Version: 0.2.23
3
+ Version: 0.3.1
4
4
  Classifier: Development Status :: 3 - Alpha
5
5
  Classifier: License :: OSI Approved :: Apache Software License
6
6
  Classifier: Operating System :: OS Independent
@@ -2846,7 +2846,7 @@ Software.
2846
2846
  <h3 id="Apache-2.0">Apache License 2.0</h3>
2847
2847
  <h4>Used by:</h4>
2848
2848
  <ul class="license-used-by">
2849
- <li><a href=" https://crates.io/crates/cocoindex ">cocoindex 0.2.23</a></li>
2849
+ <li><a href=" https://crates.io/crates/cocoindex ">cocoindex 0.3.1</a></li>
2850
2850
  <li><a href=" https://github.com/awesomized/crc-fast-rust ">crc-fast 1.3.0</a></li>
2851
2851
  <li><a href=" https://github.com/qdrant/rust-client ">qdrant-client 1.15.0</a></li>
2852
2852
  </ul>
@@ -8,8 +8,8 @@ import TabItem from '@theme/TabItem';
8
8
 
9
9
  A custom function can be defined in one of the following ways:
10
10
 
11
- * A standalone function. It's simpler and doesn't allow additional configurations and setup logic.
12
- * A function spec and an executor. It's more powerful, allows additional configurations and setup logic.
11
+ * A standalone function. It's simpler and doesn't allow additional configurations and setup logic.
12
+ * A function spec and an executor. It's more powerful, allows additional configurations and setup logic.
13
13
 
14
14
  ## Option 1: By a standalone function
15
15
 
@@ -31,9 +31,9 @@ def compute_something(arg1: str, arg2: int | None = None) -> str:
31
31
 
32
32
  Notes:
33
33
 
34
- * The `cocoindex.op.function()` function decorator also takes optional parameters.
34
+ * The `cocoindex.op.function()` function decorator also takes optional parameters.
35
35
  See [Parameters for custom functions](#parameters-for-custom-functions) for details.
36
- * Types of arguments and the return value must be annotated, so that CocoIndex will have information about data types of the operation's output fields.
36
+ * Types of arguments and the return value must be annotated, so that CocoIndex will have information about data types of the operation's output fields.
37
37
  See [Data Types](/docs/core/data_types) for supported types.
38
38
 
39
39
  </TabItem>
@@ -43,12 +43,11 @@ Notes:
43
43
 
44
44
  The cocoindex repository contains the following examples of custom functions defined in this way:
45
45
 
46
- * In the [code_embedding](https://github.com/cocoindex-io/cocoindex/blob/main/examples/code_embedding/main.py) example,
46
+ * In the [code_embedding](https://github.com/cocoindex-io/cocoindex/blob/main/examples/code_embedding/main.py) example,
47
47
  `extract_extension` is a custom function to extract the extension of a file name.
48
- * In the [manuals_llm_extraction](https://github.com/cocoindex-io/cocoindex/blob/main/examples/manuals_llm_extraction/main.py) example,
48
+ * In the [manuals_llm_extraction](https://github.com/cocoindex-io/cocoindex/blob/main/examples/manuals_llm_extraction/main.py) example,
49
49
  `summarize_manuals` is a custom function to summarize structured information of a manual page.
50
50
 
51
-
52
51
  ## Option 2: By a function spec and an executor
53
52
 
54
53
  This is more advanced and flexible way to define a custom function.
@@ -75,30 +74,29 @@ class ComputeSomething(cocoindex.op.FunctionSpec):
75
74
  ```
76
75
 
77
76
  Notes:
78
- * All fields of the spec must have a type serializable / deserializable by the `json` module.
79
- * All subclasses of `FunctionSpec` can be instantiated similar to a dataclass, i.e. `ClassName(param1=value1, param2=value2, ...)`.
77
+
78
+ * All fields of the spec must have a type serializable / deserializable by the `json` module.
79
+ * All subclasses of `FunctionSpec` can be instantiated similar to a dataclass, i.e. `ClassName(param1=value1, param2=value2, ...)`.
80
80
 
81
81
  </TabItem>
82
82
  </Tabs>
83
83
 
84
-
85
84
  ### Function Executor
86
85
 
87
86
  A function executor defines behavior of a function. It's instantiated for each operation that uses this function.
88
87
 
89
88
  The function executor is responsible for:
90
89
 
91
- * *Prepare* for the function execution, based on the spec.
90
+ * *Prepare* for the function execution, based on the spec.
92
91
  It happens once and only once before execution.
93
92
  e.g. if the function calls a machine learning model, the model name can be a parameter as a field of the spec, and we may load the model in this phase.
94
- * *Run* the function, for each specific input arguments. This happens multiple times, for each specific row of data.
93
+ * *Run* the function, for each specific input arguments. This happens multiple times, for each specific row of data.
95
94
 
96
95
  <Tabs>
97
96
  <TabItem value="python" label="Python" default>
98
97
 
99
98
  A function executor is defined as a class decorated by `@cocoindex.op.executor_class()`.
100
99
 
101
-
102
100
  ```python
103
101
  @cocoindex.op.executor_class(...)
104
102
  class ComputeSomethingExecutor:
@@ -114,12 +112,12 @@ class ComputeSomethingExecutor:
114
112
 
115
113
  Notes:
116
114
 
117
- * The `cocoindex.op.executor_class()` class decorator also takes optional parameters.
115
+ * The `cocoindex.op.executor_class()` class decorator also takes optional parameters.
118
116
  See [Parameters for custom functions](#parameters-for-custom-functions) for details.
119
117
 
120
- * A `spec` field must be present in the class, and must be annotated with the spec class name.
121
- * The `prepare()` method is optional. It's executed once and only once before any `__call__` execution, to prepare the function execution.
122
- * The `__call__()` method is required. It's executed for each specific rows of data.
118
+ * A `spec` field must be present in the class, and must be annotated with the spec class name.
119
+ * The `prepare()` method is optional. It's executed once and only once before any `__call__` execution, to prepare the function execution.
120
+ * The `__call__()` method is required. It's executed for each specific rows of data.
123
121
  Types of arugments and the return value must be decorated, so that CocoIndex will have information about data types of the operation's output fields.
124
122
  See [Data Types](/docs/core/data_types) for supported types.
125
123
 
@@ -130,34 +128,37 @@ Notes:
130
128
 
131
129
  The cocoindex repository contains the following examples of custom functions defined in this way:
132
130
 
133
- * In the [pdf_embedding](https://github.com/cocoindex-io/cocoindex/blob/main/examples/pdf_embedding/main.py) example, we define a custom function `PdfToMarkdown`
134
- * The `SentenceTransformerEmbed` function shipped with the CocoIndex Python package is defined by Python SDK.
131
+ * In the [pdf_embedding](https://github.com/cocoindex-io/cocoindex/blob/main/examples/pdf_embedding/main.py) example, we define a custom function `PdfToMarkdown`
132
+ * The `SentenceTransformerEmbed` function shipped with the CocoIndex Python package is defined by Python SDK.
135
133
  Search for [`SentenceTransformerEmbedExecutor`](https://github.com/search?q=repo%3Acocoindex-io%2Fcocoindex+lang%3Apython+SentenceTransformerEmbedExecutor&type=code) to see the code.
136
134
 
137
135
  ## Parameters for custom functions
138
136
 
139
137
  Custom functions take the following additional parameters:
140
138
 
141
- * `gpu: bool`: Whether the executor will use GPU. It will affect the way the function is scheduled.
139
+ * `gpu: bool`: Whether the executor will use GPU. It will affect the way the function is scheduled.
142
140
 
143
- * `cache: bool`: Whether the executor will enable cache for this function.
141
+ * `cache: bool`: Whether the executor will enable cache for this function.
144
142
  When `True`, the executor will cache the result of the function for reuse during reprocessing.
145
143
  We recommend to set this to `True` for any function that is computationally intensive.
146
144
 
147
- * `behavior_version: int`: The version of the behavior of the function.
145
+ * `batching: bool`: Whether the executor will consume requests in batch.
146
+ See the [Batching](#batching) section below for details.
147
+
148
+ * `behavior_version: int`: The version of the behavior of the function.
148
149
  When the version is changed, the function will be re-executed even if cache is enabled.
149
150
  It's required to be set if `cache` is `True`.
150
151
 
151
- * `arg_relationship: tuple[ArgRelationship, str]`: It specifies the relationship between an input argument and the output,
152
+ * `arg_relationship: tuple[ArgRelationship, str]`: It specifies the relationship between an input argument and the output,
152
153
  e.g. `(ArgRelationship.CHUNKS_BASE_TEXT, "content")` means the output is chunks for the text represented by the
153
154
  input argument with name `content`.
154
155
  This provides metadata for tools, e.g. CocoInsight.
155
156
  Currently the following attributes are supported:
156
157
 
157
- * `ArgRelationship.CHUNKS_BASE_TEXT`:
158
+ * `ArgRelationship.CHUNKS_BASE_TEXT`:
158
159
  The output is chunks for the text represented by the input argument. In this case, the output is expected to be a *Table*, whose each row represents a text chunk, and the first column has type *Range*, representing the range of the text chunk.
159
- * `ArgRelationship.EMBEDDING_ORIGIN_TEXT`: The output is embedding vector for the text represented by the input argument. The output is expected to be a *Vector*.
160
- * `ArgRelationship.RECTS_BASE_IMAGE`: The output is rectangles for the image represented by the input argument. The output is expected to be a *Table*, whose each row represents a rectangle, and the first column has type *Struct*, with fields `min_x`, `min_y`, `max_x`, `max_y` to represent the coordinates of the rectangle.
160
+ * `ArgRelationship.EMBEDDING_ORIGIN_TEXT`: The output is embedding vector for the text represented by the input argument. The output is expected to be a *Vector*.
161
+ * `ArgRelationship.RECTS_BASE_IMAGE`: The output is rectangles for the image represented by the input argument. The output is expected to be a *Table*, whose each row represents a rectangle, and the first column has type *Struct*, with fields `min_x`, `min_y`, `max_x`, `max_y` to represent the coordinates of the rectangle.
161
162
 
162
163
  For example:
163
164
 
@@ -187,3 +188,38 @@ class ComputeSomethingExecutor:
187
188
 
188
189
  </TabItem>
189
190
  </Tabs>
191
+
192
+ ## Batching
193
+
194
+ Batching allows a function executor to process multiple function calls in batch.
195
+ Sometimes batching is more efficient than processing them one by one, e.g. running inference on GPU, calling remote APIs with quota limits, etc.
196
+
197
+ Batching can be enabled by setting the `batching` parameter to `True` in custom function parameters.
198
+ Once it's set to `True`, type of the argument and return value must be a `list`.
199
+ Currently we only support batching functions taking a single argument.
200
+
201
+ <Tabs>
202
+ <TabItem value="python" label="Python" default>
203
+
204
+ For example, for a CocoIndex custom function taking `str` as argument and returning `str` as result, it can be defined as:
205
+
206
+ ```python
207
+ @cocoindex.op.function(batching=True)
208
+ def compute_something(args: list[str]) -> list[str]:
209
+ ...
210
+ ```
211
+
212
+ or for such a function defined by an executor:
213
+
214
+ ```python
215
+ @cocoindex.op.executor_class(batching=True)
216
+ class ComputeSomethingExecutor:
217
+ spec: ComputeSomething
218
+ ...
219
+
220
+ def __call__(self, args: list[str]) -> list[str]:
221
+ ...
222
+ ```
223
+
224
+ </TabItem>
225
+ </Tabs>
@@ -373,4 +373,4 @@ You can open it at [http://localhost:7474](http://localhost:7474), and run the f
373
373
  MATCH p=()-->() RETURN p
374
374
  ```
375
375
 
376
- ![Neo4j Browser](/img/examples/docs_to_knowledge_graph/neo4j_browser.png)
376
+ ![Neo4j Browser](/img/examples/docs_to_knowledge_graph/neo4j_browser.png)
@@ -17,6 +17,6 @@ In CocoIndex, a source is the data origin you import from (e.g., files, database
17
17
  | [Postgres](/docs/sources/postgres) | Relational database (Postgres) |
18
18
 
19
19
  Related:
20
- - [Life cycle of a indexing flow](/docs/core/basics#life-cycle-of-an-indexing-flow)
21
- - [Live Update Tutorial](/docs/tutorials/live_updates)
20
+ - [Life cycle of a indexing flow](/docs/core/basics#life-cycle-of-an-indexing-flow)
21
+ - [Live Update Tutorial](/docs/tutorials/live_updates)
22
22
  for change capture mechanisms.
@@ -334,6 +334,3 @@ You can find end-to-end examples fitting into any of supported property graphs i
334
334
  * <ExampleButton href="https://github.com/cocoindex-io/cocoindex/tree/main/examples/docs_to_knowledge_graph" text="Docs to Knowledge Graph" margin="0 0 16px 0" />
335
335
 
336
336
  * <ExampleButton href="https://github.com/cocoindex-io/cocoindex/tree/main/examples/product_recommendation" text="Product Recommendation" margin="0 0 16px 0" />
337
-
338
-
339
-
@@ -13,7 +13,7 @@ Exports data to a [Kuzu](https://kuzu.com/) graph database.
13
13
 
14
14
  ## Get Started
15
15
 
16
- Read [Property Graph Targets](./index.md#property-graph-targets) for more information to get started on how it works in CocoIndex.
16
+ Read [Property Graph Targets](./index.md#property-graph-targets) for more information to get started on how it works in CocoIndex.
17
17
 
18
18
  ## Spec
19
19
 
@@ -59,4 +59,4 @@ You can then access the explorer at [http://localhost:8124](http://localhost:812
59
59
  href="https://github.com/cocoindex-io/cocoindex/tree/main/examples/docs_to_knowledge_graph"
60
60
  text="Docs to Knowledge Graph"
61
61
  margin="16px 0 24px 0"
62
- />
62
+ />
@@ -11,7 +11,7 @@ import { ExampleButton } from '../../src/components/GitHubButton';
11
11
 
12
12
 
13
13
  ## Get Started
14
- Read [Property Graph Targets](./index.md#property-graph-targets) for more information to get started on how it works in CocoIndex.
14
+ Read [Property Graph Targets](./index.md#property-graph-targets) for more information to get started on how it works in CocoIndex.
15
15
 
16
16
 
17
17
  ## Spec
@@ -59,4 +59,4 @@ If you are building multiple CocoIndex flows from different projects to neo4j, w
59
59
 
60
60
  This way, you can clean up the data for each flow independently.
61
61
 
62
- In case you need to clean up the data in the same database, you can do it manually by running `cocoindex drop <APP_TARGET>` from the project you want to clean up.
62
+ In case you need to clean up the data in the same database, you can do it manually by running `cocoindex drop <APP_TARGET>` from the project you want to clean up.
@@ -8,7 +8,7 @@ Please drop [CocoIndex on Github](https://github.com/cocoindex-io/cocoindex) a s
8
8
 
9
9
 
10
10
  ## Prerequisite
11
- * [Install Postgres](https://cocoindex.io/docs/getting_started/installation#-install-postgres)
11
+ * [Install Postgres](https://cocoindex.io/docs/getting_started/installation#-install-postgres)
12
12
  * Install [Neo4j](https://cocoindex.io/docs/targets/neo4j)
13
13
  * [Configure your OpenAI API key](https://cocoindex.io/docs/ai/llm#openai).
14
14
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  import functools
4
4
  from dataclasses import dataclass
5
- from typing import Any, Optional, TYPE_CHECKING, Literal
5
+ from typing import Any, TYPE_CHECKING, Literal
6
6
  import numpy as np
7
7
 
8
8
  from .. import op
@@ -22,18 +22,11 @@ class ColPaliModelInfo:
22
22
  dimension: int
23
23
 
24
24
 
25
- @functools.lru_cache(maxsize=None)
25
+ @functools.cache
26
26
  def _get_colpali_model_and_processor(model_name: str) -> ColPaliModelInfo:
27
27
  """Load and cache ColPali model and processor with shared device setup."""
28
28
  try:
29
- from colpali_engine import ( # type: ignore[import-untyped]
30
- ColPali,
31
- ColPaliProcessor,
32
- ColQwen2,
33
- ColQwen2Processor,
34
- ColSmol,
35
- ColSmolProcessor,
36
- )
29
+ import colpali_engine as ce # type: ignore[import-untyped]
37
30
  import torch
38
31
  except ImportError as e:
39
32
  raise ImportError(
@@ -42,29 +35,30 @@ def _get_colpali_model_and_processor(model_name: str) -> ColPaliModelInfo:
42
35
  ) from e
43
36
 
44
37
  device = "cuda" if torch.cuda.is_available() else "cpu"
38
+ lower_model_name = model_name.lower()
45
39
 
46
40
  # Determine model type from name
47
- if "colpali" in model_name.lower():
48
- model = ColPali.from_pretrained(
41
+ if lower_model_name.startswith("colpali"):
42
+ model = ce.ColPali.from_pretrained(
49
43
  model_name, torch_dtype=torch.bfloat16, device_map=device
50
44
  )
51
- processor = ColPaliProcessor.from_pretrained(model_name)
52
- elif "colqwen" in model_name.lower():
53
- model = ColQwen2.from_pretrained(
45
+ processor = ce.ColPaliProcessor.from_pretrained(model_name)
46
+ elif lower_model_name.startswith("colqwen2.5"):
47
+ model = ce.ColQwen2_5.from_pretrained(
54
48
  model_name, torch_dtype=torch.bfloat16, device_map=device
55
49
  )
56
- processor = ColQwen2Processor.from_pretrained(model_name)
57
- elif "colsmol" in model_name.lower():
58
- model = ColSmol.from_pretrained(
50
+ processor = ce.ColQwen2_5_Processor.from_pretrained(model_name)
51
+ elif lower_model_name.startswith("colqwen"):
52
+ model = ce.ColQwen2.from_pretrained(
59
53
  model_name, torch_dtype=torch.bfloat16, device_map=device
60
54
  )
61
- processor = ColSmolProcessor.from_pretrained(model_name)
55
+ processor = ce.ColQwen2Processor.from_pretrained(model_name)
62
56
  else:
63
57
  # Fallback to ColPali for backwards compatibility
64
- model = ColPali.from_pretrained(
58
+ model = ce.ColPali.from_pretrained(
65
59
  model_name, torch_dtype=torch.bfloat16, device_map=device
66
60
  )
67
- processor = ColPaliProcessor.from_pretrained(model_name)
61
+ processor = ce.ColPaliProcessor.from_pretrained(model_name)
68
62
 
69
63
  # Detect dimension
70
64
  dimension = _detect_colpali_dimension(model, processor, device)
@@ -130,6 +124,7 @@ class ColPaliEmbedImage(op.FunctionSpec):
130
124
  @op.executor_class(
131
125
  gpu=True,
132
126
  cache=True,
127
+ batching=True,
133
128
  behavior_version=1,
134
129
  )
135
130
  class ColPaliEmbedImageExecutor:
@@ -146,7 +141,7 @@ class ColPaliEmbedImageExecutor:
146
141
  dimension = self._model_info.dimension
147
142
  return Vector[Vector[np.float32, Literal[dimension]]] # type: ignore
148
143
 
149
- def __call__(self, img_bytes: bytes) -> Any:
144
+ def __call__(self, img_bytes_list: list[bytes]) -> Any:
150
145
  try:
151
146
  from PIL import Image
152
147
  import torch
@@ -160,8 +155,11 @@ class ColPaliEmbedImageExecutor:
160
155
  processor = self._model_info.processor
161
156
  device = self._model_info.device
162
157
 
163
- pil_image = Image.open(io.BytesIO(img_bytes)).convert("RGB")
164
- inputs = processor.process_images([pil_image]).to(device)
158
+ pil_images = [
159
+ Image.open(io.BytesIO(img_bytes)).convert("RGB")
160
+ for img_bytes in img_bytes_list
161
+ ]
162
+ inputs = processor.process_images(pil_images).to(device)
165
163
  with torch.no_grad():
166
164
  embeddings = model(**inputs)
167
165
 
@@ -171,10 +169,8 @@ class ColPaliEmbedImageExecutor:
171
169
  f"Expected 3D tensor [batch, patches, hidden_dim], got shape {embeddings.shape}"
172
170
  )
173
171
 
174
- # Keep patch-level embeddings: [batch, patches, hidden_dim] -> [patches, hidden_dim]
175
- patch_embeddings = embeddings[0] # Remove batch dimension
176
-
177
- return patch_embeddings.cpu().to(torch.float32).numpy()
172
+ # [patches, hidden_dim]
173
+ return embeddings.cpu().to(torch.float32).numpy()
178
174
 
179
175
 
180
176
  class ColPaliEmbedQuery(op.FunctionSpec):
@@ -207,6 +203,7 @@ class ColPaliEmbedQuery(op.FunctionSpec):
207
203
  gpu=True,
208
204
  cache=True,
209
205
  behavior_version=1,
206
+ batching=True,
210
207
  )
211
208
  class ColPaliEmbedQueryExecutor:
212
209
  """Executor for ColVision query embedding (ColPali, ColQwen2, ColSmol, etc.)."""
@@ -222,7 +219,7 @@ class ColPaliEmbedQueryExecutor:
222
219
  dimension = self._model_info.dimension
223
220
  return Vector[Vector[np.float32, Literal[dimension]]] # type: ignore
224
221
 
225
- def __call__(self, query: str) -> Any:
222
+ def __call__(self, queries: list[str]) -> Any:
226
223
  try:
227
224
  import torch
228
225
  except ImportError as e:
@@ -234,7 +231,7 @@ class ColPaliEmbedQueryExecutor:
234
231
  processor = self._model_info.processor
235
232
  device = self._model_info.device
236
233
 
237
- inputs = processor.process_queries([query]).to(device)
234
+ inputs = processor.process_queries(queries).to(device)
238
235
  with torch.no_grad():
239
236
  embeddings = model(**inputs)
240
237
 
@@ -244,7 +241,5 @@ class ColPaliEmbedQueryExecutor:
244
241
  f"Expected 3D tensor [batch, tokens, hidden_dim], got shape {embeddings.shape}"
245
242
  )
246
243
 
247
- # Keep token-level embeddings: [batch, tokens, hidden_dim] -> [tokens, hidden_dim]
248
- token_embeddings = embeddings[0] # Remove batch dimension
249
-
250
- return token_embeddings.cpu().to(torch.float32).numpy()
244
+ # [tokens, hidden_dim]
245
+ return embeddings.cpu().to(torch.float32).numpy()
@@ -31,6 +31,7 @@ class SentenceTransformerEmbed(op.FunctionSpec):
31
31
  @op.executor_class(
32
32
  gpu=True,
33
33
  cache=True,
34
+ batching=True,
34
35
  behavior_version=1,
35
36
  arg_relationship=(op.ArgRelationship.EMBEDDING_ORIGIN_TEXT, "text"),
36
37
  )
@@ -57,7 +58,9 @@ class SentenceTransformerEmbedExecutor:
57
58
  dim = self._model.get_sentence_embedding_dimension()
58
59
  return Vector[np.float32, Literal[dim]] # type: ignore
59
60
 
60
- def __call__(self, text: str) -> NDArray[np.float32]:
61
+ def __call__(self, text: list[str]) -> list[NDArray[np.float32]]:
61
62
  assert self._model is not None
62
- result: NDArray[np.float32] = self._model.encode(text, convert_to_numpy=True)
63
- return result
63
+ results: list[NDArray[np.float32]] = self._model.encode(
64
+ text, convert_to_numpy=True
65
+ )
66
+ return results
@@ -32,6 +32,7 @@ from .engine_value import (
32
32
  )
33
33
  from .typing import (
34
34
  KEY_FIELD_NAME,
35
+ AnalyzedListType,
35
36
  AnalyzedTypeInfo,
36
37
  StructSchema,
37
38
  StructType,
@@ -45,6 +46,7 @@ from .typing import (
45
46
  EnrichedValueType,
46
47
  decode_engine_field_schemas,
47
48
  FieldSchema,
49
+ ValueType,
48
50
  )
49
51
  from .runtime import to_async_call
50
52
  from .index import IndexOptions
@@ -149,6 +151,7 @@ class OpArgs:
149
151
  """
150
152
  - gpu: Whether the executor will be executed on GPU.
151
153
  - cache: Whether the executor will be cached.
154
+ - batching: Whether the executor will be batched.
152
155
  - behavior_version: The behavior version of the executor. Cache will be invalidated if it
153
156
  changes. Must be provided if `cache` is True.
154
157
  - arg_relationship: It specifies the relationship between an input argument and the output,
@@ -158,6 +161,7 @@ class OpArgs:
158
161
 
159
162
  gpu: bool = False
160
163
  cache: bool = False
164
+ batching: bool = False
161
165
  behavior_version: int | None = None
162
166
  arg_relationship: tuple[ArgRelationship, str] | None = None
163
167
 
@@ -168,6 +172,16 @@ class _ArgInfo:
168
172
  is_required: bool
169
173
 
170
174
 
175
+ def _make_batched_engine_value_decoder(
176
+ field_path: list[str], src_type: ValueType, dst_type_info: AnalyzedTypeInfo
177
+ ) -> Callable[[Any], Any]:
178
+ if not isinstance(dst_type_info.variant, AnalyzedListType):
179
+ raise ValueError("Expected arguments for batching function to be a list type")
180
+ elem_type_info = analyze_type_info(dst_type_info.variant.elem_type)
181
+ base_decoder = make_engine_value_decoder(field_path, src_type, elem_type_info)
182
+ return lambda value: [base_decoder(v) for v in value]
183
+
184
+
171
185
  def _register_op_factory(
172
186
  category: OpCategory,
173
187
  expected_args: list[tuple[str, inspect.Parameter]],
@@ -181,6 +195,10 @@ def _register_op_factory(
181
195
  Register an op factory.
182
196
  """
183
197
 
198
+ if op_args.batching:
199
+ if len(expected_args) != 1:
200
+ raise ValueError("Batching is only supported for single argument functions")
201
+
184
202
  class _WrappedExecutor:
185
203
  _executor: Any
186
204
  _args_info: list[_ArgInfo]
@@ -208,7 +226,7 @@ def _register_op_factory(
208
226
  """
209
227
  self._args_info = []
210
228
  self._kwargs_info = {}
211
- attributes = []
229
+ attributes = {}
212
230
  potentially_missing_required_arg = False
213
231
 
214
232
  def process_arg(
@@ -220,14 +238,17 @@ def _register_op_factory(
220
238
  if op_args.arg_relationship is not None:
221
239
  related_attr, related_arg_name = op_args.arg_relationship
222
240
  if related_arg_name == arg_name:
223
- attributes.append(
224
- TypeAttr(related_attr.value, actual_arg.analyzed_value)
225
- )
241
+ attributes[related_attr.value] = actual_arg.analyzed_value
226
242
  type_info = analyze_type_info(arg_param.annotation)
227
243
  enriched = EnrichedValueType.decode(actual_arg.value_type)
228
- decoder = make_engine_value_decoder(
229
- [arg_name], enriched.type, type_info
230
- )
244
+ if op_args.batching:
245
+ decoder = _make_batched_engine_value_decoder(
246
+ [arg_name], enriched.type, type_info
247
+ )
248
+ else:
249
+ decoder = make_engine_value_decoder(
250
+ [arg_name], enriched.type, type_info
251
+ )
231
252
  is_required = not type_info.nullable
232
253
  if is_required and actual_arg.value_type.get("nullable", False):
233
254
  potentially_missing_required_arg = True
@@ -302,20 +323,32 @@ def _register_op_factory(
302
323
  if len(missing_args) > 0:
303
324
  raise ValueError(f"Missing arguments: {', '.join(missing_args)}")
304
325
 
326
+ analyzed_expected_return_type = analyze_type_info(expected_return)
327
+ self._result_encoder = make_engine_value_encoder(
328
+ analyzed_expected_return_type
329
+ )
330
+
305
331
  base_analyze_method = getattr(self._executor, "analyze", None)
306
332
  if base_analyze_method is not None:
307
- result_type = base_analyze_method()
333
+ analyzed_result_type = analyze_type_info(base_analyze_method())
308
334
  else:
309
- result_type = expected_return
335
+ if op_args.batching:
336
+ if not isinstance(
337
+ analyzed_expected_return_type.variant, AnalyzedListType
338
+ ):
339
+ raise ValueError(
340
+ "Expected return type for batching function to be a list type"
341
+ )
342
+ analyzed_result_type = analyze_type_info(
343
+ analyzed_expected_return_type.variant.elem_type
344
+ )
345
+ else:
346
+ analyzed_result_type = analyzed_expected_return_type
310
347
  if len(attributes) > 0:
311
- result_type = Annotated[result_type, *attributes]
312
-
313
- analyzed_result_type_info = analyze_type_info(result_type)
314
- encoded_type = encode_enriched_type_info(analyzed_result_type_info)
348
+ analyzed_result_type.attrs = attributes
315
349
  if potentially_missing_required_arg:
316
- encoded_type["nullable"] = True
317
-
318
- self._result_encoder = make_engine_value_encoder(analyzed_result_type_info)
350
+ analyzed_result_type.nullable = True
351
+ encoded_type = encode_enriched_type_info(analyzed_result_type)
319
352
 
320
353
  return encoded_type
321
354
 
@@ -359,7 +392,9 @@ def _register_op_factory(
359
392
 
360
393
  if category == OpCategory.FUNCTION:
361
394
  _engine.register_function_factory(
362
- op_kind, _EngineFunctionExecutorFactory(spec_loader, _WrappedExecutor)
395
+ op_kind,
396
+ _EngineFunctionExecutorFactory(spec_loader, _WrappedExecutor),
397
+ op_args.batching,
363
398
  )
364
399
  else:
365
400
  raise ValueError(f"Unsupported executor type {category}")