TalkPipe 0.9.2__tar.gz → 0.9.4__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.
- {talkpipe-0.9.2 → talkpipe-0.9.4}/.github/workflows/ci-cd.yml +4 -4
- {talkpipe-0.9.2 → talkpipe-0.9.4}/CHANGELOG.md +47 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/CLAUDE.md +2 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/Dockerfile +4 -3
- {talkpipe-0.9.2 → talkpipe-0.9.4}/PKG-INFO +1 -1
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/api-reference/talkpipe-plugin-manager.md +33 -20
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_1-Document_Indexing/README.md +34 -28
- talkpipe-0.9.4/docs/tutorials/Tutorial_1-Document_Indexing/Step_1_CreateSyntheticData.bat +2 -0
- talkpipe-0.9.2/docs/tutorials/Tutorial_1-Document_Indexing/Step_1_CreateSyntheticData.sh → talkpipe-0.9.4/docs/tutorials/Tutorial_1-Document_Indexing/Step_1_CreateSyntheticData.script +10 -11
- talkpipe-0.9.4/docs/tutorials/Tutorial_1-Document_Indexing/Step_1_CreateSyntheticData.sh +2 -0
- talkpipe-0.9.4/docs/tutorials/Tutorial_1-Document_Indexing/Step_2_IndexStories.bat +2 -0
- talkpipe-0.9.2/docs/tutorials/Tutorial_1-Document_Indexing/Step_2_IndexStories.sh → talkpipe-0.9.4/docs/tutorials/Tutorial_1-Document_Indexing/Step_2_IndexStories.script +6 -11
- talkpipe-0.9.4/docs/tutorials/Tutorial_1-Document_Indexing/Step_2_IndexStories.sh +2 -0
- talkpipe-0.9.4/docs/tutorials/Tutorial_1-Document_Indexing/Step_3_SearchStories.bat +2 -0
- talkpipe-0.9.2/docs/tutorials/Tutorial_1-Document_Indexing/Step_3_SearchStories.sh → talkpipe-0.9.4/docs/tutorials/Tutorial_1-Document_Indexing/Step_3_SearchStories.script +2 -5
- talkpipe-0.9.4/docs/tutorials/Tutorial_1-Document_Indexing/Step_3_SearchStories.sh +2 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_2-Search_by_Example_and_RAG/README.md +44 -32
- talkpipe-0.9.4/docs/tutorials/Tutorial_2-Search_by_Example_and_RAG/Step_1_CreateVectorDatabase.bat +2 -0
- talkpipe-0.9.2/docs/tutorials/Tutorial_2-Search_by_Example_and_RAG/Step_1_CreateVectorDatabase.sh → talkpipe-0.9.4/docs/tutorials/Tutorial_2-Search_by_Example_and_RAG/Step_1_CreateVectorDatabase.script +5 -9
- talkpipe-0.9.4/docs/tutorials/Tutorial_2-Search_by_Example_and_RAG/Step_1_CreateVectorDatabase.sh +2 -0
- talkpipe-0.9.4/docs/tutorials/Tutorial_2-Search_by_Example_and_RAG/Step_2_SearchByExample.bat +2 -0
- talkpipe-0.9.2/docs/tutorials/Tutorial_2-Search_by_Example_and_RAG/Step_2_SearchByExample.sh → talkpipe-0.9.4/docs/tutorials/Tutorial_2-Search_by_Example_and_RAG/Step_2_SearchByExample.script +5 -9
- talkpipe-0.9.4/docs/tutorials/Tutorial_2-Search_by_Example_and_RAG/Step_2_SearchByExample.sh +2 -0
- talkpipe-0.9.4/docs/tutorials/Tutorial_2-Search_by_Example_and_RAG/Step_3_SpecializedRag.bat +2 -0
- talkpipe-0.9.2/docs/tutorials/Tutorial_2-Search_by_Example_and_RAG/Step_3_SpecializedRag.sh → talkpipe-0.9.4/docs/tutorials/Tutorial_2-Search_by_Example_and_RAG/Step_3_SpecializedRag.script +7 -11
- talkpipe-0.9.4/docs/tutorials/Tutorial_2-Search_by_Example_and_RAG/Step_3_SpecializedRag.sh +2 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_3_Report_Writing/README.md +37 -31
- talkpipe-0.9.4/docs/tutorials/Tutorial_3_Report_Writing/Step_1_ExecutiveSummaryGeneration.bat +2 -0
- talkpipe-0.9.2/docs/tutorials/Tutorial_3_Report_Writing/Step_1_ExecutiveSummaryGeneration.sh → talkpipe-0.9.4/docs/tutorials/Tutorial_3_Report_Writing/Step_1_ExecutiveSummaryGeneration.script +6 -10
- talkpipe-0.9.4/docs/tutorials/Tutorial_3_Report_Writing/Step_1_ExecutiveSummaryGeneration.sh +2 -0
- talkpipe-0.9.4/docs/tutorials/Tutorial_3_Report_Writing/Step_2_DetailedAnalysisReportGeneration.bat +2 -0
- talkpipe-0.9.2/docs/tutorials/Tutorial_3_Report_Writing/Step_2_DetailedAnalysisReportGeneration.sh → talkpipe-0.9.4/docs/tutorials/Tutorial_3_Report_Writing/Step_2_DetailedAnalysisReportGeneration.script +6 -10
- talkpipe-0.9.4/docs/tutorials/Tutorial_3_Report_Writing/Step_2_DetailedAnalysisReportGeneration.sh +2 -0
- talkpipe-0.9.4/docs/tutorials/Tutorial_3_Report_Writing/Step_3_MultiFormatReportGeneration.bat +2 -0
- talkpipe-0.9.2/docs/tutorials/Tutorial_3_Report_Writing/Step_3_MultiFormatReportGeneration.sh → talkpipe-0.9.4/docs/tutorials/Tutorial_3_Report_Writing/Step_3_MultiFormatReportGeneration.script +5 -9
- talkpipe-0.9.4/docs/tutorials/Tutorial_3_Report_Writing/Step_3_MultiFormatReportGeneration.sh +2 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/pyproject.toml +0 -1
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/app/chatterlang_serve.py +26 -22
- talkpipe-0.9.4/src/talkpipe/app/static/unit-docs.html +1 -0
- talkpipe-0.9.4/src/talkpipe/app/static/unit-docs.txt +1 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/chatterlang/compiler.py +12 -2
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/chatterlang/parsers.py +5 -4
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/data/extraction.py +15 -13
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/data/html.py +2 -2
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/llm/chat.py +6 -1
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/llm/config.py +0 -2
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/llm/embedding_adapters.py +9 -3
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/llm/prompt_adapters.py +22 -5
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/operations/matrices.py +2 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/pipe/basic.py +13 -38
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/pipe/io.py +84 -11
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/util/config.py +30 -20
- talkpipe-0.9.4/src/talkpipe/util/constants.py +3 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/util/data_manipulation.py +2 -5
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe.egg-info/PKG-INFO +1 -1
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe.egg-info/SOURCES.txt +20 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe.egg-info/entry_points.txt +0 -1
- talkpipe-0.9.4/stories.json +50 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/app/test_chatterlang_script.py +33 -4
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/app/test_chatterlang_serve.py +59 -16
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/chatterlang/test_compiler.py +16 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/chatterlang/test_parsers.py +7 -1
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/llm/test_chat.py +23 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/pipe/test_io.py +109 -3
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/util/test_util.py +18 -13
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/test_security_vulnerabilities.py +5 -5
- talkpipe-0.9.2/src/talkpipe/app/static/unit-docs.html +0 -1
- talkpipe-0.9.2/src/talkpipe/app/static/unit-docs.txt +0 -1
- {talkpipe-0.9.2 → talkpipe-0.9.4}/.bandit +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/.dockerignore +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/.github/CICD.md +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/.github/ISSUE_TEMPLATE/release-checklist.md +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/.github/SECURITY.md +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/.github/dependabot.yml +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/.gitignore +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/.safety-project.ini +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/.vscode/settings.json +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/.vscode/tasks.json +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/COPYRIGHT +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/LICENSE +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/README.md +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/bin/config-analyzer.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/bin/config_bash +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/.gitignore +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/LLMChat.png +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/LLMEvaluateWebPage.png +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/README.md +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/TalkPipe.png +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/TalkPipe.xcf +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/api-reference/README.md +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/api-reference/chatterlang-script.md +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/api-reference/chatterlang-server.md +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/api-reference/chatterlang-workbench.md +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/api-reference/talkpipe-ref.md +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/architecture/README.md +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/architecture/chatterlang.md +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/architecture/configuration.md +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/architecture/extending-talkpipe.md +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/architecture/pipe-api.md +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/architecture/streaming.md +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/make_structure_diagram.sh +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/quickstart.md +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/structure.tex +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/talkpipe_diagram.png +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/.gitignore +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/README.md +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_1-Document_Indexing/stories.json +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_1-Document_Indexing/story_search_ui.yml +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_2-Search_by_Example_and_RAG/step_3_extras.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_2-Search_by_Example_and_RAG/story_by_example_ui.yml +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_3_Report_Writing/file_structure.md +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_3_Report_Writing/multi_format_ui.yml +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_3_Report_Writing/report_topic_ui.yml +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_3_Report_Writing/step3_extras.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_3_Report_Writing/step_1_extras.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_3_Report_Writing/step_2_extras.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/pytest.ini +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/setup.cfg +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/setup.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/__init__.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/app/__init__.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/app/chatterlang_reference_browser.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/app/chatterlang_reference_generator.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/app/chatterlang_script.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/app/chatterlang_workbench.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/app/static/.gitignore +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/app/static/favicon.ico +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/app/talkpipe_plugin_manager.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/chatterlang/__init__.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/chatterlang/registry.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/data/__init__.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/data/email.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/data/mongo.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/data/rss.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/llm/__init__.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/llm/embedding.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/operations/__init__.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/operations/filtering.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/operations/thread_ops.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/operations/transforms.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/pipe/__init__.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/pipe/core.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/pipe/fork.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/pipe/math.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/search/abstract.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/search/lancedb.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/search/simplevectordb.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/search/whoosh.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/util/__init__.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/util/collections.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/util/doc_extraction.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/util/os.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/util/plugin_loader.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe.egg-info/dependency_links.txt +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe.egg-info/requires.txt +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe.egg-info/top_level.txt +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/test-workflow.yml +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/conftest.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/app/test_chatterlang_reference_browser.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/app/test_chatterlang_reference_generator.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/app/test_talkpipe_plugin_manager.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/chatterlang/test_chatterlang_workbench.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/data/sample_feed.pkl +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/data/test.docx +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/data/test_email.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/data/test_extraction.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/data/test_html.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/data/test_html_exceptions.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/data/test_mogomock.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/data/test_mongo.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/data/test_mongo_integration.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/data/test_rss.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/llm/test_embedding.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/operations/test_filtering.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/operations/test_matrices.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/operations/test_threading.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/operations/test_transforms.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/pipe/test_basic.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/pipe/test_core.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/pipe/test_fork.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/pipe/test_math.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/search/test_lancedb.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/search/test_simplevectordb.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/search/test_whoosh.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/test_documentation_examples.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/util/test_collections.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/util/test_config.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/util/test_data_manipulation.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/util/test_doc_extraction.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/util/test_plugin_loader.py +0 -0
- {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/testutils.py +0 -0
|
@@ -148,7 +148,7 @@ jobs:
|
|
|
148
148
|
output: 'trivy-results.sarif'
|
|
149
149
|
|
|
150
150
|
- name: Upload Trivy scan results to GitHub Security tab
|
|
151
|
-
uses: github/codeql-action/upload-sarif@
|
|
151
|
+
uses: github/codeql-action/upload-sarif@v4
|
|
152
152
|
if: always()
|
|
153
153
|
with:
|
|
154
154
|
sarif_file: 'trivy-results.sarif'
|
|
@@ -171,15 +171,15 @@ jobs:
|
|
|
171
171
|
uses: actions/checkout@v5
|
|
172
172
|
|
|
173
173
|
- name: Initialize CodeQL
|
|
174
|
-
uses: github/codeql-action/init@
|
|
174
|
+
uses: github/codeql-action/init@v4
|
|
175
175
|
with:
|
|
176
176
|
languages: ${{ matrix.language }}
|
|
177
177
|
|
|
178
178
|
- name: Autobuild
|
|
179
|
-
uses: github/codeql-action/autobuild@
|
|
179
|
+
uses: github/codeql-action/autobuild@v4
|
|
180
180
|
|
|
181
181
|
- name: Perform CodeQL Analysis
|
|
182
|
-
uses: github/codeql-action/analyze@
|
|
182
|
+
uses: github/codeql-action/analyze@v4
|
|
183
183
|
|
|
184
184
|
publish-package:
|
|
185
185
|
runs-on: ubuntu-latest
|
|
@@ -1,5 +1,52 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.9.4
|
|
4
|
+
### Improvements
|
|
5
|
+
- Changes several logging statements to make the consistent with the rest of the code
|
|
6
|
+
- Refactored **lambda** to use AbstractFieldSegment for consistency
|
|
7
|
+
- Removed fail_on_error parameter in **lambda** and **lambdaFilter**. This is an API breaking change.
|
|
8
|
+
The segments will now always fail on an error and there is no option to silently fail.
|
|
9
|
+
- Changed chatterlang_serve so that it raises and exception an exits if given a script that can't be
|
|
10
|
+
compiled. The previous behavior was that it would issue a log message and fall back to the default
|
|
11
|
+
script.
|
|
12
|
+
- Added unit test for parse_unknown_args and expanded it to support boolean flag parameters
|
|
13
|
+
- Marked UMAP as deprecated. It will be removed in 1.0. It requires additional dependencies that no
|
|
14
|
+
other core modules need.
|
|
15
|
+
- Updated the ollama embedding and chat connector so that it uses the OLLAMA_SERVER_URL configuration
|
|
16
|
+
variable as the host where ollama is installed. So OLLAMA_SERVER_URL can be set in the TOML configuration
|
|
17
|
+
file or TALKPIPE_OLLAMA_SERVER_URL can be set as an environment variable.
|
|
18
|
+
- Implemented better compile errors for when sources or segments are not found. It had been a key error.
|
|
19
|
+
It will now be a compile error.
|
|
20
|
+
- Added batch files for the tutorials so it is easier to run them on Windows
|
|
21
|
+
- Enhanced **prompt** source to catch downstream pipeline errors and continue prompting instead of
|
|
22
|
+
crashing. When a user enters invalid input that causes an exception in downstream segments, the error
|
|
23
|
+
is displayed with a full traceback, and the prompt continues accepting input. This makes interactive
|
|
24
|
+
pipelines more robust and user-friendly. The error-resilient behavior is enabled by default but can
|
|
25
|
+
be disabled by setting `error_resilient=False`.
|
|
26
|
+
- Updated **chatterlang_serve** to support API key configuration via the configuration system. When
|
|
27
|
+
`--api-key` is not specified on the command line, it will check for `API_KEY` in the configuration,
|
|
28
|
+
which automatically checks the `TALKPIPE_API_KEY` environment variable. This makes it easier to
|
|
29
|
+
deploy chatterlang_serve in Docker and CI/CD environments without exposing API keys in command history.
|
|
30
|
+
- Added support for single-quoted strings in ChatterLang scripts. Single quotes work identically to
|
|
31
|
+
double quotes, including support for escaping quotes by doubling them (`''` → `'`). This provides
|
|
32
|
+
more flexibility when writing scripts, especially when the string content contains double quotes.
|
|
33
|
+
- Enhanced **echo** source with an `n` parameter to repeat the output data multiple times. For example,
|
|
34
|
+
`echo[data='a,b', n=3]` will emit: a, b, a, b, a, b. This is useful for testing pipelines and
|
|
35
|
+
generating repeated test data.
|
|
36
|
+
- Improved **chatterlang_serve** startup output to clearly distinguish between the user interface URL
|
|
37
|
+
and the API endpoint URL. The server now displays a formatted message showing both URLs with clear
|
|
38
|
+
labels when it starts.
|
|
39
|
+
- Updated tutorial 1, step 1 to show more feedback to the user so it doesn't just seem to be hanging
|
|
40
|
+
|
|
41
|
+
## 0.9.3
|
|
42
|
+
### Improvements
|
|
43
|
+
- Updated tutorials to use lancedb.
|
|
44
|
+
- Moved tutorial scripts out of shell scripts into their own files
|
|
45
|
+
- Fixed issue with Docker container not including all optional installation components
|
|
46
|
+
- Fixed string encoding issue with web page downloads
|
|
47
|
+
- Updated documentation for plugins to fix error
|
|
48
|
+
- Removed invalid script in pyproject.toml
|
|
49
|
+
|
|
3
50
|
## 0.9.2
|
|
4
51
|
### Improvements
|
|
5
52
|
- Added ability for sources and segments to have multiple names in chatterlang.
|
|
@@ -16,6 +16,8 @@ ChatterLang is an external DSL and is defined under talkpipe/chatterlang
|
|
|
16
16
|
Other packages in the project other than util include implementations of pipe sources and segments
|
|
17
17
|
Util contains various generally usable utility functions, expecially for basic data manipulation and configuration.
|
|
18
18
|
talkpipe/README.md contains a longer overview
|
|
19
|
+
After making a change, update CHANGELOG.md
|
|
20
|
+
When making a change, write a unit test that fails without the change, verify that the unit test fails, make the change and then verity that the unit test now passes. Notify the user if it is not reasonable to write the unit test.
|
|
19
21
|
|
|
20
22
|
## Important Commands
|
|
21
23
|
python -m build for creating a new release
|
|
@@ -34,8 +34,8 @@ COPY --chown=builder:builder src/ src/
|
|
|
34
34
|
COPY --chown=builder:builder tests/ tests/
|
|
35
35
|
|
|
36
36
|
# Install Python dependencies and build the package
|
|
37
|
-
RUN python3 -m pip install --
|
|
38
|
-
RUN python3 -m pip install
|
|
37
|
+
RUN python3 -m pip install --upgrade pip setuptools wheel build
|
|
38
|
+
RUN python3 -m pip install numpy pandas matplotlib scikit-learn scipy
|
|
39
39
|
ENV SETUPTOOLS_SCM_PRETEND_VERSION_FOR_TALKPIPE=0.1.0
|
|
40
40
|
RUN python3 -m pip install --user -e .[dev,all]
|
|
41
41
|
RUN python3 -m pytest --log-cli-level=DEBUG
|
|
@@ -70,7 +70,8 @@ COPY --from=builder --chown=app:app /build/dist/*.whl /tmp/
|
|
|
70
70
|
RUN python3 -m pip install --no-cache-dir --upgrade pip && \
|
|
71
71
|
python3 -m pip install --no-cache-dir \
|
|
72
72
|
numpy pandas matplotlib scikit-learn scipy && \
|
|
73
|
-
|
|
73
|
+
WHEEL_FILE=$(ls /tmp/*.whl) && \
|
|
74
|
+
python3 -m pip install --no-cache-dir "${WHEEL_FILE}[all]" && \
|
|
74
75
|
rm -f /tmp/*.whl
|
|
75
76
|
|
|
76
77
|
# Copy only necessary runtime files
|
|
@@ -4,7 +4,7 @@ Command-line tool for managing and inspecting TalkPipe plugins.
|
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
The `
|
|
7
|
+
The `talkpipe_plugins` command provides utilities to list, reload, and debug TalkPipe plugins that are installed via Python entry points.
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
@@ -21,7 +21,7 @@ pip install talkpipe
|
|
|
21
21
|
Display all discovered plugins and their status:
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
|
|
24
|
+
talkpipe_plugins --list
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
**Example output:**
|
|
@@ -40,7 +40,7 @@ Failed plugins (1):
|
|
|
40
40
|
Reload a specific plugin by name (useful during development):
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
|
|
43
|
+
talkpipe_plugins --reload my-data-plugin
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
### Verbose Output
|
|
@@ -48,7 +48,7 @@ talkpipe_plugin_manager --reload my-data-plugin
|
|
|
48
48
|
Show detailed information:
|
|
49
49
|
|
|
50
50
|
```bash
|
|
51
|
-
|
|
51
|
+
talkpipe_plugins --list --verbose
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
## Plugin Discovery
|
|
@@ -65,7 +65,7 @@ setup(
|
|
|
65
65
|
name="my-talkpipe-plugin",
|
|
66
66
|
entry_points={
|
|
67
67
|
"talkpipe.plugins": [
|
|
68
|
-
"my_plugin = my_plugin.plugin
|
|
68
|
+
"my_plugin = my_plugin.plugin",
|
|
69
69
|
]
|
|
70
70
|
}
|
|
71
71
|
)
|
|
@@ -74,21 +74,31 @@ setup(
|
|
|
74
74
|
**pyproject.toml:**
|
|
75
75
|
```toml
|
|
76
76
|
[project.entry-points."talkpipe.plugins"]
|
|
77
|
-
my_plugin = "my_plugin.plugin
|
|
77
|
+
my_plugin = "my_plugin.plugin"
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
+
The entry point should reference the **module** that contains your plugin code. Component registration happens automatically through decorators when the module is imported.
|
|
81
|
+
|
|
80
82
|
## How Plugin Loading Works
|
|
81
83
|
|
|
82
84
|
When TalkPipe discovers a plugin, it performs the following steps:
|
|
83
85
|
|
|
84
|
-
1. **
|
|
86
|
+
1. **Load the entry point**: The plugin loader loads whatever the entry point references (typically a module or function)
|
|
85
87
|
2. **Automatic registration**: During import, any sources and segments defined or imported by the module are automatically registered with TalkPipe's registry system through decorators like `@registry.register_segment()`
|
|
86
|
-
3. **Optional initialization**: If the loaded
|
|
88
|
+
3. **Optional initialization**: If the loaded object has an `initialize_plugin` function attribute, it will be called for additional setup
|
|
87
89
|
|
|
88
90
|
The key insight is that **simply importing the plugin module triggers component registration**. This happens through TalkPipe's decorator-based registry system.
|
|
89
91
|
|
|
92
|
+
**Important**: The entry point should reference either:
|
|
93
|
+
- A **module** (e.g., `my_plugin.plugin`) that can have a module-level `initialize_plugin()` function
|
|
94
|
+
- A **function** directly (e.g., `my_plugin.plugin:setup_plugin`)
|
|
95
|
+
|
|
96
|
+
Entry points pointing to classes will have the `initialize_plugin` called on the **class itself** (not an instance), so it would need to be a static method or classmethod if using a class.
|
|
97
|
+
|
|
90
98
|
### Example Plugin Structure
|
|
91
99
|
|
|
100
|
+
**Recommended: Module-level pattern**
|
|
101
|
+
|
|
92
102
|
```python
|
|
93
103
|
# my_plugin/plugin.py
|
|
94
104
|
from talkpipe.chatterlang import registry
|
|
@@ -104,19 +114,22 @@ class JsonParseSegment(AbstractSegment):
|
|
|
104
114
|
"""JSON parsing segment - registered automatically on import."""
|
|
105
115
|
pass
|
|
106
116
|
|
|
107
|
-
|
|
108
|
-
"""
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
117
|
+
def initialize_plugin():
|
|
118
|
+
"""Optional: Called after module import for additional setup."""
|
|
119
|
+
print("Network plugin initialized!")
|
|
120
|
+
# Additional setup if needed
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Entry point configuration** (points to the module):
|
|
124
|
+
```toml
|
|
125
|
+
[project.entry-points."talkpipe.plugins"]
|
|
126
|
+
network_plugin = "my_plugin.plugin"
|
|
114
127
|
```
|
|
115
128
|
|
|
116
|
-
When this module is
|
|
129
|
+
When this module is loaded:
|
|
117
130
|
1. The `@registry.register_source("httpGet")` decorator runs, registering the `HttpGetSource`
|
|
118
|
-
2. The `@registry.register_segment("jsonParse")` decorator runs, registering the `JsonParseSegment`
|
|
119
|
-
3. The `
|
|
131
|
+
2. The `@registry.register_segment("jsonParse")` decorator runs, registering the `JsonParseSegment`
|
|
132
|
+
3. The module-level `initialize_plugin()` function is called for any additional setup
|
|
120
133
|
|
|
121
134
|
### Alternative: Module-Level Registration
|
|
122
135
|
|
|
@@ -157,10 +170,10 @@ During plugin development, you can reload plugins without restarting Python:
|
|
|
157
170
|
```bash
|
|
158
171
|
# Make changes to your plugin code
|
|
159
172
|
# Then reload it
|
|
160
|
-
|
|
173
|
+
talkpipe_plugins --reload my-plugin
|
|
161
174
|
|
|
162
175
|
# Verify it loaded successfully
|
|
163
|
-
|
|
176
|
+
talkpipe_plugins --list
|
|
164
177
|
```
|
|
165
178
|
|
|
166
179
|
## Integration with TalkPipe
|
|
@@ -57,20 +57,22 @@ However, for testing and development purposes, we often need synthetic data that
|
|
|
57
57
|
|
|
58
58
|
### The Solution: AI-Generated Stories
|
|
59
59
|
|
|
60
|
-
The first step uses TalkPipe's ChatterLang scripting language to generate 50 fictional stories about technology development.
|
|
60
|
+
The first step uses TalkPipe's ChatterLang scripting language to generate 50 fictional stories about technology development. The pipeline is defined in `Step_1_CreateSyntheticData.script`:
|
|
61
61
|
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
62
|
+
```
|
|
63
|
+
LOOP 50 TIMES {
|
|
64
|
+
INPUT FROM "Write a fictitious five sentence story about technology development in an imaginary country."
|
|
65
|
+
| llmPrompt[source="ollama", model="llama3.2", multi_turn=False]
|
|
66
|
+
| toDict[field_list="_:content"]
|
|
67
|
+
| llmPrompt[source="ollama", model="llama3.2", system_prompt="Write exactly one title for this story in plain text with no markdown", field="content", set_as="title", multi_turn=False]
|
|
68
|
+
| dumpsJsonl | print;
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
To run this script:
|
|
72
73
|
|
|
73
|
-
|
|
74
|
+
```bash
|
|
75
|
+
chatterlang_script --script Step_1_CreateSyntheticData.script > stories.json
|
|
74
76
|
```
|
|
75
77
|
|
|
76
78
|
### Breaking Down the Pipeline
|
|
@@ -166,17 +168,19 @@ Think of an index like the index at the back of a book, but much more sophistica
|
|
|
166
168
|
|
|
167
169
|
### The Solution: Whoosh Indexing
|
|
168
170
|
|
|
169
|
-
Step 2 takes our generated stories and creates a searchable index using the Whoosh library
|
|
171
|
+
Step 2 takes our generated stories and creates a searchable index using the Whoosh library. The pipeline is defined in `Step_2_IndexStories.script`:
|
|
170
172
|
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
173
|
+
```
|
|
174
|
+
INPUT FROM "stories.json"
|
|
175
|
+
| readJsonl
|
|
176
|
+
| progressTicks[tick_count=1, print_count=True]
|
|
177
|
+
| indexWhoosh[index_path="./full_text_index", field_list="content,title", overwrite=True]
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
To run this script:
|
|
178
181
|
|
|
179
|
-
|
|
182
|
+
```bash
|
|
183
|
+
chatterlang_script --script Step_2_IndexStories.script
|
|
180
184
|
```
|
|
181
185
|
|
|
182
186
|
### Understanding the Indexing Pipeline
|
|
@@ -283,15 +287,17 @@ Most search implementations require significant custom development, but TalkPipe
|
|
|
283
287
|
|
|
284
288
|
### The Solution: Dual Interface Search
|
|
285
289
|
|
|
286
|
-
Step 3 creates both an API endpoint and a web interface using a single command
|
|
290
|
+
Step 3 creates both an API endpoint and a web interface using a single command. The pipeline is defined in `Step_3_SearchStories.script`:
|
|
287
291
|
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
'
|
|
292
|
+
```
|
|
293
|
+
| searchWhoosh[index_path="full_text_index", field="query"]
|
|
294
|
+
| formatItem[field_list="document.title:Title,document.content:Content,score:Score"]
|
|
295
|
+
```
|
|
293
296
|
|
|
294
|
-
|
|
297
|
+
To run this script:
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
chatterlang_serve --form-config story_search_ui.yml --title "Story Search" --display-property query --script Step_3_SearchStories.script
|
|
295
301
|
```
|
|
296
302
|
|
|
297
303
|
### Understanding the Search System
|
|
@@ -17,14 +17,13 @@
|
|
|
17
17
|
# 6. The output is redirected to a file named "stories.json".
|
|
18
18
|
###################################################################################
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
python -m talkpipe.app.chatterlang_script --script CHATTERLANG_SCRIPT > stories.json
|
|
20
|
+
|
|
21
|
+
INPUT FROM "Generating 50 synthetic stories into stories.json" | print;
|
|
22
|
+
INPUT FROM echo[data="Write a fictitious five sentence story about technology development in an imaginary country.", n=50]
|
|
23
|
+
| llmPrompt[source="ollama", model="llama3.2", multi_turn=False]
|
|
24
|
+
| toDict[field_list="_:content"]
|
|
25
|
+
| llmPrompt[source="ollama", model="llama3.2", system_prompt="Write exactly one title for this story in plain text with no markdown", field="content", set_as="title", multi_turn=False]
|
|
26
|
+
| progressTicks[tick_count=1, eol_count=10, print_count=true]
|
|
27
|
+
| dumpsJsonl
|
|
28
|
+
| writeString[fname="stories.json"];
|
|
29
|
+
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
# The indexed data can then be used for full-text search.
|
|
7
7
|
#
|
|
8
8
|
# As a side note, the first half of this script issues a single piece of data, the
|
|
9
|
-
# filename. The next segment, `readJsonl`, reads the JSONL file line by line and
|
|
10
|
-
# issues one decoded JSON object at a time. This is a good example of how the
|
|
9
|
+
# filename. The next segment, `readJsonl`, reads the JSONL file line by line and
|
|
10
|
+
# issues one decoded JSON object at a time. This is a good example of how the
|
|
11
11
|
# constitution of the data being processed can change as it flows through the pipeline.
|
|
12
12
|
#
|
|
13
13
|
# The pipeline is:
|
|
@@ -16,12 +16,7 @@
|
|
|
16
16
|
# 3. The index is stored in the specified path "./full_text_index".
|
|
17
17
|
###################################################################################
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
| indexWhoosh[index_path="./full_text_index", field_list="content,title", overwrite=True]
|
|
24
|
-
'
|
|
25
|
-
|
|
26
|
-
#chatterlang_script --script "
|
|
27
|
-
python -m talkpipe.app.chatterlang_script --script CHATTERLANG_SCRIPT
|
|
19
|
+
INPUT FROM "stories.json"
|
|
20
|
+
| readJsonl
|
|
21
|
+
| progressTicks[tick_count=1, print_count=True]
|
|
22
|
+
| indexWhoosh[index_path="./full_text_index", field_list="content,title", overwrite=True]
|
|
@@ -12,8 +12,5 @@
|
|
|
12
12
|
# needing to write any code.
|
|
13
13
|
###################################################################################
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
| formatItem[field_list="document.title:Title,document.content:Content,score:Score"]
|
|
18
|
-
'
|
|
19
|
-
chatterlang_serve --form-config story_search_ui.yml --title \"Story\ Search\" --display-property query --script CHATTERLANG_SCRIPT
|
|
15
|
+
| searchWhoosh[index_path="full_text_index", field="query"]
|
|
16
|
+
| formatItem[field_list="document.title:Title,document.content:Content,score:Score"]
|
{talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_2-Search_by_Example_and_RAG/README.md
RENAMED
|
@@ -34,16 +34,20 @@ Vector embeddings solve this by converting text into high-dimensional mathematic
|
|
|
34
34
|
|
|
35
35
|
### The Implementation
|
|
36
36
|
|
|
37
|
+
The pipeline is defined in `Step_1_CreateVectorDatabase.script`:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
INPUT FROM "../Tutorial_1-Document_Indexing/stories.json"
|
|
41
|
+
| readJsonl
|
|
42
|
+
| progressTicks[tick_count=1, print_count=True]
|
|
43
|
+
| llmEmbed[field="content", source="ollama", model="mxbai-embed-large", set_as="vector"]
|
|
44
|
+
| addToLanceDB[path="./vector_index", table_name="stories", vector_field="vector", metadata_field_list="title,content", overwrite=True]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
To run this script:
|
|
48
|
+
|
|
37
49
|
```bash
|
|
38
|
-
|
|
39
|
-
INPUT FROM "../Tutorial_1-Document_Indexing/stories.json"
|
|
40
|
-
| readJsonl
|
|
41
|
-
| progressTicks[tick_count=1, print_count=True]
|
|
42
|
-
| llmEmbed[field="content", source="ollama", model="mxbai-embed-large", set_as="vector"]
|
|
43
|
-
| addVector[path="./vector_index", vector_field="vector", metadata_field_list="title,content", overwrite=True]
|
|
44
|
-
'
|
|
45
|
-
|
|
46
|
-
python -m talkpipe.app.chatterlang_script --script CHATTERLANG_SCRIPT
|
|
50
|
+
chatterlang_script --script Step_1_CreateVectorDatabase.script
|
|
47
51
|
```
|
|
48
52
|
|
|
49
53
|
### Breaking Down the Pipeline
|
|
@@ -67,12 +71,12 @@ The `mxbai-embed-large` model is specifically designed for semantic search - it'
|
|
|
67
71
|
|
|
68
72
|
**3. Building the Index**
|
|
69
73
|
```
|
|
70
|
-
|
|
|
74
|
+
| addToLanceDB[path="./vector_index", table_name="stories", vector_field="vector", metadata_field_list="title,content", overwrite=True]
|
|
71
75
|
```
|
|
72
76
|
This creates a specialized index that:
|
|
73
|
-
- Stores vectors for similarity search
|
|
77
|
+
- Stores vectors for similarity search in a LanceDB table named "stories"
|
|
74
78
|
- Preserves original metadata (title and content) for retrieval
|
|
75
|
-
- Enables fast nearest-neighbor queries
|
|
79
|
+
- Enables fast nearest-neighbor queries using LanceDB's efficient vector search capabilities
|
|
76
80
|
|
|
77
81
|
### Real-World Applications
|
|
78
82
|
|
|
@@ -96,15 +100,19 @@ Your users don't always know the right keywords. Sometimes they have an example
|
|
|
96
100
|
|
|
97
101
|
### The Solution: Semantic Search Interface
|
|
98
102
|
|
|
103
|
+
The pipeline is defined in `Step_2_SearchByExample.script`:
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
| copy
|
|
107
|
+
| llmEmbed[field="example", source="ollama", model="mxbai-embed-large", set_as="vector"]
|
|
108
|
+
| searchLanceDB[field="vector", path="./vector_index", table_name="stories", limit=10]
|
|
109
|
+
| formatItem[field_list="document.title:Title, document.content:Content, score:Score"]
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
To run this script:
|
|
113
|
+
|
|
99
114
|
```bash
|
|
100
|
-
|
|
101
|
-
| copy
|
|
102
|
-
| llmEmbed[field="example", source="ollama", model="mxbai-embed-large", set_as="vector"]
|
|
103
|
-
| searchVector[vector_field="vector", path="./vector_index"]
|
|
104
|
-
| formatItem[field_list="document.title:Title, document.content:Content, score:Score"]
|
|
105
|
-
'
|
|
106
|
-
|
|
107
|
-
python -m talkpipe.app.chatterlang_serve --form-config story_by_example_ui.yml --display-property example --script CHATTERLANG_SCRIPT
|
|
115
|
+
chatterlang_serve --form-config story_by_example_ui.yml --display-property example --script Step_2_SearchByExample.script
|
|
108
116
|
```
|
|
109
117
|
|
|
110
118
|
### Understanding the Search Pipeline
|
|
@@ -123,9 +131,9 @@ The user's example text is converted to a vector using the same model that index
|
|
|
123
131
|
|
|
124
132
|
**3. Vector Search**
|
|
125
133
|
```
|
|
126
|
-
|
|
|
134
|
+
| searchLanceDB[field="vector", path="./vector_index", table_name="stories", limit=10]
|
|
127
135
|
```
|
|
128
|
-
This finds the documents whose vectors are closest to the query vector - literally the nearest neighbors in high-dimensional space.
|
|
136
|
+
This finds the documents whose vectors are closest to the query vector - literally the nearest neighbors in high-dimensional space. LanceDB provides efficient approximate nearest neighbor search for fast retrieval.
|
|
129
137
|
|
|
130
138
|
**4. Result Formatting**
|
|
131
139
|
```
|
|
@@ -167,23 +175,27 @@ Finding relevant documents is helpful, but what users often really want is an an
|
|
|
167
175
|
|
|
168
176
|
### The RAG Implementation
|
|
169
177
|
|
|
178
|
+
The pipeline is defined in `Step_3_SpecializedRag.script`:
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
| copy
|
|
182
|
+
| llmEmbed[field="example", source="ollama", model="mxbai-embed-large", set_as="vector"]
|
|
183
|
+
| searchLanceDB[field="vector", path="./vector_index", table_name="stories", all_results_at_once=True, set_as="results"]
|
|
184
|
+
| ragPrompt
|
|
185
|
+
| llmPrompt[source="ollama", model="llama3.2"]
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
To run this script:
|
|
189
|
+
|
|
170
190
|
```bash
|
|
171
|
-
|
|
172
|
-
| copy
|
|
173
|
-
| llmEmbed[field="example", source="ollama", model="mxbai-embed-large", set_as="vector"]
|
|
174
|
-
| searchVector[vector_field="vector", path="./vector_index", all_results_at_once=True, set_as="results"]
|
|
175
|
-
| ragPrompt
|
|
176
|
-
| llmPrompt[source="ollama", model="llama3.2"]
|
|
177
|
-
'
|
|
178
|
-
|
|
179
|
-
python -m talkpipe.app.chatterlang_serve --form-config story_by_example_ui.yml --load-module step_3_extras.py --display-property example --script CHATTERLANG_SCRIPT
|
|
191
|
+
chatterlang_serve --form-config story_by_example_ui.yml --load-module step_3_extras.py --display-property example --script Step_3_SpecializedRag.script
|
|
180
192
|
```
|
|
181
193
|
|
|
182
194
|
### What's Different in the RAG Pipeline
|
|
183
195
|
|
|
184
196
|
**1. Batch Results Collection**
|
|
185
197
|
```
|
|
186
|
-
|
|
|
198
|
+
| searchLanceDB[..., all_results_at_once=True, set_as="results"]
|
|
187
199
|
```
|
|
188
200
|
Instead of processing results one by one, we collect all search results together. This allows the next step to see the full context.
|
|
189
201
|
|
|
@@ -10,12 +10,8 @@
|
|
|
10
10
|
# 3. The embeddings are stored in a vector index at the specified path.
|
|
11
11
|
###################################################################################
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
| addVector[path="./vector_index", vector_field="vector", metadata_field_list="title,content", overwrite=True]
|
|
19
|
-
'
|
|
20
|
-
|
|
21
|
-
chatterlang_script --script CHATTERLANG_SCRIPT
|
|
13
|
+
INPUT FROM "../Tutorial_1-Document_Indexing/stories.json"
|
|
14
|
+
| readJsonl
|
|
15
|
+
| progressTicks[tick_count=1, print_count=True]
|
|
16
|
+
| llmEmbed[field="content", source="ollama", model="mxbai-embed-large", set_as="vector"]
|
|
17
|
+
| addToLanceDB[path="./vector_index", table_name="stories", vector_field="vector", metadata_field_list="title,content", overwrite=True]
|
|
@@ -11,15 +11,11 @@
|
|
|
11
11
|
# working with the endpoint api because the input data will be sent to the
|
|
12
12
|
# browser.
|
|
13
13
|
# 3. Use the `llmEmbed` segment to convert the example into a vector.
|
|
14
|
-
# 4. Use the `
|
|
14
|
+
# 4. Use the `searchLanceDB` segment to search the vector index for similar documents.
|
|
15
15
|
# 5. Format the results using `formatItem` and print them.
|
|
16
16
|
###################################################################################
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
| formatItem[field_list="document.title:Title, document.content:Content, score:Score"]
|
|
23
|
-
'
|
|
24
|
-
|
|
25
|
-
chatterlang_serve --form-config story_by_example_ui.yml --display-property example --script CHATTERLANG_SCRIPT
|
|
18
|
+
| copy
|
|
19
|
+
| llmEmbed[field="example", source="ollama", model="mxbai-embed-large", set_as="vector"]
|
|
20
|
+
| searchLanceDB[field="vector", path="./vector_index", table_name="stories", limit=10]
|
|
21
|
+
| formatItem[field_list="document.title:Title, document.content:Content, score:Score"]
|