cocoindex 0.1.50__tar.gz → 0.1.51__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.1.51/.github/workflows/_doc_release.yml +31 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/.github/workflows/_test.yml +3 -2
- cocoindex-0.1.51/.github/workflows/docs.yml +34 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/.github/workflows/release.yml +6 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/.gitignore +1 -1
- {cocoindex-0.1.50 → cocoindex-0.1.51}/Cargo.lock +72 -16
- {cocoindex-0.1.50 → cocoindex-0.1.51}/Cargo.toml +6 -4
- {cocoindex-0.1.50 → cocoindex-0.1.51}/PKG-INFO +1 -1
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/docs/getting_started/quickstart.md +1 -1
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/code_embedding/pyproject.toml +1 -1
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/docs_to_knowledge_graph/pyproject.toml +1 -1
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/manuals_llm_extraction/pyproject.toml +1 -1
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/pdf_embedding/pyproject.toml +1 -1
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/product_recommendation/pyproject.toml +1 -1
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/text_embedding/pyproject.toml +1 -1
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/text_embedding_qdrant/pyproject.toml +1 -1
- {cocoindex-0.1.50 → cocoindex-0.1.51}/pyproject.toml +0 -1
- cocoindex-0.1.51/python/cocoindex/__init__.py +68 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/python/cocoindex/cli.py +22 -4
- {cocoindex-0.1.50 → cocoindex-0.1.51}/python/cocoindex/convert.py +7 -3
- {cocoindex-0.1.50 → cocoindex-0.1.51}/python/cocoindex/setting.py +10 -6
- {cocoindex-0.1.50 → cocoindex-0.1.51}/python/cocoindex/tests/test_convert.py +151 -104
- cocoindex-0.1.51/python/cocoindex/tests/test_optional_database.py +249 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/python/cocoindex/tests/test_typing.py +62 -56
- {cocoindex-0.1.50 → cocoindex-0.1.51}/python/cocoindex/typing.py +19 -19
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/base/value.rs +8 -6
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/builder/flow_builder.rs +10 -6
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/execution/db_tracking_setup.rs +3 -4
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/execution/live_updater.rs +2 -2
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/lib_context.rs +90 -9
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/ops/factory_bases.rs +1 -3
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/ops/storages/kuzu.rs +1 -3
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/ops/storages/neo4j.rs +1 -3
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/ops/storages/postgres.rs +2 -4
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/ops/storages/qdrant.rs +1 -3
- cocoindex-0.1.51/src/py/convert.rs +518 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/py/mod.rs +9 -6
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/service/flows.rs +3 -3
- cocoindex-0.1.51/src/settings.rs +99 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/setup/components.rs +0 -8
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/setup/db_metadata.rs +3 -4
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/setup/states.rs +2 -14
- cocoindex-0.1.50/.github/workflows/docs.yml +0 -74
- cocoindex-0.1.50/python/cocoindex/__init__.py +0 -17
- cocoindex-0.1.50/src/py/convert.rs +0 -232
- cocoindex-0.1.50/src/settings.rs +0 -13
- {cocoindex-0.1.50 → cocoindex-0.1.51}/.cargo/config.toml +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/.env.lib_debug +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/.github/ISSUE_TEMPLATE//360/237/220/233-bug-report.md" +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/.github/ISSUE_TEMPLATE//360/237/222/241-feature-request.md" +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/.github/scripts/update_version.sh +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/.github/workflows/CI.yml +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/.vscode/settings.json +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/CODE_OF_CONDUCT.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/CONTRIBUTING.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/LICENSE +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/README.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/dev/neo4j.yaml +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/dev/postgres.yaml +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/.gitignore +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/README.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/docs/about/community.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/docs/about/contributing.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/docs/ai/llm.mdx +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/docs/core/basics.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/docs/core/cli.mdx +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/docs/core/custom_function.mdx +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/docs/core/data_example.svg +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/docs/core/data_types.mdx +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/docs/core/flow_def.mdx +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/docs/core/flow_example.svg +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/docs/core/flow_methods.mdx +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/docs/core/settings.mdx +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/docs/getting_started/installation.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/docs/getting_started/markdown_files.zip +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/docs/getting_started/overview.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/docs/ops/functions.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/docs/ops/sources.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/docs/ops/storages.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/docs/query.mdx +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/docusaurus.config.ts +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/package.json +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/sidebars.ts +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/src/components/HomepageFeatures/index.tsx +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/src/components/HomepageFeatures/styles.module.css +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/src/css/custom.css +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/src/theme/Root.js +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/static/.nojekyll +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/static/img/docusaurus.png +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/static/img/favicon.ico +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/static/img/icon.svg +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/static/img/incremental-etl.gif +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/static/robots.txt +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/tsconfig.json +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/docs/yarn.lock +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/amazon_s3_embedding/.env.example +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/amazon_s3_embedding/.gitignore +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/amazon_s3_embedding/README.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/amazon_s3_embedding/main.py +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/amazon_s3_embedding/pyproject.toml +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/code_embedding/.env +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/code_embedding/README.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/code_embedding/main.py +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/docs_to_knowledge_graph/.env +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/docs_to_knowledge_graph/README.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/docs_to_knowledge_graph/main.py +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/fastapi_server_docker/.dockerignore +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/fastapi_server_docker/.env +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/fastapi_server_docker/README.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/fastapi_server_docker/compose.yaml +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/fastapi_server_docker/dockerfile +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/fastapi_server_docker/files/1810.04805v2.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/fastapi_server_docker/main.py +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/fastapi_server_docker/requirements.txt +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/gdrive_text_embedding/.env.example +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/gdrive_text_embedding/.gitignore +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/gdrive_text_embedding/README.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/gdrive_text_embedding/main.py +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/gdrive_text_embedding/pyproject.toml +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/image_search/.env +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/image_search/README.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/image_search/frontend/.gitignore +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/image_search/frontend/index.html +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/image_search/frontend/package-lock.json +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/image_search/frontend/package.json +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/image_search/frontend/src/App.jsx +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/image_search/frontend/src/main.jsx +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/image_search/frontend/src/style.css +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/image_search/frontend/vite.config.js +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/image_search/img/cat1.jpeg +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/image_search/img/dog1.jpeg +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/image_search/img/elephant1.jpg +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/image_search/img/giraffe.jpg +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/image_search/main.py +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/image_search/pyproject.toml +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/image_search/requirements.txt +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/manuals_llm_extraction/.env +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/manuals_llm_extraction/README.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/manuals_llm_extraction/main.py +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/manuals_llm_extraction/manuals/array.pdf +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/manuals_llm_extraction/manuals/base64.pdf +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/manuals_llm_extraction/manuals/copy.pdf +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/manuals_llm_extraction/manuals/glob.pdf +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/pdf_embedding/.env +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/pdf_embedding/README.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/pdf_embedding/main.py +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/pdf_embedding/pdf_files/1706.03762v7.pdf +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/pdf_embedding/pdf_files/1810.04805v2.pdf +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/pdf_embedding/pdf_files/rfc8259.pdf +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/product_recommendation/.env +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/product_recommendation/README.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/product_recommendation/img/cocoinsight.png +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/product_recommendation/img/neo4j.png +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/product_recommendation/main.py +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/product_recommendation/products/p1.json +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/product_recommendation/products/p2.json +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/product_recommendation/products/p3.json +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/product_recommendation/products/p4.json +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/product_recommendation/products/p5.json +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/product_recommendation/products/p6.json +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/product_recommendation/products/p7.json +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/product_recommendation/products/p8.json +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/product_recommendation/products/p9.json +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/text_embedding/.env +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/text_embedding/README.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/text_embedding/Text_Embedding.ipynb +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/text_embedding/main.py +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/text_embedding/markdown_files/1706.03762v7.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/text_embedding/markdown_files/1810.04805v2.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/text_embedding/markdown_files/rfc8259.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/text_embedding_qdrant/.env +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/text_embedding_qdrant/README.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/text_embedding_qdrant/main.py +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/examples/text_embedding_qdrant/markdown_files/rfc8259.md +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/python/cocoindex/auth_registry.py +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/python/cocoindex/flow.py +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/python/cocoindex/functions.py +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/python/cocoindex/index.py +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/python/cocoindex/lib.py +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/python/cocoindex/llm.py +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/python/cocoindex/op.py +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/python/cocoindex/py.typed +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/python/cocoindex/runtime.py +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/python/cocoindex/setup.py +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/python/cocoindex/sources.py +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/python/cocoindex/storages.py +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/python/cocoindex/tests/__init__.py +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/python/cocoindex/utils.py +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/ruff.toml +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/base/duration.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/base/field_attrs.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/base/json_schema.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/base/mod.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/base/schema.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/base/spec.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/builder/analyzed_flow.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/builder/analyzer.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/builder/mod.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/builder/plan.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/execution/db_tracking.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/execution/dumper.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/execution/evaluator.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/execution/indexing_status.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/execution/memoization.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/execution/mod.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/execution/row_indexer.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/execution/source_indexer.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/execution/stats.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/lib.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/llm/anthropic.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/llm/gemini.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/llm/mod.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/llm/ollama.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/llm/openai.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/ops/functions/extract_by_llm.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/ops/functions/mod.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/ops/functions/parse_json.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/ops/functions/split_recursively.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/ops/interface.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/ops/mod.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/ops/py_factory.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/ops/registration.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/ops/registry.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/ops/sdk.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/ops/sources/amazon_s3.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/ops/sources/google_drive.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/ops/sources/local_file.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/ops/sources/mod.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/ops/storages/mod.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/ops/storages/shared/mod.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/ops/storages/shared/property_graph.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/ops/storages/shared/table_columns.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/prelude.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/server.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/service/error.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/service/mod.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/setup/auth_registry.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/setup/driver.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/setup/mod.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/utils/db.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/utils/fingerprint.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/utils/immutable.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/utils/mod.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/utils/retryable.rs +0 -0
- {cocoindex-0.1.50 → cocoindex-0.1.51}/src/utils/yaml_ser.rs +0 -0
@@ -0,0 +1,31 @@
|
|
1
|
+
name: Release Docs
|
2
|
+
|
3
|
+
on:
|
4
|
+
workflow_call:
|
5
|
+
|
6
|
+
jobs:
|
7
|
+
deploy:
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
environment: docs-release
|
10
|
+
steps:
|
11
|
+
- uses: actions/checkout@v4
|
12
|
+
- uses: actions/setup-node@v4
|
13
|
+
with:
|
14
|
+
node-version: 18
|
15
|
+
cache: yarn
|
16
|
+
cache-dependency-path: docs/yarn.lock
|
17
|
+
- uses: webfactory/ssh-agent@v0.5.0
|
18
|
+
with:
|
19
|
+
ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }}
|
20
|
+
- name: Deploy to GitHub Pages
|
21
|
+
env:
|
22
|
+
USE_SSH: true
|
23
|
+
run: |
|
24
|
+
export COCOINDEX_DOCS_POSTHOG_API_KEY=${{ vars.COCOINDEX_DOCS_POSTHOG_API_KEY }}
|
25
|
+
export COCOINDEX_DOCS_MIXPANEL_API_KEY=${{ vars.COCOINDEX_DOCS_MIXPANEL_API_KEY }}
|
26
|
+
export COCOINDEX_DOCS_ALGOLIA_APP_ID=${{ vars.COCOINDEX_DOCS_ALGOLIA_APP_ID }}
|
27
|
+
export COCOINDEX_DOCS_ALGOLIA_API_KEY=${{ vars.COCOINDEX_DOCS_ALGOLIA_API_KEY }}
|
28
|
+
git config --global user.email "${{ vars.COCOINDEX_DOCS_DEPLOY_USER_EMAIL }}"
|
29
|
+
git config --global user.name "${{ vars.COCOINDEX_DOCS_DEPLOY_USER_NAME }}"
|
30
|
+
yarn --cwd docs install --frozen-lockfile
|
31
|
+
yarn --cwd docs deploy
|
@@ -27,15 +27,16 @@ jobs:
|
|
27
27
|
run: cargo test --verbose
|
28
28
|
|
29
29
|
- uses: actions/setup-python@v5
|
30
|
+
id: setup_python
|
30
31
|
with:
|
31
32
|
python-version: ${{ matrix.python-version }}
|
32
33
|
cache: 'pip'
|
33
34
|
- uses: actions/cache@v4
|
34
35
|
with:
|
35
36
|
path: .venv
|
36
|
-
key: ${{ runner.os }}-
|
37
|
+
key: ${{ runner.os }}-pyenv-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('pyproject.toml') }}
|
37
38
|
restore-keys: |
|
38
|
-
${{ runner.os }}-
|
39
|
+
${{ runner.os }}-pyenv-${{ steps.setup_python.outputs.python-version }}-
|
39
40
|
- name: Setup venv
|
40
41
|
run: |
|
41
42
|
python -m venv .venv
|
@@ -0,0 +1,34 @@
|
|
1
|
+
name: docs
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
branches: [main]
|
6
|
+
paths:
|
7
|
+
- docs/**
|
8
|
+
- ".github/workflows/docs.yml"
|
9
|
+
workflow_dispatch:
|
10
|
+
|
11
|
+
permissions:
|
12
|
+
contents: write
|
13
|
+
|
14
|
+
jobs:
|
15
|
+
test-deploy:
|
16
|
+
if: github.event_name == 'pull_request'
|
17
|
+
runs-on: ubuntu-latest
|
18
|
+
steps:
|
19
|
+
- uses: actions/checkout@v4
|
20
|
+
- uses: actions/setup-node@v4
|
21
|
+
with:
|
22
|
+
node-version: 18
|
23
|
+
cache: yarn
|
24
|
+
cache-dependency-path: docs/yarn.lock
|
25
|
+
- name: Install dependencies
|
26
|
+
run: yarn --cwd docs install --frozen-lockfile
|
27
|
+
- name: Test build website
|
28
|
+
run: yarn --cwd docs build
|
29
|
+
|
30
|
+
deploy:
|
31
|
+
name: Release Docs
|
32
|
+
if: ${{ github.event_name == 'workflow_dispatch' }}
|
33
|
+
uses: ./.github/workflows/_doc_release.yml
|
34
|
+
secrets: inherit
|
@@ -1040,7 +1040,7 @@ dependencies = [
|
|
1040
1040
|
|
1041
1041
|
[[package]]
|
1042
1042
|
name = "cocoindex"
|
1043
|
-
version = "0.1.
|
1043
|
+
version = "0.1.51"
|
1044
1044
|
dependencies = [
|
1045
1045
|
"anyhow",
|
1046
1046
|
"async-openai",
|
@@ -1073,6 +1073,7 @@ dependencies = [
|
|
1073
1073
|
"json5",
|
1074
1074
|
"log",
|
1075
1075
|
"neo4rs",
|
1076
|
+
"numpy",
|
1076
1077
|
"owo-colors",
|
1077
1078
|
"pgvector",
|
1078
1079
|
"phf",
|
@@ -2664,6 +2665,16 @@ version = "0.8.4"
|
|
2664
2665
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2665
2666
|
checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3"
|
2666
2667
|
|
2668
|
+
[[package]]
|
2669
|
+
name = "matrixmultiply"
|
2670
|
+
version = "0.3.10"
|
2671
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2672
|
+
checksum = "a06de3016e9fae57a36fd14dba131fccf49f74b40b7fbdb472f96e361ec71a08"
|
2673
|
+
dependencies = [
|
2674
|
+
"autocfg",
|
2675
|
+
"rawpointer",
|
2676
|
+
]
|
2677
|
+
|
2667
2678
|
[[package]]
|
2668
2679
|
name = "md-5"
|
2669
2680
|
version = "0.10.6"
|
@@ -2731,6 +2742,21 @@ dependencies = [
|
|
2731
2742
|
"windows-sys 0.52.0",
|
2732
2743
|
]
|
2733
2744
|
|
2745
|
+
[[package]]
|
2746
|
+
name = "ndarray"
|
2747
|
+
version = "0.16.1"
|
2748
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2749
|
+
checksum = "882ed72dce9365842bf196bdeedf5055305f11fc8c03dee7bb0194a6cad34841"
|
2750
|
+
dependencies = [
|
2751
|
+
"matrixmultiply",
|
2752
|
+
"num-complex",
|
2753
|
+
"num-integer",
|
2754
|
+
"num-traits",
|
2755
|
+
"portable-atomic",
|
2756
|
+
"portable-atomic-util",
|
2757
|
+
"rawpointer",
|
2758
|
+
]
|
2759
|
+
|
2734
2760
|
[[package]]
|
2735
2761
|
name = "neo4rs"
|
2736
2762
|
version = "0.8.0"
|
@@ -2796,6 +2822,15 @@ dependencies = [
|
|
2796
2822
|
"zeroize",
|
2797
2823
|
]
|
2798
2824
|
|
2825
|
+
[[package]]
|
2826
|
+
name = "num-complex"
|
2827
|
+
version = "0.4.6"
|
2828
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2829
|
+
checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
|
2830
|
+
dependencies = [
|
2831
|
+
"num-traits",
|
2832
|
+
]
|
2833
|
+
|
2799
2834
|
[[package]]
|
2800
2835
|
name = "num-conv"
|
2801
2836
|
version = "0.1.0"
|
@@ -2851,6 +2886,22 @@ dependencies = [
|
|
2851
2886
|
"libc",
|
2852
2887
|
]
|
2853
2888
|
|
2889
|
+
[[package]]
|
2890
|
+
name = "numpy"
|
2891
|
+
version = "0.25.0"
|
2892
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2893
|
+
checksum = "29f1dee9aa8d3f6f8e8b9af3803006101bb3653866ef056d530d53ae68587191"
|
2894
|
+
dependencies = [
|
2895
|
+
"libc",
|
2896
|
+
"ndarray",
|
2897
|
+
"num-complex",
|
2898
|
+
"num-integer",
|
2899
|
+
"num-traits",
|
2900
|
+
"pyo3",
|
2901
|
+
"pyo3-build-config",
|
2902
|
+
"rustc-hash 2.1.1",
|
2903
|
+
]
|
2904
|
+
|
2854
2905
|
[[package]]
|
2855
2906
|
name = "object"
|
2856
2907
|
version = "0.36.7"
|
@@ -3228,11 +3279,10 @@ dependencies = [
|
|
3228
3279
|
|
3229
3280
|
[[package]]
|
3230
3281
|
name = "pyo3"
|
3231
|
-
version = "0.
|
3282
|
+
version = "0.25.0"
|
3232
3283
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3233
|
-
checksum = "
|
3284
|
+
checksum = "f239d656363bcee73afef85277f1b281e8ac6212a1d42aa90e55b90ed43c47a4"
|
3234
3285
|
dependencies = [
|
3235
|
-
"cfg-if",
|
3236
3286
|
"chrono",
|
3237
3287
|
"indoc",
|
3238
3288
|
"libc",
|
@@ -3247,9 +3297,9 @@ dependencies = [
|
|
3247
3297
|
|
3248
3298
|
[[package]]
|
3249
3299
|
name = "pyo3-async-runtimes"
|
3250
|
-
version = "0.
|
3300
|
+
version = "0.25.0"
|
3251
3301
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3252
|
-
checksum = "
|
3302
|
+
checksum = "d73cc6b1b7d8b3cef02101d37390dbdfe7e450dfea14921cae80a9534ba59ef2"
|
3253
3303
|
dependencies = [
|
3254
3304
|
"futures",
|
3255
3305
|
"once_cell",
|
@@ -3260,9 +3310,9 @@ dependencies = [
|
|
3260
3310
|
|
3261
3311
|
[[package]]
|
3262
3312
|
name = "pyo3-build-config"
|
3263
|
-
version = "0.
|
3313
|
+
version = "0.25.0"
|
3264
3314
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3265
|
-
checksum = "
|
3315
|
+
checksum = "755ea671a1c34044fa165247aaf6f419ca39caa6003aee791a0df2713d8f1b6d"
|
3266
3316
|
dependencies = [
|
3267
3317
|
"once_cell",
|
3268
3318
|
"target-lexicon",
|
@@ -3270,9 +3320,9 @@ dependencies = [
|
|
3270
3320
|
|
3271
3321
|
[[package]]
|
3272
3322
|
name = "pyo3-ffi"
|
3273
|
-
version = "0.
|
3323
|
+
version = "0.25.0"
|
3274
3324
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3275
|
-
checksum = "
|
3325
|
+
checksum = "fc95a2e67091e44791d4ea300ff744be5293f394f1bafd9f78c080814d35956e"
|
3276
3326
|
dependencies = [
|
3277
3327
|
"libc",
|
3278
3328
|
"pyo3-build-config",
|
@@ -3280,9 +3330,9 @@ dependencies = [
|
|
3280
3330
|
|
3281
3331
|
[[package]]
|
3282
3332
|
name = "pyo3-macros"
|
3283
|
-
version = "0.
|
3333
|
+
version = "0.25.0"
|
3284
3334
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3285
|
-
checksum = "
|
3335
|
+
checksum = "a179641d1b93920829a62f15e87c0ed791b6c8db2271ba0fd7c2686090510214"
|
3286
3336
|
dependencies = [
|
3287
3337
|
"proc-macro2",
|
3288
3338
|
"pyo3-macros-backend",
|
@@ -3292,9 +3342,9 @@ dependencies = [
|
|
3292
3342
|
|
3293
3343
|
[[package]]
|
3294
3344
|
name = "pyo3-macros-backend"
|
3295
|
-
version = "0.
|
3345
|
+
version = "0.25.0"
|
3296
3346
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3297
|
-
checksum = "
|
3347
|
+
checksum = "9dff85ebcaab8c441b0e3f7ae40a6963ecea8a9f5e74f647e33fcf5ec9a1e89e"
|
3298
3348
|
dependencies = [
|
3299
3349
|
"heck",
|
3300
3350
|
"proc-macro2",
|
@@ -3305,9 +3355,9 @@ dependencies = [
|
|
3305
3355
|
|
3306
3356
|
[[package]]
|
3307
3357
|
name = "pythonize"
|
3308
|
-
version = "0.
|
3358
|
+
version = "0.25.0"
|
3309
3359
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3310
|
-
checksum = "
|
3360
|
+
checksum = "597907139a488b22573158793aa7539df36ae863eba300c75f3a0d65fc475e27"
|
3311
3361
|
dependencies = [
|
3312
3362
|
"pyo3",
|
3313
3363
|
"serde",
|
@@ -3462,6 +3512,12 @@ dependencies = [
|
|
3462
3512
|
"getrandom 0.3.2",
|
3463
3513
|
]
|
3464
3514
|
|
3515
|
+
[[package]]
|
3516
|
+
name = "rawpointer"
|
3517
|
+
version = "0.2.1"
|
3518
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
3519
|
+
checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3"
|
3520
|
+
|
3465
3521
|
[[package]]
|
3466
3522
|
name = "redox_syscall"
|
3467
3523
|
version = "0.5.11"
|
@@ -2,8 +2,9 @@
|
|
2
2
|
name = "cocoindex"
|
3
3
|
# Version used for local development is always higher than others to take precedence.
|
4
4
|
# Will be overridden for specific release versions.
|
5
|
-
version = "0.1.
|
5
|
+
version = "0.1.51"
|
6
6
|
edition = "2024"
|
7
|
+
rust-version = "1.86"
|
7
8
|
|
8
9
|
[profile.release]
|
9
10
|
codegen-units = 1
|
@@ -14,9 +15,9 @@ name = "cocoindex_engine"
|
|
14
15
|
crate-type = ["cdylib"]
|
15
16
|
|
16
17
|
[dependencies]
|
17
|
-
pyo3 = { version = "0.
|
18
|
-
pythonize = "0.
|
19
|
-
pyo3-async-runtimes = { version = "0.
|
18
|
+
pyo3 = { version = "0.25.0", features = ["chrono", "auto-initialize"] }
|
19
|
+
pythonize = "0.25.0"
|
20
|
+
pyo3-async-runtimes = { version = "0.25.0", features = ["tokio-runtime"] }
|
20
21
|
|
21
22
|
anyhow = { version = "1.0.97", features = ["std"] }
|
22
23
|
async-trait = "0.1.88"
|
@@ -113,3 +114,4 @@ json5 = "0.4.1"
|
|
113
114
|
aws-config = "1.6.2"
|
114
115
|
aws-sdk-s3 = "1.85.0"
|
115
116
|
aws-sdk-sqs = "1.67.0"
|
117
|
+
numpy = "0.25.0"
|
@@ -158,7 +158,7 @@ In this example, we'll use the [`psycopg` library](https://www.psycopg.org/) alo
|
|
158
158
|
Please make sure the required packages are installed:
|
159
159
|
|
160
160
|
```bash
|
161
|
-
pip install numpy psycopg[binary,pool] pgvector
|
161
|
+
pip install numpy "psycopg[binary,pool]" pgvector
|
162
162
|
```
|
163
163
|
|
164
164
|
### Step 4.1: Extract common transformations
|
@@ -2,7 +2,7 @@
|
|
2
2
|
name = "code-embedding"
|
3
3
|
version = "0.1.0"
|
4
4
|
description = "Simple example for cocoindex: build embedding index based on source code."
|
5
|
-
requires-python = ">=3.
|
5
|
+
requires-python = ">=3.11"
|
6
6
|
dependencies = ["cocoindex>=0.1.42", "python-dotenv>=1.0.1"]
|
7
7
|
|
8
8
|
[tool.setuptools]
|
@@ -2,7 +2,7 @@
|
|
2
2
|
name = "manuals-llm-extraction"
|
3
3
|
version = "0.1.0"
|
4
4
|
description = "Simple example for cocoindex: extract structured information from a Markdown file using LLM."
|
5
|
-
requires-python = ">=3.
|
5
|
+
requires-python = ">=3.11"
|
6
6
|
dependencies = ["cocoindex>=0.1.42", "marker-pdf>=1.5.2"]
|
7
7
|
|
8
8
|
[tool.setuptools]
|
@@ -2,7 +2,7 @@
|
|
2
2
|
name = "cocoindex-ecommerce-taxonomy"
|
3
3
|
version = "0.1.0"
|
4
4
|
description = "Simple example for CocoIndex: extract taxonomy from e-commerce products and build knowledge graph."
|
5
|
-
requires-python = ">=3.
|
5
|
+
requires-python = ">=3.11"
|
6
6
|
dependencies = ["cocoindex>=0.1.42", "jinja2>=3.1.6"]
|
7
7
|
|
8
8
|
[tool.setuptools]
|
@@ -2,7 +2,7 @@
|
|
2
2
|
name = "text-embedding"
|
3
3
|
version = "0.1.0"
|
4
4
|
description = "Simple example for cocoindex: build embedding index based on local text files."
|
5
|
-
requires-python = ">=3.
|
5
|
+
requires-python = ">=3.11"
|
6
6
|
dependencies = [
|
7
7
|
"cocoindex>=0.1.42",
|
8
8
|
"python-dotenv>=1.0.1",
|
@@ -2,7 +2,7 @@
|
|
2
2
|
name = "text-embedding-qdrant"
|
3
3
|
version = "0.1.0"
|
4
4
|
description = "Simple example for cocoindex: build embedding index based on local text files."
|
5
|
-
requires-python = ">=3.
|
5
|
+
requires-python = ">=3.11"
|
6
6
|
dependencies = [
|
7
7
|
"cocoindex>=0.1.42",
|
8
8
|
"python-dotenv>=1.0.1",
|
@@ -0,0 +1,68 @@
|
|
1
|
+
"""
|
2
|
+
Cocoindex is a framework for building and running indexing pipelines.
|
3
|
+
"""
|
4
|
+
|
5
|
+
from . import functions, sources, storages, cli, utils
|
6
|
+
|
7
|
+
from .auth_registry import AuthEntryReference, add_auth_entry, ref_auth_entry
|
8
|
+
from .flow import FlowBuilder, DataScope, DataSlice, Flow, transform_flow
|
9
|
+
from .flow import flow_def
|
10
|
+
from .flow import EvaluateAndDumpOptions, GeneratedField
|
11
|
+
from .flow import update_all_flows_async, FlowLiveUpdater, FlowLiveUpdaterOptions
|
12
|
+
from .lib import init, start_server, stop, main_fn
|
13
|
+
from .llm import LlmSpec, LlmApiType
|
14
|
+
from .index import VectorSimilarityMetric, VectorIndexDef, IndexOptions
|
15
|
+
from .setting import DatabaseConnectionSpec, Settings, ServerSettings
|
16
|
+
from .setting import get_app_namespace
|
17
|
+
from .typing import Float32, Float64, LocalDateTime, OffsetDateTime, Range, Vector, Json
|
18
|
+
|
19
|
+
__all__ = [
|
20
|
+
# Submodules
|
21
|
+
"_engine",
|
22
|
+
"functions",
|
23
|
+
"sources",
|
24
|
+
"storages",
|
25
|
+
"cli",
|
26
|
+
"utils",
|
27
|
+
# Auth registry
|
28
|
+
"AuthEntryReference",
|
29
|
+
"add_auth_entry",
|
30
|
+
"ref_auth_entry",
|
31
|
+
# Flow
|
32
|
+
"FlowBuilder",
|
33
|
+
"DataScope",
|
34
|
+
"DataSlice",
|
35
|
+
"Flow",
|
36
|
+
"transform_flow",
|
37
|
+
"flow_def",
|
38
|
+
"EvaluateAndDumpOptions",
|
39
|
+
"GeneratedField",
|
40
|
+
"update_all_flows_async",
|
41
|
+
"FlowLiveUpdater",
|
42
|
+
"FlowLiveUpdaterOptions",
|
43
|
+
# Lib
|
44
|
+
"init",
|
45
|
+
"start_server",
|
46
|
+
"stop",
|
47
|
+
"main_fn",
|
48
|
+
# LLM
|
49
|
+
"LlmSpec",
|
50
|
+
"LlmApiType",
|
51
|
+
# Index
|
52
|
+
"VectorSimilarityMetric",
|
53
|
+
"VectorIndexDef",
|
54
|
+
"IndexOptions",
|
55
|
+
# Settings
|
56
|
+
"DatabaseConnectionSpec",
|
57
|
+
"Settings",
|
58
|
+
"ServerSettings",
|
59
|
+
"get_app_namespace",
|
60
|
+
# Typing
|
61
|
+
"Float32",
|
62
|
+
"Float64",
|
63
|
+
"LocalDateTime",
|
64
|
+
"OffsetDateTime",
|
65
|
+
"Range",
|
66
|
+
"Vector",
|
67
|
+
"Json",
|
68
|
+
]
|
@@ -237,7 +237,15 @@ def show(app_flow_specifier: str, color: bool, verbose: bool) -> None:
|
|
237
237
|
|
238
238
|
@cli.command()
|
239
239
|
@click.argument("app_target", type=str)
|
240
|
-
|
240
|
+
@click.option(
|
241
|
+
"-f",
|
242
|
+
"--force",
|
243
|
+
is_flag=True,
|
244
|
+
show_default=True,
|
245
|
+
default=False,
|
246
|
+
help="Force setup without confirmation prompts.",
|
247
|
+
)
|
248
|
+
def setup(app_target: str, force: bool) -> None:
|
241
249
|
"""
|
242
250
|
Check and apply backend setup changes for flows, including the internal and target storage
|
243
251
|
(to export).
|
@@ -252,7 +260,7 @@ def setup(app_target: str) -> None:
|
|
252
260
|
if setup_status.is_up_to_date():
|
253
261
|
click.echo("No changes need to be pushed.")
|
254
262
|
return
|
255
|
-
if not click.confirm(
|
263
|
+
if not force and not click.confirm(
|
256
264
|
"Changes need to be pushed. Continue? [yes/N]",
|
257
265
|
default=False,
|
258
266
|
show_default=False,
|
@@ -275,7 +283,17 @@ def setup(app_target: str) -> None:
|
|
275
283
|
"even if not defined in the current process."
|
276
284
|
"If used, APP_TARGET and any listed flow names are ignored.",
|
277
285
|
)
|
278
|
-
|
286
|
+
@click.option(
|
287
|
+
"-f",
|
288
|
+
"--force",
|
289
|
+
is_flag=True,
|
290
|
+
show_default=True,
|
291
|
+
default=False,
|
292
|
+
help="Force drop without confirmation prompts.",
|
293
|
+
)
|
294
|
+
def drop(
|
295
|
+
app_target: str | None, flow_name: tuple[str, ...], drop_all: bool, force: bool
|
296
|
+
) -> None:
|
279
297
|
"""
|
280
298
|
Drop the backend setup for flows.
|
281
299
|
|
@@ -328,7 +346,7 @@ def drop(app_target: str | None, flow_name: tuple[str, ...], drop_all: bool) ->
|
|
328
346
|
if setup_status.is_up_to_date():
|
329
347
|
click.echo("No flows need to be dropped.")
|
330
348
|
return
|
331
|
-
if not click.confirm(
|
349
|
+
if not force and not click.confirm(
|
332
350
|
f"\nThis will apply changes to drop setup for: {', '.join(flow_names)}. Continue? [yes/N]",
|
333
351
|
default=False,
|
334
352
|
show_default=False,
|
@@ -127,8 +127,7 @@ def make_engine_value_decoder(
|
|
127
127
|
return lambda value: uuid.UUID(bytes=value)
|
128
128
|
|
129
129
|
if src_type_kind == "Vector":
|
130
|
-
|
131
|
-
dtype_info = DtypeRegistry.get_by_kind(elem_coco_type_info.kind)
|
130
|
+
dtype_info = DtypeRegistry.get_by_dtype(dst_type_info.np_number_type)
|
132
131
|
|
133
132
|
def decode_vector(value: Any) -> Any | None:
|
134
133
|
if value is None:
|
@@ -237,7 +236,12 @@ def dump_engine_object(v: Any) -> Any:
|
|
237
236
|
nanos = int((total_secs - secs) * 1e9)
|
238
237
|
return {"secs": secs, "nanos": nanos}
|
239
238
|
elif hasattr(v, "__dict__"):
|
240
|
-
s = {
|
239
|
+
s = {}
|
240
|
+
for k, val in v.__dict__.items():
|
241
|
+
if val is None:
|
242
|
+
# Skip None values
|
243
|
+
continue
|
244
|
+
s[k] = dump_engine_object(val)
|
241
245
|
if hasattr(v, "kind") and "kind" not in s:
|
242
246
|
s["kind"] = v.kind
|
243
247
|
return s
|
@@ -62,18 +62,22 @@ def _load_field(
|
|
62
62
|
class Settings:
|
63
63
|
"""Settings for the cocoindex library."""
|
64
64
|
|
65
|
-
database: DatabaseConnectionSpec
|
65
|
+
database: DatabaseConnectionSpec | None = None
|
66
66
|
app_namespace: str = ""
|
67
67
|
|
68
68
|
@classmethod
|
69
69
|
def from_env(cls) -> Self:
|
70
70
|
"""Load settings from environment variables."""
|
71
71
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
72
|
+
database_url = os.getenv("COCOINDEX_DATABASE_URL")
|
73
|
+
if database_url is not None:
|
74
|
+
db_kwargs: dict[str, str] = dict()
|
75
|
+
_load_field(db_kwargs, "url", "COCOINDEX_DATABASE_URL", required=True)
|
76
|
+
_load_field(db_kwargs, "user", "COCOINDEX_DATABASE_USER")
|
77
|
+
_load_field(db_kwargs, "password", "COCOINDEX_DATABASE_PASSWORD")
|
78
|
+
database = DatabaseConnectionSpec(**db_kwargs)
|
79
|
+
else:
|
80
|
+
database = None
|
77
81
|
|
78
82
|
app_namespace = os.getenv("COCOINDEX_APP_NAMESPACE", "")
|
79
83
|
|