cocoindex 0.3.0__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.
- {cocoindex-0.3.0 → cocoindex-0.3.1}/.pre-commit-config.yaml +1 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/Cargo.lock +1 -1
- {cocoindex-0.3.0 → cocoindex-0.3.1}/Cargo.toml +1 -1
- {cocoindex-0.3.0 → cocoindex-0.3.1}/PKG-INFO +1 -1
- {cocoindex-0.3.0 → cocoindex-0.3.1}/THIRD_PARTY_NOTICES.html +1 -1
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/custom_ops/custom_functions.mdx +62 -26
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/examples/examples/01_docs_to_knowledge_graph.md +1 -1
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/sources/index.md +2 -2
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/targets/index.md +0 -3
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/targets/kuzu.md +2 -2
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/targets/neo4j.md +2 -2
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/product_recommendation/README.md +1 -1
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/functions/colpali.py +29 -34
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/execution/live_updater.rs +231 -186
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/lib_context.rs +3 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/llm/anthropic.rs +7 -13
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/llm/bedrock.rs +10 -16
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/llm/gemini.rs +74 -66
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/llm/mod.rs +2 -2
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/llm/ollama.rs +14 -34
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/llm/openai.rs +3 -7
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/llm/voyage.rs +13 -18
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/factory_bases.rs +2 -2
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/functions/embed_text.rs +42 -23
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/py_factory.rs +12 -10
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/targets/kuzu.rs +3 -6
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/prelude.rs +1 -1
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/py/mod.rs +1 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/service/flows.rs +1 -0
- cocoindex-0.3.1/src/utils/http.rs +31 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/utils/mod.rs +1 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/.cargo/config.toml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/.env.lib_debug +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/.github/ISSUE_TEMPLATE//360/237/220/233-bug-report.md" +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/.github/ISSUE_TEMPLATE//360/237/222/241-feature-request.md" +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/.github/SECURITY.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/.github/scripts/update_version.sh +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/.github/workflows/CI.yml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/.github/workflows/_docs_release.yml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/.github/workflows/_test.yml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/.github/workflows/docs_release.yml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/.github/workflows/docs_test.yml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/.github/workflows/format.yml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/.github/workflows/release.yml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/.gitignore +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/CODE_OF_CONDUCT.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/CONTRIBUTING.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/LICENSE +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/README.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/about.hbs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/about.toml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/dev/README.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/dev/generate_cli_docs.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/dev/neo4j.yaml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/dev/postgres.yaml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/.gitignore +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/README.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/about/community.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/ai/llm.mdx +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/contributing/guide.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/contributing/new_built_in_target.mdx +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/contributing/setup_dev_environment.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/core/basics.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/core/cli-commands.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/core/cli.mdx +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/core/data_example.svg +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/core/data_types.mdx +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/core/flow_def.mdx +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/core/flow_example.svg +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/core/flow_methods.mdx +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/core/settings.mdx +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/custom_ops/custom_sources.mdx +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/custom_ops/custom_targets.mdx +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/examples/examples/00_codebase_index.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/examples/examples/02_academic_papers_index.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/examples/examples/03_postgres_source.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/examples/examples/custom_targets.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/examples/examples/document_ai.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/examples/examples/image_search.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/examples/examples/manual_extraction.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/examples/examples/multi_format_index.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/examples/examples/patient_form_extraction.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/examples/examples/photo_search.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/examples/examples/product_recommendation.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/examples/examples/simple_vector_index.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/examples/index.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/getting_started/installation.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/getting_started/markdown_files.zip +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/getting_started/overview.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/getting_started/quickstart.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/ops/functions.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/query.mdx +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/sources/amazons3.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/sources/azureblob.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/sources/googledrive.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/sources/localfile.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/sources/postgres.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/targets/lancedb.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/targets/postgres.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/targets/qdrant.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/tutorials/live_updates.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/tutorials/manage_flow_dynamically.mdx +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docusaurus.config.ts +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/package.json +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/sidebars.ts +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/src/components/GitHubButton/index.tsx +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/src/css/custom.css +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/src/theme/DocCard/index.tsx +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/src/theme/DocCard/styles.module.css +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/src/theme/DocCardList/index.tsx +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/src/theme/DocCardList/styles.module.css +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/src/theme/Root.js +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/.nojekyll +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/docusaurus.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/academic_papers_index/abstract_chunks.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/academic_papers_index/basic_info.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/academic_papers_index/chunk_embedding.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/academic_papers_index/cover.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/academic_papers_index/first_page.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/academic_papers_index/flow.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/academic_papers_index/metadata.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/codebase_index/chunk.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/codebase_index/cover.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/codebase_index/flow.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/custom_targets/convert.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/custom_targets/cover.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/docs_to_knowledge_graph/cover.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/docs_to_knowledge_graph/dedupe.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/docs_to_knowledge_graph/export_document.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/docs_to_knowledge_graph/export_relationship.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/docs_to_knowledge_graph/extract_relationship.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/docs_to_knowledge_graph/flow.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/docs_to_knowledge_graph/neo4j_browser.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/docs_to_knowledge_graph/relationship.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/docs_to_knowledge_graph/summary.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/document_ai/cover.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/document_ai/document_ai.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/document_ai/processor.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/image_search/cover.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/image_search/embedding.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/image_search/flow.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/image_search/multi_modal_architecture.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/image_search/result.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/manual_extraction/cover.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/manual_extraction/extraction.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/manual_extraction/flow.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/manual_extraction/summary.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/multi_format_index/colpali_architecture.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/multi_format_index/cover.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/multi_format_index/embed.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/multi_format_index/flow.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/multi_format_index/pages.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/patient_form_extraction/cover.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/patient_form_extraction/extraction.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/patient_form_extraction/fields.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/patient_form_extraction/flow.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/patient_form_extraction/tomarkdown.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/photo_search/cover.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/photo_search/extraction.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/photo_search/flow.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/postgres_source/collector.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/postgres_source/cover.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/postgres_source/description.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/postgres_source/embed.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/postgres_source/flow.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/postgres_source/lineage.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/postgres_source/price.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/postgres_source/source.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/product_recommendation/cover.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/product_recommendation/dedupe.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/product_recommendation/export_all.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/product_recommendation/export_product.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/product_recommendation/export_taxonomy.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/product_recommendation/extract_product.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/product_recommendation/extract_taxonomy.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/product_recommendation/neo4j.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/product_recommendation/parse_json.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/product_recommendation/taxonomy.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/simple_vector_index/chunk.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/simple_vector_index/cover.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/simple_vector_index/embed.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/examples/simple_vector_index/flow.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/favicon.ico +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/icon.svg +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/img/incremental-etl.gif +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/static/robots.txt +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/tsconfig.json +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/docs/yarn.lock +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/amazon_s3_embedding/.env.example +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/amazon_s3_embedding/.gitignore +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/amazon_s3_embedding/README.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/amazon_s3_embedding/main.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/amazon_s3_embedding/pyproject.toml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/azure_blob_embedding/.env.example +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/azure_blob_embedding/.gitignore +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/azure_blob_embedding/README.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/azure_blob_embedding/main.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/azure_blob_embedding/pyproject.toml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/code_embedding/.env +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/code_embedding/README.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/code_embedding/main.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/code_embedding/pyproject.toml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/custom_output_files/.env +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/custom_output_files/.gitignore +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/custom_output_files/README.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/custom_output_files/data/bizarre_animals.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/custom_output_files/data/chunk_norris.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/custom_output_files/main.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/custom_output_files/pyproject.toml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/custom_source_hn/.env +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/custom_source_hn/.env.example +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/custom_source_hn/README.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/custom_source_hn/main.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/custom_source_hn/pyproject.toml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/docs_to_knowledge_graph/.env +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/docs_to_knowledge_graph/README.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/docs_to_knowledge_graph/main.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/docs_to_knowledge_graph/pyproject.toml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/face_recognition/.env +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/face_recognition/README.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/face_recognition/images/Carter_welcomes_Reagan.jpg +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/face_recognition/images/Solvay_conference_1927.jpg +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/face_recognition/images/Steve_Jobs_and_Bill_Gates_(522695099).jpg +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/face_recognition/images/einplanck3.jpg +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/face_recognition/main.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/face_recognition/pyproject.toml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/fastapi_server_docker/.dockerignore +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/fastapi_server_docker/.env +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/fastapi_server_docker/README.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/fastapi_server_docker/compose.yaml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/fastapi_server_docker/dockerfile +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/fastapi_server_docker/files/1810.04805v2.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/fastapi_server_docker/main.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/fastapi_server_docker/requirements.txt +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/gdrive_text_embedding/.env.example +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/gdrive_text_embedding/.gitignore +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/gdrive_text_embedding/README.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/gdrive_text_embedding/main.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/gdrive_text_embedding/pyproject.toml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/hn_trending_topics/.env.example +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/hn_trending_topics/.gitignore +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/hn_trending_topics/README.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/hn_trending_topics/main.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/hn_trending_topics/pyproject.toml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/image_search/.env +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/image_search/README.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/image_search/colpali_main.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/image_search/frontend/.gitignore +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/image_search/frontend/index.html +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/image_search/frontend/package-lock.json +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/image_search/frontend/package.json +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/image_search/frontend/src/App.jsx +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/image_search/frontend/src/main.jsx +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/image_search/frontend/src/style.css +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/image_search/frontend/vite.config.js +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/image_search/img/cat1.jpeg +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/image_search/img/dog1.jpeg +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/image_search/img/elephant1.jpg +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/image_search/img/giraffe.jpg +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/image_search/main.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/image_search/pyproject.toml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/live_updates/.env +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/live_updates/README.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/live_updates/data/bizarre_animals.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/live_updates/data/chunk_norris.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/live_updates/main.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/live_updates/pyproject.toml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/manuals_llm_extraction/.env +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/manuals_llm_extraction/README.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/manuals_llm_extraction/main.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/manuals_llm_extraction/manuals/array.pdf +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/manuals_llm_extraction/manuals/base64.pdf +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/manuals_llm_extraction/manuals/copy.pdf +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/manuals_llm_extraction/manuals/glob.pdf +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/manuals_llm_extraction/pyproject.toml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/multi_format_indexing/.env +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/multi_format_indexing/README.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/multi_format_indexing/main.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/multi_format_indexing/pyproject.toml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/multi_format_indexing/source_files/1706.03762v7.pdf +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/multi_format_indexing/source_files/1810.04805v2.pdf +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/multi_format_indexing/source_files/2502.06786v3.pdf +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/multi_format_indexing/source_files/healthcare_industry_test_p101.jpg +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/multi_format_indexing/source_files/healthcare_industry_test_p86.jpg +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/multi_format_indexing/source_files/healthcare_industry_test_p9.jpg +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/multi_format_indexing/source_files/restaurant_brands_international_2023.jpg +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/multi_format_indexing/source_files/sweetgreen_2023.jpg +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/paper_metadata/.env.example +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/paper_metadata/.gitignore +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/paper_metadata/README.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/paper_metadata/main.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/paper_metadata/papers/1706.03762v7.pdf +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/paper_metadata/papers/1810.04805v2.pdf +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/paper_metadata/papers/2502.06786v3.pdf +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/paper_metadata/papers/2502.20346v1.pdf +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/paper_metadata/pyproject.toml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/patient_intake_extraction/.env.example +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/patient_intake_extraction/README.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/patient_intake_extraction/data/README.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/patient_intake_extraction/data/patient_forms/Patient_Intake_Form_David_Artificial.docx +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/patient_intake_extraction/data/patient_forms/Patient_Intake_Form_Emily_Artificial.pdf +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/patient_intake_extraction/data/patient_forms/Patient_Intake_Form_Joe_Artificial.pdf +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/patient_intake_extraction/data/patient_forms/Patient_Intake_From_Jane_Artificial.docx +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/patient_intake_extraction/main.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/patient_intake_extraction/pyproject.toml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/pdf_elements_embedding/.env +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/pdf_elements_embedding/.gitignore +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/pdf_elements_embedding/README.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/pdf_elements_embedding/fetch_manual_urls.sh +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/pdf_elements_embedding/main.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/pdf_elements_embedding/pyproject.toml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/pdf_embedding/.env +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/pdf_embedding/README.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/pdf_embedding/main.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/pdf_embedding/pdf_files/1706.03762v7.pdf +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/pdf_embedding/pdf_files/1810.04805v2.pdf +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/pdf_embedding/pdf_files/rfc8259.pdf +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/pdf_embedding/pyproject.toml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/postgres_source/.env +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/postgres_source/README.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/postgres_source/main.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/postgres_source/prepare_source_data.sql +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/postgres_source/pyproject.toml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/product_recommendation/.env.example +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/product_recommendation/.gitignore +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/product_recommendation/img/cocoinsight.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/product_recommendation/img/neo4j.png +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/product_recommendation/main.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/product_recommendation/products/p1.json +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/product_recommendation/products/p2.json +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/product_recommendation/products/p3.json +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/product_recommendation/products/p4.json +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/product_recommendation/products/p5.json +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/product_recommendation/products/p6.json +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/product_recommendation/products/p7.json +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/product_recommendation/products/p8.json +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/product_recommendation/products/p9.json +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/product_recommendation/pyproject.toml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/text_embedding/.env +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/text_embedding/README.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/text_embedding/Text_Embedding.ipynb +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/text_embedding/main.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/text_embedding/markdown_files/1706.03762v7.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/text_embedding/markdown_files/1810.04805v2.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/text_embedding/markdown_files/rfc8259.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/text_embedding/pyproject.toml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/text_embedding_lancedb/.env +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/text_embedding_lancedb/.gitignore +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/text_embedding_lancedb/README.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/text_embedding_lancedb/main.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/text_embedding_lancedb/markdown_files/rfc8259.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/text_embedding_lancedb/pyproject.toml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/text_embedding_qdrant/.env +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/text_embedding_qdrant/README.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/text_embedding_qdrant/main.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/text_embedding_qdrant/markdown_files/rfc8259.md +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/examples/text_embedding_qdrant/pyproject.toml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/pyproject.toml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/__init__.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/auth_registry.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/cli.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/engine_object.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/engine_value.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/flow.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/functions/__init__.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/functions/_engine_builtin_specs.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/functions/sbert.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/index.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/lib.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/llm.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/op.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/py.typed +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/query_handler.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/runtime.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/setting.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/setup.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/sources/__init__.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/sources/_engine_builtin_specs.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/subprocess_exec.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/targets/__init__.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/targets/_engine_builtin_specs.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/targets/lancedb.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/tests/__init__.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/tests/test_engine_object.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/tests/test_engine_value.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/tests/test_optional_database.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/tests/test_transform_flow.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/tests/test_typing.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/tests/test_validation.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/typing.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/user_app_loader.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/utils.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/python/cocoindex/validation.py +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/ruff.toml +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/base/duration.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/base/field_attrs.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/base/json_schema.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/base/mod.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/base/schema.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/base/spec.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/base/value.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/builder/analyzed_flow.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/builder/analyzer.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/builder/exec_ctx.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/builder/flow_builder.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/builder/mod.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/builder/plan.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/execution/db_tracking.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/execution/db_tracking_setup.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/execution/dumper.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/execution/evaluator.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/execution/indexing_status.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/execution/memoization.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/execution/mod.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/execution/row_indexer.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/execution/source_indexer.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/execution/stats.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/lib.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/llm/litellm.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/llm/openrouter.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/llm/vllm.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/functions/detect_program_lang.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/functions/extract_by_llm.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/functions/mod.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/functions/parse_json.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/functions/split_by_separators.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/functions/split_recursively.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/functions/test_utils.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/interface.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/mod.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/registration.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/registry.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/sdk.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/shared/mod.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/shared/postgres.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/shared/program_langs.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/shared/split.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/sources/amazon_s3.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/sources/azure_blob.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/sources/google_drive.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/sources/local_file.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/sources/mod.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/sources/postgres.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/sources/shared/mod.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/sources/shared/pattern_matcher.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/targets/mod.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/targets/neo4j.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/targets/postgres.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/targets/qdrant.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/targets/shared/mod.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/targets/shared/property_graph.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/ops/targets/shared/table_columns.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/py/convert.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/py/future.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/server.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/service/error.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/service/mod.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/service/query_handler.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/settings.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/setup/auth_registry.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/setup/components.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/setup/db_metadata.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/setup/driver.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/setup/flow_features.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/setup/mod.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/setup/states.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/utils/batching.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/utils/bytes_decode.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/utils/concur_control.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/utils/db.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/utils/deser.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/utils/fingerprint.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/utils/immutable.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/utils/retryable.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/utils/str_sanitize.rs +0 -0
- {cocoindex-0.3.0 → cocoindex-0.3.1}/src/utils/yaml_ser.rs +0 -0
|
@@ -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.3.
|
|
5
|
+
version = "0.3.1"
|
|
6
6
|
edition = "2024"
|
|
7
7
|
rust-version = "1.89"
|
|
8
8
|
license = "Apache-2.0"
|
|
@@ -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.3.
|
|
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
|
-
*
|
|
12
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
|
|
79
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
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
|
-
*
|
|
134
|
-
*
|
|
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
|
-
*
|
|
139
|
+
* `gpu: bool`: Whether the executor will use GPU. It will affect the way the function is scheduled.
|
|
142
140
|
|
|
143
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
|
|
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
|
-
|
|
160
|
-
|
|
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>
|
{cocoindex-0.3.0 → cocoindex-0.3.1}/docs/docs/examples/examples/01_docs_to_knowledge_graph.md
RENAMED
|
@@ -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
|
-

|
|
376
|
+

|
|
@@ -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,
|
|
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.
|
|
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
|
-
|
|
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"
|
|
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 "
|
|
53
|
-
model =
|
|
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 =
|
|
57
|
-
elif "
|
|
58
|
-
model =
|
|
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 =
|
|
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,
|
|
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
|
-
|
|
164
|
-
|
|
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
|
-
#
|
|
175
|
-
|
|
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,
|
|
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(
|
|
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
|
-
#
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
return token_embeddings.cpu().to(torch.float32).numpy()
|
|
244
|
+
# [tokens, hidden_dim]
|
|
245
|
+
return embeddings.cpu().to(torch.float32).numpy()
|