cocoindex 0.1.52__tar.gz → 0.1.53__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.52 → cocoindex-0.1.53}/Cargo.lock +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/Cargo.toml +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/PKG-INFO +1 -1
- cocoindex-0.1.53/check.sh +12 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/docs/about/contributing.md +18 -13
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/docs/ai/llm.mdx +86 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/docs/core/basics.md +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/docs/core/custom_function.mdx +2 -2
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/docs/core/flow_methods.mdx +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/amazon_s3_embedding/main.py +2 -2
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/amazon_s3_embedding/pyproject.toml +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/code_embedding/main.py +2 -2
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/code_embedding/pyproject.toml +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/docs_to_knowledge_graph/README.md +3 -3
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/docs_to_knowledge_graph/main.py +19 -19
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/docs_to_knowledge_graph/pyproject.toml +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/fastapi_server_docker/main.py +2 -2
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/fastapi_server_docker/requirements.txt +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/gdrive_text_embedding/main.py +2 -2
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/gdrive_text_embedding/pyproject.toml +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/image_search/main.py +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/image_search/pyproject.toml +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/image_search/requirements.txt +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/manuals_llm_extraction/main.py +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/manuals_llm_extraction/pyproject.toml +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/pdf_embedding/main.py +2 -2
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/pdf_embedding/pyproject.toml +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/product_recommendation/README.md +3 -3
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/product_recommendation/main.py +19 -19
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/product_recommendation/pyproject.toml +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/text_embedding/Text_Embedding.ipynb +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/text_embedding/main.py +2 -2
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/text_embedding/pyproject.toml +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/text_embedding_qdrant/README.md +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/text_embedding_qdrant/main.py +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/text_embedding_qdrant/pyproject.toml +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/python/cocoindex/convert.py +44 -17
- {cocoindex-0.1.52 → cocoindex-0.1.53}/python/cocoindex/llm.py +2 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/python/cocoindex/tests/test_convert.py +158 -26
- {cocoindex-0.1.52 → cocoindex-0.1.53}/python/cocoindex/tests/test_typing.py +90 -71
- {cocoindex-0.1.52 → cocoindex-0.1.53}/python/cocoindex/typing.py +45 -52
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/builder/flow_builder.rs +8 -11
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/execution/db_tracking_setup.rs +0 -2
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/execution/live_updater.rs +10 -10
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/execution/memoization.rs +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/execution/source_indexer.rs +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/lib_context.rs +4 -2
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/llm/anthropic.rs +8 -4
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/llm/gemini.rs +1 -1
- cocoindex-0.1.53/src/llm/litellm.rs +16 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/llm/mod.rs +12 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/llm/openai.rs +5 -1
- cocoindex-0.1.53/src/llm/openrouter.rs +16 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/ops/functions/extract_by_llm.rs +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/ops/targets/kuzu.rs +0 -2
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/ops/targets/neo4j.rs +0 -2
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/ops/targets/postgres.rs +0 -2
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/ops/targets/qdrant.rs +0 -2
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/py/convert.rs +6 -4
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/py/mod.rs +15 -3
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/settings.rs +5 -5
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/setup/db_metadata.rs +0 -2
- {cocoindex-0.1.52 → cocoindex-0.1.53}/.cargo/config.toml +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/.env.lib_debug +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/.github/ISSUE_TEMPLATE//360/237/220/233-bug-report.md +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/.github/ISSUE_TEMPLATE//360/237/222/241-feature-request.md +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/.github/scripts/update_version.sh +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/.github/workflows/CI.yml +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/.github/workflows/_doc_release.yml +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/.github/workflows/_test.yml +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/.github/workflows/docs.yml +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/.github/workflows/release.yml +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/.gitignore +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/.vscode/settings.json +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/CODE_OF_CONDUCT.md +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/CONTRIBUTING.md +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/LICENSE +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/README.md +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/dev/neo4j.yaml +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/dev/postgres.yaml +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/.gitignore +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/README.md +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/docs/about/community.md +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/docs/core/cli.mdx +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/docs/core/data_example.svg +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/docs/core/data_types.mdx +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/docs/core/flow_def.mdx +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/docs/core/flow_example.svg +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/docs/core/settings.mdx +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/docs/getting_started/installation.md +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/docs/getting_started/markdown_files.zip +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/docs/getting_started/overview.md +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/docs/getting_started/quickstart.md +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/docs/ops/functions.md +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/docs/ops/sources.md +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/docs/ops/targets.md +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/docs/query.mdx +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/docusaurus.config.ts +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/package.json +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/sidebars.ts +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/src/components/HomepageFeatures/index.tsx +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/src/components/HomepageFeatures/styles.module.css +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/src/css/custom.css +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/src/theme/Root.js +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/static/.nojekyll +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/static/img/docusaurus.png +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/static/img/favicon.ico +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/static/img/icon.svg +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/static/img/incremental-etl.gif +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/static/robots.txt +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/tsconfig.json +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/docs/yarn.lock +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/amazon_s3_embedding/.env.example +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/amazon_s3_embedding/.gitignore +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/amazon_s3_embedding/README.md +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/code_embedding/.env +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/code_embedding/README.md +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/docs_to_knowledge_graph/.env +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/fastapi_server_docker/.dockerignore +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/fastapi_server_docker/.env +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/fastapi_server_docker/README.md +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/fastapi_server_docker/compose.yaml +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/fastapi_server_docker/dockerfile +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/fastapi_server_docker/files/1810.04805v2.md +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/gdrive_text_embedding/.env.example +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/gdrive_text_embedding/.gitignore +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/gdrive_text_embedding/README.md +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/image_search/.env +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/image_search/README.md +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/image_search/frontend/.gitignore +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/image_search/frontend/index.html +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/image_search/frontend/package-lock.json +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/image_search/frontend/package.json +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/image_search/frontend/src/App.jsx +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/image_search/frontend/src/main.jsx +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/image_search/frontend/src/style.css +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/image_search/frontend/vite.config.js +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/image_search/img/cat1.jpeg +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/image_search/img/dog1.jpeg +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/image_search/img/elephant1.jpg +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/image_search/img/giraffe.jpg +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/manuals_llm_extraction/.env +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/manuals_llm_extraction/README.md +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/manuals_llm_extraction/manuals/array.pdf +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/manuals_llm_extraction/manuals/base64.pdf +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/manuals_llm_extraction/manuals/copy.pdf +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/manuals_llm_extraction/manuals/glob.pdf +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/pdf_embedding/.env +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/pdf_embedding/README.md +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/pdf_embedding/pdf_files/1706.03762v7.pdf +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/pdf_embedding/pdf_files/1810.04805v2.pdf +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/pdf_embedding/pdf_files/rfc8259.pdf +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/product_recommendation/.env +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/product_recommendation/img/cocoinsight.png +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/product_recommendation/img/neo4j.png +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/product_recommendation/products/p1.json +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/product_recommendation/products/p2.json +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/product_recommendation/products/p3.json +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/product_recommendation/products/p4.json +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/product_recommendation/products/p5.json +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/product_recommendation/products/p6.json +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/product_recommendation/products/p7.json +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/product_recommendation/products/p8.json +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/product_recommendation/products/p9.json +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/text_embedding/.env +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/text_embedding/README.md +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/text_embedding/markdown_files/1706.03762v7.md +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/text_embedding/markdown_files/1810.04805v2.md +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/text_embedding/markdown_files/rfc8259.md +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/text_embedding_qdrant/.env +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/examples/text_embedding_qdrant/markdown_files/rfc8259.md +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/pyproject.toml +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/python/cocoindex/__init__.py +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/python/cocoindex/auth_registry.py +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/python/cocoindex/cli.py +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/python/cocoindex/flow.py +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/python/cocoindex/functions.py +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/python/cocoindex/index.py +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/python/cocoindex/lib.py +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/python/cocoindex/op.py +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/python/cocoindex/py.typed +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/python/cocoindex/runtime.py +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/python/cocoindex/setting.py +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/python/cocoindex/setup.py +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/python/cocoindex/sources.py +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/python/cocoindex/targets.py +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/python/cocoindex/tests/__init__.py +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/python/cocoindex/tests/test_optional_database.py +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/python/cocoindex/utils.py +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/ruff.toml +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/base/duration.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/base/field_attrs.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/base/json_schema.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/base/mod.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/base/schema.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/base/spec.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/base/value.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/builder/analyzed_flow.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/builder/analyzer.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/builder/mod.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/builder/plan.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/execution/db_tracking.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/execution/dumper.rs +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/execution/evaluator.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/execution/indexing_status.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/execution/mod.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/execution/row_indexer.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/execution/stats.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/lib.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/llm/ollama.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/ops/factory_bases.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/ops/functions/mod.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/ops/functions/parse_json.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/ops/functions/split_recursively.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/ops/interface.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/ops/mod.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/ops/py_factory.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/ops/registration.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/ops/registry.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/ops/sdk.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/ops/sources/amazon_s3.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/ops/sources/google_drive.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/ops/sources/local_file.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/ops/sources/mod.rs +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/ops/targets/mod.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/ops/targets/shared/mod.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/ops/targets/shared/property_graph.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/ops/targets/shared/table_columns.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/prelude.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/server.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/service/error.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/service/flows.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/service/mod.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/setup/auth_registry.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/setup/components.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/setup/driver.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/setup/mod.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/setup/states.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/utils/db.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/utils/fingerprint.rs +1 -1
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/utils/immutable.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/utils/mod.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/utils/retryable.rs +0 -0
- {cocoindex-0.1.52 → cocoindex-0.1.53}/src/utils/yaml_ser.rs +0 -0
@@ -26,36 +26,36 @@ Following the steps below to get cocoindex build on latest codebase locally - if
|
|
26
26
|
- 🦀 [Install Rust](https://rust-lang.org/tools/install)
|
27
27
|
|
28
28
|
If you don't have Rust installed, run
|
29
|
-
```
|
29
|
+
```sh
|
30
30
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
31
31
|
```
|
32
32
|
Already have Rust? Make sure it's up to date
|
33
|
-
```
|
33
|
+
```sh
|
34
34
|
rustup update
|
35
35
|
```
|
36
36
|
|
37
|
-
-
|
38
|
-
```
|
37
|
+
- Setup Python virtual environment:
|
38
|
+
```sh
|
39
39
|
python3 -m venv .venv
|
40
40
|
```
|
41
|
-
Activate the virtual environment, before any
|
41
|
+
Activate the virtual environment, before any installing / building / running:
|
42
42
|
|
43
|
-
```
|
43
|
+
```sh
|
44
44
|
. .venv/bin/activate
|
45
45
|
```
|
46
46
|
|
47
|
-
- Install
|
48
|
-
```
|
49
|
-
pip install maturin
|
47
|
+
- Install required tools:
|
48
|
+
```sh
|
49
|
+
pip install maturin mypy ruff
|
50
50
|
```
|
51
51
|
|
52
52
|
- Build the library. Run at the root of cocoindex directory:
|
53
|
-
```
|
53
|
+
```sh
|
54
54
|
maturin develop
|
55
55
|
```
|
56
56
|
|
57
|
-
-
|
58
|
-
```
|
57
|
+
- Before running a specific example, set extra environment variables, for exposing extra traces, allowing dev UI, etc.
|
58
|
+
```sh
|
59
59
|
. ./.env.lib_debug
|
60
60
|
```
|
61
61
|
|
@@ -67,7 +67,12 @@ To submit your code:
|
|
67
67
|
1. Fork the [CocoIndex repository](https://github.com/cocoindex-io/cocoindex)
|
68
68
|
2. [Create a new branch](https://docs.github.com/en/desktop/making-changes-in-a-branch/managing-branches-in-github-desktop) on your fork
|
69
69
|
3. Make your changes
|
70
|
-
4.
|
70
|
+
4. Make sure all tests and linting pass by running
|
71
|
+
```sh
|
72
|
+
./check.sh
|
73
|
+
```
|
74
|
+
|
75
|
+
5. [Open a Pull Request (PR)](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) when your work is ready for review
|
71
76
|
|
72
77
|
In your PR description, please include:
|
73
78
|
- Description of the changes
|
@@ -121,3 +121,89 @@ cocoindex.LlmSpec(
|
|
121
121
|
|
122
122
|
You can find the full list of models supported by Anthropic [here](https://docs.anthropic.com/en/docs/about-claude/models/all-models).
|
123
123
|
|
124
|
+
### LiteLLM
|
125
|
+
|
126
|
+
To use the LiteLLM API, you need to set the environment variable `LITELLM_API_KEY`.
|
127
|
+
|
128
|
+
#### 1. Install LiteLLM Proxy
|
129
|
+
|
130
|
+
```bash
|
131
|
+
pip install 'litellm[proxy]'
|
132
|
+
```
|
133
|
+
|
134
|
+
#### 2. Create a `config.yml` for LiteLLM
|
135
|
+
|
136
|
+
**Example for OpenAI:**
|
137
|
+
```yaml
|
138
|
+
model_list:
|
139
|
+
- model_name: "*"
|
140
|
+
litellm_params:
|
141
|
+
model: openai/*
|
142
|
+
api_key: os.environ/LITELLM_API_KEY
|
143
|
+
```
|
144
|
+
|
145
|
+
**Example for DeepSeek:**
|
146
|
+
|
147
|
+
First, pull the DeepSeek model with Ollama:
|
148
|
+
```bash
|
149
|
+
ollama pull deepseek-r1
|
150
|
+
```
|
151
|
+
Then run it if it's not running:
|
152
|
+
```bash
|
153
|
+
ollama run deepseek-r1
|
154
|
+
```
|
155
|
+
|
156
|
+
Then, use this in your `config.yml`:
|
157
|
+
```yaml
|
158
|
+
model_list:
|
159
|
+
- model_name: "deepseek-r1"
|
160
|
+
litellm_params:
|
161
|
+
model: "ollama_chat/deepseek-r1"
|
162
|
+
api_base: "http://localhost:11434"
|
163
|
+
```
|
164
|
+
|
165
|
+
#### 3. Run LiteLLM Proxy
|
166
|
+
|
167
|
+
```bash
|
168
|
+
litellm --config config.yml
|
169
|
+
```
|
170
|
+
|
171
|
+
#### 4. A Spec for LiteLLM will look like this:
|
172
|
+
|
173
|
+
<Tabs>
|
174
|
+
<TabItem value="python" label="Python" default>
|
175
|
+
|
176
|
+
```python
|
177
|
+
cocoindex.LlmSpec(
|
178
|
+
api_type=cocoindex.LlmApiType.LITE_LLM,
|
179
|
+
model="deepseek-r1",
|
180
|
+
address="http://127.0.0.1:4000", # default url of LiteLLM
|
181
|
+
)
|
182
|
+
```
|
183
|
+
|
184
|
+
</TabItem>
|
185
|
+
</Tabs>
|
186
|
+
|
187
|
+
You can find the full list of models supported by LiteLLM [here](https://docs.litellm.ai/docs/providers).
|
188
|
+
|
189
|
+
### OpenRouter
|
190
|
+
|
191
|
+
To use the OpenRouter API, you need to set the environment variable `OPENROUTER_API_KEY`.
|
192
|
+
You can generate the API key from [here](https://openrouter.ai/settings/keys).
|
193
|
+
|
194
|
+
A spec for OpenRouter looks like this:
|
195
|
+
|
196
|
+
<Tabs>
|
197
|
+
<TabItem value="python" label="Python" default>
|
198
|
+
|
199
|
+
```python
|
200
|
+
cocoindex.LlmSpec(
|
201
|
+
api_type=cocoindex.LlmApiType.OPEN_ROUTER,
|
202
|
+
model="deepseek/deepseek-r1:free",
|
203
|
+
)
|
204
|
+
```
|
205
|
+
|
206
|
+
</TabItem>
|
207
|
+
</Tabs>
|
208
|
+
|
209
|
+
You can find the full list of models supported by OpenRouter [here](https://openrouter.ai/models).
|
@@ -50,7 +50,7 @@ For the example shown in the [Quickstart](../getting_started/quickstart) section
|
|
50
50
|
|
51
51
|
This creates the following data for the indexing flow:
|
52
52
|
|
53
|
-
* The `
|
53
|
+
* The `LocalFile` source creates a `documents` field at the top level, with `filename` (key) and `content` sub fields.
|
54
54
|
* A "for each" action works on each document, with the following transformations:
|
55
55
|
* The `SplitRecursively` function splits content into chunks, adds a `chunks` field into the current scope (each document), with `location` (key) and `text` sub fields.
|
56
56
|
* A "collect" action works on each chunk, with the following transformations:
|
@@ -84,7 +84,7 @@ Notes:
|
|
84
84
|
|
85
85
|
### Function Executor
|
86
86
|
|
87
|
-
A function executor defines behavior of a function. It's
|
87
|
+
A function executor defines behavior of a function. It's instantiated for each operation that uses this function.
|
88
88
|
|
89
89
|
The function executor is responsible for:
|
90
90
|
|
@@ -117,7 +117,7 @@ Notes:
|
|
117
117
|
* The `cocoindex.op.executor_class()` class decorator also takes optional parameters.
|
118
118
|
See [Parameters for custom functions](#parameters-for-custom-functions) for details.
|
119
119
|
|
120
|
-
* A `spec` field must be present in the class, and must be
|
120
|
+
* A `spec` field must be present in the class, and must be annotated with the spec class name.
|
121
121
|
* The `prepare()` method is optional. It's executed once and only once before any `__call__` execution, to prepare the function execution.
|
122
122
|
* The `__call__()` method is required. It's executed for each specific rows of data.
|
123
123
|
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.
|
@@ -81,7 +81,7 @@ The `update()` async method creates/updates data in the target.
|
|
81
81
|
Once the function returns, the target data is fresh up to the moment when the function is called.
|
82
82
|
|
83
83
|
```python
|
84
|
-
stats =
|
84
|
+
stats = demo_flow.update()
|
85
85
|
print(stats)
|
86
86
|
```
|
87
87
|
|
@@ -61,7 +61,7 @@ def amazon_s3_text_embedding_flow(
|
|
61
61
|
|
62
62
|
doc_embeddings.export(
|
63
63
|
"doc_embeddings",
|
64
|
-
cocoindex.
|
64
|
+
cocoindex.targets.Postgres(),
|
65
65
|
primary_key_fields=["filename", "location"],
|
66
66
|
vector_indexes=[
|
67
67
|
cocoindex.VectorIndexDef(
|
@@ -74,7 +74,7 @@ def amazon_s3_text_embedding_flow(
|
|
74
74
|
|
75
75
|
def search(pool: ConnectionPool, query: str, top_k: int = 5):
|
76
76
|
# Get the table name, for the export target in the amazon_s3_text_embedding_flow above.
|
77
|
-
table_name = cocoindex.utils.
|
77
|
+
table_name = cocoindex.utils.get_target_default_name(
|
78
78
|
amazon_s3_text_embedding_flow, "doc_embeddings"
|
79
79
|
)
|
80
80
|
# Evaluate the transform flow defined above with the input query, to get the embedding.
|
@@ -3,7 +3,7 @@ name = "amazon-s3-text-embedding"
|
|
3
3
|
version = "0.1.0"
|
4
4
|
description = "Simple example for cocoindex: build embedding index based on Amazon S3 files."
|
5
5
|
requires-python = ">=3.11"
|
6
|
-
dependencies = ["cocoindex>=0.1.
|
6
|
+
dependencies = ["cocoindex>=0.1.52", "python-dotenv>=1.0.1"]
|
7
7
|
|
8
8
|
[tool.setuptools]
|
9
9
|
packages = []
|
@@ -60,7 +60,7 @@ def code_embedding_flow(
|
|
60
60
|
|
61
61
|
code_embeddings.export(
|
62
62
|
"code_embeddings",
|
63
|
-
cocoindex.
|
63
|
+
cocoindex.targets.Postgres(),
|
64
64
|
primary_key_fields=["filename", "location"],
|
65
65
|
vector_indexes=[
|
66
66
|
cocoindex.VectorIndexDef(
|
@@ -73,7 +73,7 @@ def code_embedding_flow(
|
|
73
73
|
|
74
74
|
def search(pool: ConnectionPool, query: str, top_k: int = 5):
|
75
75
|
# Get the table name, for the export target in the code_embedding_flow above.
|
76
|
-
table_name = cocoindex.utils.
|
76
|
+
table_name = cocoindex.utils.get_target_default_name(
|
77
77
|
code_embedding_flow, "code_embeddings"
|
78
78
|
)
|
79
79
|
# Evaluate the transform flow defined above with the input query, to get the embedding.
|
@@ -3,7 +3,7 @@ name = "code-embedding"
|
|
3
3
|
version = "0.1.0"
|
4
4
|
description = "Simple example for cocoindex: build embedding index based on source code."
|
5
5
|
requires-python = ">=3.11"
|
6
|
-
dependencies = ["cocoindex>=0.1.
|
6
|
+
dependencies = ["cocoindex>=0.1.52", "python-dotenv>=1.0.1"]
|
7
7
|
|
8
8
|
[tool.setuptools]
|
9
9
|
packages = []
|
@@ -14,12 +14,12 @@ Please drop [Cocoindex on Github](https://github.com/cocoindex-io/cocoindex) a s
|
|
14
14
|
|
15
15
|
## Prerequisite
|
16
16
|
* [Install Postgres](https://cocoindex.io/docs/getting_started/installation#-install-postgres) if you don't have one.
|
17
|
-
* Install [Neo4j](https://cocoindex.io/docs/ops/
|
17
|
+
* Install [Neo4j](https://cocoindex.io/docs/ops/targets#neo4j-dev-instance) or [Kuzu](https://cocoindex.io/docs/ops/targets#kuzu-dev-instance) if you don't have one.
|
18
18
|
* The example uses Neo4j by default for now. If you want to use Kuzu, find out the "SELECT ONE GRAPH DATABASE TO USE" section and switch the active branch.
|
19
19
|
* [Configure your OpenAI API key](https://cocoindex.io/docs/ai/llm#openai).
|
20
20
|
|
21
21
|
## Documentation
|
22
|
-
You can read the official CocoIndex Documentation for Property Graph Targets [here](https://cocoindex.io/docs/ops/
|
22
|
+
You can read the official CocoIndex Documentation for Property Graph Targets [here](https://cocoindex.io/docs/ops/targets#property-graph-targets).
|
23
23
|
|
24
24
|
## Run
|
25
25
|
|
@@ -48,7 +48,7 @@ cocoindex update main.py
|
|
48
48
|
After the knowledge graph is built, you can explore the knowledge graph.
|
49
49
|
|
50
50
|
* If you're using Neo4j, you can open the explorer at [http://localhost:7474](http://localhost:7474), with username `neo4j` and password `cocoindex`.
|
51
|
-
* If you're using Kuzu, you can start a Kuzu explorer locally. See [Kuzu dev instance](https://cocoindex.io/docs/ops/
|
51
|
+
* If you're using Kuzu, you can start a Kuzu explorer locally. See [Kuzu dev instance](https://cocoindex.io/docs/ops/targets#kuzu-dev-instance) for more details.
|
52
52
|
|
53
53
|
You can run the following Cypher query to get all relationships:
|
54
54
|
|
@@ -7,7 +7,7 @@ import cocoindex
|
|
7
7
|
|
8
8
|
neo4j_conn_spec = cocoindex.add_auth_entry(
|
9
9
|
"Neo4jConnection",
|
10
|
-
cocoindex.
|
10
|
+
cocoindex.targets.Neo4jConnection(
|
11
11
|
uri="bolt://localhost:7687",
|
12
12
|
user="neo4j",
|
13
13
|
password="cocoindex",
|
@@ -15,7 +15,7 @@ neo4j_conn_spec = cocoindex.add_auth_entry(
|
|
15
15
|
)
|
16
16
|
kuzu_conn_spec = cocoindex.add_auth_entry(
|
17
17
|
"KuzuConnection",
|
18
|
-
cocoindex.
|
18
|
+
cocoindex.targets.KuzuConnection(
|
19
19
|
api_server_url="http://localhost:8123",
|
20
20
|
),
|
21
21
|
)
|
@@ -25,15 +25,15 @@ kuzu_conn_spec = cocoindex.add_auth_entry(
|
|
25
25
|
# Please make sure only one branch is live and others are commented out.
|
26
26
|
|
27
27
|
# Use Neo4j
|
28
|
-
GraphDbSpec = cocoindex.
|
29
|
-
GraphDbConnection = cocoindex.
|
30
|
-
GraphDbDeclaration = cocoindex.
|
28
|
+
GraphDbSpec = cocoindex.targets.Neo4j
|
29
|
+
GraphDbConnection = cocoindex.targets.Neo4jConnection
|
30
|
+
GraphDbDeclaration = cocoindex.targets.Neo4jDeclaration
|
31
31
|
conn_spec = neo4j_conn_spec
|
32
32
|
|
33
33
|
# Use Kuzu
|
34
|
-
# GraphDbSpec = cocoindex.
|
35
|
-
# GraphDbConnection = cocoindex.
|
36
|
-
# GraphDbDeclaration = cocoindex.
|
34
|
+
# GraphDbSpec = cocoindex.targets.Kuzu
|
35
|
+
# GraphDbConnection = cocoindex.targets.KuzuConnection
|
36
|
+
# GraphDbDeclaration = cocoindex.targets.KuzuDeclaration
|
37
37
|
# conn_spec = kuzu_conn_spec
|
38
38
|
|
39
39
|
|
@@ -134,7 +134,7 @@ def docs_to_kg_flow(
|
|
134
134
|
document_node.export(
|
135
135
|
"document_node",
|
136
136
|
GraphDbSpec(
|
137
|
-
connection=conn_spec, mapping=cocoindex.
|
137
|
+
connection=conn_spec, mapping=cocoindex.targets.Nodes(label="Document")
|
138
138
|
),
|
139
139
|
primary_key_fields=["filename"],
|
140
140
|
)
|
@@ -150,20 +150,20 @@ def docs_to_kg_flow(
|
|
150
150
|
"entity_relationship",
|
151
151
|
GraphDbSpec(
|
152
152
|
connection=conn_spec,
|
153
|
-
mapping=cocoindex.
|
153
|
+
mapping=cocoindex.targets.Relationships(
|
154
154
|
rel_type="RELATIONSHIP",
|
155
|
-
source=cocoindex.
|
155
|
+
source=cocoindex.targets.NodeFromFields(
|
156
156
|
label="Entity",
|
157
157
|
fields=[
|
158
|
-
cocoindex.
|
158
|
+
cocoindex.targets.TargetFieldMapping(
|
159
159
|
source="subject", target="value"
|
160
160
|
),
|
161
161
|
],
|
162
162
|
),
|
163
|
-
target=cocoindex.
|
163
|
+
target=cocoindex.targets.NodeFromFields(
|
164
164
|
label="Entity",
|
165
165
|
fields=[
|
166
|
-
cocoindex.
|
166
|
+
cocoindex.targets.TargetFieldMapping(
|
167
167
|
source="object", target="value"
|
168
168
|
),
|
169
169
|
],
|
@@ -176,16 +176,16 @@ def docs_to_kg_flow(
|
|
176
176
|
"entity_mention",
|
177
177
|
GraphDbSpec(
|
178
178
|
connection=conn_spec,
|
179
|
-
mapping=cocoindex.
|
179
|
+
mapping=cocoindex.targets.Relationships(
|
180
180
|
rel_type="MENTION",
|
181
|
-
source=cocoindex.
|
181
|
+
source=cocoindex.targets.NodeFromFields(
|
182
182
|
label="Document",
|
183
|
-
fields=[cocoindex.
|
183
|
+
fields=[cocoindex.targets.TargetFieldMapping("filename")],
|
184
184
|
),
|
185
|
-
target=cocoindex.
|
185
|
+
target=cocoindex.targets.NodeFromFields(
|
186
186
|
label="Entity",
|
187
187
|
fields=[
|
188
|
-
cocoindex.
|
188
|
+
cocoindex.targets.TargetFieldMapping(
|
189
189
|
source="entity", target="value"
|
190
190
|
)
|
191
191
|
],
|
@@ -3,7 +3,7 @@ name = "manuals-to-kg"
|
|
3
3
|
version = "0.1.0"
|
4
4
|
description = "Simple example for cocoindex: extract triples from files and build knowledge graph."
|
5
5
|
requires-python = ">=3.11"
|
6
|
-
dependencies = ["cocoindex>=0.1.
|
6
|
+
dependencies = ["cocoindex>=0.1.52"]
|
7
7
|
|
8
8
|
[tool.setuptools]
|
9
9
|
packages = []
|
@@ -54,7 +54,7 @@ def markdown_embedding_flow(
|
|
54
54
|
|
55
55
|
doc_embeddings.export(
|
56
56
|
"doc_embeddings",
|
57
|
-
cocoindex.
|
57
|
+
cocoindex.targets.Postgres(),
|
58
58
|
primary_key_fields=["filename", "location"],
|
59
59
|
vector_indexes=[
|
60
60
|
cocoindex.VectorIndexDef(
|
@@ -67,7 +67,7 @@ def markdown_embedding_flow(
|
|
67
67
|
|
68
68
|
def search(pool: ConnectionPool, query: str, top_k: int = 5):
|
69
69
|
# Get the table name, for the export target in the text_embedding_flow above.
|
70
|
-
table_name = cocoindex.utils.
|
70
|
+
table_name = cocoindex.utils.get_target_default_name(
|
71
71
|
markdown_embedding_flow, "doc_embeddings"
|
72
72
|
)
|
73
73
|
# Evaluate the transform flow defined above with the input query, to get the embedding.
|
@@ -60,7 +60,7 @@ def gdrive_text_embedding_flow(
|
|
60
60
|
|
61
61
|
doc_embeddings.export(
|
62
62
|
"doc_embeddings",
|
63
|
-
cocoindex.
|
63
|
+
cocoindex.targets.Postgres(),
|
64
64
|
primary_key_fields=["filename", "location"],
|
65
65
|
vector_indexes=[
|
66
66
|
cocoindex.VectorIndexDef(
|
@@ -73,7 +73,7 @@ def gdrive_text_embedding_flow(
|
|
73
73
|
|
74
74
|
def search(pool: ConnectionPool, query: str, top_k: int = 5):
|
75
75
|
# Get the table name, for the export target in the gdrive_text_embedding_flow above.
|
76
|
-
table_name = cocoindex.utils.
|
76
|
+
table_name = cocoindex.utils.get_target_default_name(
|
77
77
|
gdrive_text_embedding_flow, "doc_embeddings"
|
78
78
|
)
|
79
79
|
# Evaluate the transform flow defined above with the input query, to get the embedding.
|
@@ -3,7 +3,7 @@ name = "gdrive-text-embedding"
|
|
3
3
|
version = "0.1.0"
|
4
4
|
description = "Simple example for cocoindex: build embedding index based on Google Drive files."
|
5
5
|
requires-python = ">=3.11"
|
6
|
-
dependencies = ["cocoindex>=0.1.
|
6
|
+
dependencies = ["cocoindex>=0.1.52", "python-dotenv>=1.0.1"]
|
7
7
|
|
8
8
|
[tool.setuptools]
|
9
9
|
packages = []
|
@@ -3,7 +3,7 @@ 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
5
|
requires-python = ">=3.11"
|
6
|
-
dependencies = ["cocoindex>=0.1.
|
6
|
+
dependencies = ["cocoindex>=0.1.52", "marker-pdf>=1.5.2"]
|
7
7
|
|
8
8
|
[tool.setuptools]
|
9
9
|
packages = []
|
@@ -86,7 +86,7 @@ def pdf_embedding_flow(
|
|
86
86
|
|
87
87
|
pdf_embeddings.export(
|
88
88
|
"pdf_embeddings",
|
89
|
-
cocoindex.
|
89
|
+
cocoindex.targets.Postgres(),
|
90
90
|
primary_key_fields=["id"],
|
91
91
|
vector_indexes=[
|
92
92
|
cocoindex.VectorIndexDef(
|
@@ -99,7 +99,7 @@ def pdf_embedding_flow(
|
|
99
99
|
|
100
100
|
def search(pool: ConnectionPool, query: str, top_k: int = 5):
|
101
101
|
# Get the table name, for the export target in the pdf_embedding_flow above.
|
102
|
-
table_name = cocoindex.utils.
|
102
|
+
table_name = cocoindex.utils.get_target_default_name(
|
103
103
|
pdf_embedding_flow, "pdf_embeddings"
|
104
104
|
)
|
105
105
|
# Evaluate the transform flow defined above with the input query, to get the embedding.
|
@@ -9,12 +9,12 @@ Please drop [CocoIndex on Github](https://github.com/cocoindex-io/cocoindex) a s
|
|
9
9
|
|
10
10
|
## Prerequisite
|
11
11
|
* [Install Postgres](https://cocoindex.io/docs/getting_started/installation#-install-postgres) if you don't have one.
|
12
|
-
* Install [Neo4j](https://cocoindex.io/docs/ops/
|
12
|
+
* Install [Neo4j](https://cocoindex.io/docs/ops/targets#neo4j-dev-instance) or [Kuzu](https://cocoindex.io/docs/ops/targets#kuzu-dev-instance) if you don't have one.
|
13
13
|
* The example uses Neo4j by default for now. If you want to use Kuzu, find out the "SELECT ONE GRAPH DATABASE TO USE" section and switch the active branch.
|
14
14
|
* [Configure your OpenAI API key](https://cocoindex.io/docs/ai/llm#openai).
|
15
15
|
|
16
16
|
## Documentation
|
17
|
-
You can read the official CocoIndex Documentation for Property Graph Targets [here](https://cocoindex.io/docs/ops/
|
17
|
+
You can read the official CocoIndex Documentation for Property Graph Targets [here](https://cocoindex.io/docs/ops/targets#property-graph-targets).
|
18
18
|
|
19
19
|
## Run
|
20
20
|
|
@@ -43,7 +43,7 @@ cocoindex update main.py
|
|
43
43
|
After the knowledge graph is built, you can explore the knowledge graph.
|
44
44
|
|
45
45
|
* If you're using Neo4j, you can open the explorer at [http://localhost:7474](http://localhost:7474), with username `neo4j` and password `cocoindex`.
|
46
|
-
* If you're using Kuzu, you can start a Kuzu explorer locally. See [Kuzu dev instance](https://cocoindex.io/docs/ops/
|
46
|
+
* If you're using Kuzu, you can start a Kuzu explorer locally. See [Kuzu dev instance](https://cocoindex.io/docs/ops/targets#kuzu-dev-instance) for more details.
|
47
47
|
|
48
48
|
You can run the following Cypher query to get all relationships:
|
49
49
|
|