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.
Files changed (191) hide show
  1. {talkpipe-0.9.2 → talkpipe-0.9.4}/.github/workflows/ci-cd.yml +4 -4
  2. {talkpipe-0.9.2 → talkpipe-0.9.4}/CHANGELOG.md +47 -0
  3. {talkpipe-0.9.2 → talkpipe-0.9.4}/CLAUDE.md +2 -0
  4. {talkpipe-0.9.2 → talkpipe-0.9.4}/Dockerfile +4 -3
  5. {talkpipe-0.9.2 → talkpipe-0.9.4}/PKG-INFO +1 -1
  6. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/api-reference/talkpipe-plugin-manager.md +33 -20
  7. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_1-Document_Indexing/README.md +34 -28
  8. talkpipe-0.9.4/docs/tutorials/Tutorial_1-Document_Indexing/Step_1_CreateSyntheticData.bat +2 -0
  9. 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
  10. talkpipe-0.9.4/docs/tutorials/Tutorial_1-Document_Indexing/Step_1_CreateSyntheticData.sh +2 -0
  11. talkpipe-0.9.4/docs/tutorials/Tutorial_1-Document_Indexing/Step_2_IndexStories.bat +2 -0
  12. 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
  13. talkpipe-0.9.4/docs/tutorials/Tutorial_1-Document_Indexing/Step_2_IndexStories.sh +2 -0
  14. talkpipe-0.9.4/docs/tutorials/Tutorial_1-Document_Indexing/Step_3_SearchStories.bat +2 -0
  15. 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
  16. talkpipe-0.9.4/docs/tutorials/Tutorial_1-Document_Indexing/Step_3_SearchStories.sh +2 -0
  17. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_2-Search_by_Example_and_RAG/README.md +44 -32
  18. talkpipe-0.9.4/docs/tutorials/Tutorial_2-Search_by_Example_and_RAG/Step_1_CreateVectorDatabase.bat +2 -0
  19. 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
  20. talkpipe-0.9.4/docs/tutorials/Tutorial_2-Search_by_Example_and_RAG/Step_1_CreateVectorDatabase.sh +2 -0
  21. talkpipe-0.9.4/docs/tutorials/Tutorial_2-Search_by_Example_and_RAG/Step_2_SearchByExample.bat +2 -0
  22. 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
  23. talkpipe-0.9.4/docs/tutorials/Tutorial_2-Search_by_Example_and_RAG/Step_2_SearchByExample.sh +2 -0
  24. talkpipe-0.9.4/docs/tutorials/Tutorial_2-Search_by_Example_and_RAG/Step_3_SpecializedRag.bat +2 -0
  25. 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
  26. talkpipe-0.9.4/docs/tutorials/Tutorial_2-Search_by_Example_and_RAG/Step_3_SpecializedRag.sh +2 -0
  27. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_3_Report_Writing/README.md +37 -31
  28. talkpipe-0.9.4/docs/tutorials/Tutorial_3_Report_Writing/Step_1_ExecutiveSummaryGeneration.bat +2 -0
  29. 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
  30. talkpipe-0.9.4/docs/tutorials/Tutorial_3_Report_Writing/Step_1_ExecutiveSummaryGeneration.sh +2 -0
  31. talkpipe-0.9.4/docs/tutorials/Tutorial_3_Report_Writing/Step_2_DetailedAnalysisReportGeneration.bat +2 -0
  32. 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
  33. talkpipe-0.9.4/docs/tutorials/Tutorial_3_Report_Writing/Step_2_DetailedAnalysisReportGeneration.sh +2 -0
  34. talkpipe-0.9.4/docs/tutorials/Tutorial_3_Report_Writing/Step_3_MultiFormatReportGeneration.bat +2 -0
  35. 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
  36. talkpipe-0.9.4/docs/tutorials/Tutorial_3_Report_Writing/Step_3_MultiFormatReportGeneration.sh +2 -0
  37. {talkpipe-0.9.2 → talkpipe-0.9.4}/pyproject.toml +0 -1
  38. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/app/chatterlang_serve.py +26 -22
  39. talkpipe-0.9.4/src/talkpipe/app/static/unit-docs.html +1 -0
  40. talkpipe-0.9.4/src/talkpipe/app/static/unit-docs.txt +1 -0
  41. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/chatterlang/compiler.py +12 -2
  42. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/chatterlang/parsers.py +5 -4
  43. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/data/extraction.py +15 -13
  44. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/data/html.py +2 -2
  45. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/llm/chat.py +6 -1
  46. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/llm/config.py +0 -2
  47. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/llm/embedding_adapters.py +9 -3
  48. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/llm/prompt_adapters.py +22 -5
  49. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/operations/matrices.py +2 -0
  50. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/pipe/basic.py +13 -38
  51. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/pipe/io.py +84 -11
  52. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/util/config.py +30 -20
  53. talkpipe-0.9.4/src/talkpipe/util/constants.py +3 -0
  54. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/util/data_manipulation.py +2 -5
  55. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe.egg-info/PKG-INFO +1 -1
  56. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe.egg-info/SOURCES.txt +20 -0
  57. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe.egg-info/entry_points.txt +0 -1
  58. talkpipe-0.9.4/stories.json +50 -0
  59. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/app/test_chatterlang_script.py +33 -4
  60. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/app/test_chatterlang_serve.py +59 -16
  61. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/chatterlang/test_compiler.py +16 -0
  62. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/chatterlang/test_parsers.py +7 -1
  63. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/llm/test_chat.py +23 -0
  64. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/pipe/test_io.py +109 -3
  65. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/util/test_util.py +18 -13
  66. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/test_security_vulnerabilities.py +5 -5
  67. talkpipe-0.9.2/src/talkpipe/app/static/unit-docs.html +0 -1
  68. talkpipe-0.9.2/src/talkpipe/app/static/unit-docs.txt +0 -1
  69. {talkpipe-0.9.2 → talkpipe-0.9.4}/.bandit +0 -0
  70. {talkpipe-0.9.2 → talkpipe-0.9.4}/.dockerignore +0 -0
  71. {talkpipe-0.9.2 → talkpipe-0.9.4}/.github/CICD.md +0 -0
  72. {talkpipe-0.9.2 → talkpipe-0.9.4}/.github/ISSUE_TEMPLATE/release-checklist.md +0 -0
  73. {talkpipe-0.9.2 → talkpipe-0.9.4}/.github/SECURITY.md +0 -0
  74. {talkpipe-0.9.2 → talkpipe-0.9.4}/.github/dependabot.yml +0 -0
  75. {talkpipe-0.9.2 → talkpipe-0.9.4}/.gitignore +0 -0
  76. {talkpipe-0.9.2 → talkpipe-0.9.4}/.safety-project.ini +0 -0
  77. {talkpipe-0.9.2 → talkpipe-0.9.4}/.vscode/settings.json +0 -0
  78. {talkpipe-0.9.2 → talkpipe-0.9.4}/.vscode/tasks.json +0 -0
  79. {talkpipe-0.9.2 → talkpipe-0.9.4}/COPYRIGHT +0 -0
  80. {talkpipe-0.9.2 → talkpipe-0.9.4}/LICENSE +0 -0
  81. {talkpipe-0.9.2 → talkpipe-0.9.4}/README.md +0 -0
  82. {talkpipe-0.9.2 → talkpipe-0.9.4}/bin/config-analyzer.py +0 -0
  83. {talkpipe-0.9.2 → talkpipe-0.9.4}/bin/config_bash +0 -0
  84. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/.gitignore +0 -0
  85. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/LLMChat.png +0 -0
  86. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/LLMEvaluateWebPage.png +0 -0
  87. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/README.md +0 -0
  88. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/TalkPipe.png +0 -0
  89. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/TalkPipe.xcf +0 -0
  90. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/api-reference/README.md +0 -0
  91. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/api-reference/chatterlang-script.md +0 -0
  92. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/api-reference/chatterlang-server.md +0 -0
  93. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/api-reference/chatterlang-workbench.md +0 -0
  94. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/api-reference/talkpipe-ref.md +0 -0
  95. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/architecture/README.md +0 -0
  96. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/architecture/chatterlang.md +0 -0
  97. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/architecture/configuration.md +0 -0
  98. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/architecture/extending-talkpipe.md +0 -0
  99. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/architecture/pipe-api.md +0 -0
  100. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/architecture/streaming.md +0 -0
  101. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/make_structure_diagram.sh +0 -0
  102. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/quickstart.md +0 -0
  103. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/structure.tex +0 -0
  104. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/talkpipe_diagram.png +0 -0
  105. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/.gitignore +0 -0
  106. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/README.md +0 -0
  107. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_1-Document_Indexing/stories.json +0 -0
  108. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_1-Document_Indexing/story_search_ui.yml +0 -0
  109. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_2-Search_by_Example_and_RAG/step_3_extras.py +0 -0
  110. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_2-Search_by_Example_and_RAG/story_by_example_ui.yml +0 -0
  111. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_3_Report_Writing/file_structure.md +0 -0
  112. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_3_Report_Writing/multi_format_ui.yml +0 -0
  113. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_3_Report_Writing/report_topic_ui.yml +0 -0
  114. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_3_Report_Writing/step3_extras.py +0 -0
  115. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_3_Report_Writing/step_1_extras.py +0 -0
  116. {talkpipe-0.9.2 → talkpipe-0.9.4}/docs/tutorials/Tutorial_3_Report_Writing/step_2_extras.py +0 -0
  117. {talkpipe-0.9.2 → talkpipe-0.9.4}/pytest.ini +0 -0
  118. {talkpipe-0.9.2 → talkpipe-0.9.4}/setup.cfg +0 -0
  119. {talkpipe-0.9.2 → talkpipe-0.9.4}/setup.py +0 -0
  120. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/__init__.py +0 -0
  121. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/app/__init__.py +0 -0
  122. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/app/chatterlang_reference_browser.py +0 -0
  123. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/app/chatterlang_reference_generator.py +0 -0
  124. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/app/chatterlang_script.py +0 -0
  125. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/app/chatterlang_workbench.py +0 -0
  126. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/app/static/.gitignore +0 -0
  127. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/app/static/favicon.ico +0 -0
  128. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/app/talkpipe_plugin_manager.py +0 -0
  129. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/chatterlang/__init__.py +0 -0
  130. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/chatterlang/registry.py +0 -0
  131. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/data/__init__.py +0 -0
  132. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/data/email.py +0 -0
  133. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/data/mongo.py +0 -0
  134. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/data/rss.py +0 -0
  135. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/llm/__init__.py +0 -0
  136. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/llm/embedding.py +0 -0
  137. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/operations/__init__.py +0 -0
  138. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/operations/filtering.py +0 -0
  139. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/operations/thread_ops.py +0 -0
  140. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/operations/transforms.py +0 -0
  141. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/pipe/__init__.py +0 -0
  142. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/pipe/core.py +0 -0
  143. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/pipe/fork.py +0 -0
  144. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/pipe/math.py +0 -0
  145. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/search/abstract.py +0 -0
  146. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/search/lancedb.py +0 -0
  147. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/search/simplevectordb.py +0 -0
  148. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/search/whoosh.py +0 -0
  149. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/util/__init__.py +0 -0
  150. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/util/collections.py +0 -0
  151. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/util/doc_extraction.py +0 -0
  152. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/util/os.py +0 -0
  153. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe/util/plugin_loader.py +0 -0
  154. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe.egg-info/dependency_links.txt +0 -0
  155. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe.egg-info/requires.txt +0 -0
  156. {talkpipe-0.9.2 → talkpipe-0.9.4}/src/talkpipe.egg-info/top_level.txt +0 -0
  157. {talkpipe-0.9.2 → talkpipe-0.9.4}/test-workflow.yml +0 -0
  158. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/conftest.py +0 -0
  159. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/app/test_chatterlang_reference_browser.py +0 -0
  160. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/app/test_chatterlang_reference_generator.py +0 -0
  161. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/app/test_talkpipe_plugin_manager.py +0 -0
  162. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/chatterlang/test_chatterlang_workbench.py +0 -0
  163. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/data/sample_feed.pkl +0 -0
  164. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/data/test.docx +0 -0
  165. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/data/test_email.py +0 -0
  166. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/data/test_extraction.py +0 -0
  167. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/data/test_html.py +0 -0
  168. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/data/test_html_exceptions.py +0 -0
  169. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/data/test_mogomock.py +0 -0
  170. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/data/test_mongo.py +0 -0
  171. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/data/test_mongo_integration.py +0 -0
  172. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/data/test_rss.py +0 -0
  173. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/llm/test_embedding.py +0 -0
  174. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/operations/test_filtering.py +0 -0
  175. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/operations/test_matrices.py +0 -0
  176. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/operations/test_threading.py +0 -0
  177. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/operations/test_transforms.py +0 -0
  178. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/pipe/test_basic.py +0 -0
  179. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/pipe/test_core.py +0 -0
  180. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/pipe/test_fork.py +0 -0
  181. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/pipe/test_math.py +0 -0
  182. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/search/test_lancedb.py +0 -0
  183. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/search/test_simplevectordb.py +0 -0
  184. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/search/test_whoosh.py +0 -0
  185. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/test_documentation_examples.py +0 -0
  186. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/util/test_collections.py +0 -0
  187. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/util/test_config.py +0 -0
  188. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/util/test_data_manipulation.py +0 -0
  189. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/util/test_doc_extraction.py +0 -0
  190. {talkpipe-0.9.2 → talkpipe-0.9.4}/tests/talkpipe/util/test_plugin_loader.py +0 -0
  191. {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@v3
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@v3
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@v3
179
+ uses: github/codeql-action/autobuild@v4
180
180
 
181
181
  - name: Perform CodeQL Analysis
182
- uses: github/codeql-action/analyze@v3
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 --user --upgrade pip setuptools wheel build
38
- RUN python3 -m pip install --user numpy pandas matplotlib scikit-learn scipy
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
- python3 -m pip install --no-cache-dir /tmp/*.whl && \
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: talkpipe
3
- Version: 0.9.2
3
+ Version: 0.9.4
4
4
  Summary: Python internal and external DSL for writing generative AI analytics
5
5
  Author-email: Travis Bauer <tlbauer@sandia.gov>
6
6
  Maintainer-email: Travis Bauer <tlbauer@sandia.gov>
@@ -4,7 +4,7 @@ Command-line tool for managing and inspecting TalkPipe plugins.
4
4
 
5
5
  ## Overview
6
6
 
7
- The `talkpipe_plugin_manager` command provides utilities to list, reload, and debug TalkPipe plugins that are installed via Python entry points.
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
- talkpipe_plugin_manager --list
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
- talkpipe_plugin_manager --reload my-data-plugin
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
- talkpipe_plugin_manager --list --verbose
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:NetworkPlugin",
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:NetworkPlugin"
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. **Import the module**: The plugin loader imports the module specified by the entry point (e.g., `my_plugin.plugin`)
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 class/module has an `initialize_plugin` function or method, it will be called for additional setup
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
- class NetworkPlugin:
108
- """Main plugin class referenced by entry point."""
109
-
110
- def initialize_plugin(self):
111
- """Optional: Called after module import for additional setup."""
112
- print("Network plugin initialized!")
113
- # Additional setup if needed
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 imported:
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 `NetworkPlugin.initialize_plugin()` method is called for any additional setup
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
- talkpipe_plugin_manager --reload my-plugin
173
+ talkpipe_plugins --reload my-plugin
161
174
 
162
175
  # Verify it loaded successfully
163
- talkpipe_plugin_manager --list
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. Here's what happens:
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
- ```bash
63
- export TALKPIPE_CHATTERLANG_SCRIPT='
64
- LOOP 50 TIMES {
65
- INPUT FROM "Write a fictitious five sentence story about technology development in an imaginary country."
66
- | llmPrompt[source="ollama", model="llama3.2", multi_turn=False]
67
- | toDict[field_list="_:content"]
68
- | 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]
69
- | dumpsJsonl | print;
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
- python -m talkpipe.app.chatterlang_script --script CHATTERLANG_SCRIPT > stories.json
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
- ```bash
172
- export TALKPIPE_CHATTERLANG_SCRIPT='
173
- INPUT FROM "stories.json"
174
- | readJsonl
175
- | progressTicks[tick_count=1, print_count=True]
176
- | indexWhoosh[index_path="./full_text_index", field_list="content,title", overwrite=True]
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
- python -m talkpipe.app.chatterlang_script --script CHATTERLANG_SCRIPT
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
- ```bash
289
- export TALKPIPE_CHATTERLANG_SCRIPT='
290
- | searchWhoosh[index_path="full_text_index", field="query"]
291
- | formatItem[field_list="document.title:Title,document.content:Content,score:Score"]
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
- python -m talkpipe.app.chatterlang_serve --form-config story_search_ui.yml --title "Story Search" --display-property query --script CHATTERLANG_SCRIPT
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
@@ -0,0 +1,2 @@
1
+ @echo off
2
+ chatterlang_script --script Step_1_CreateSyntheticData.script
@@ -17,14 +17,13 @@
17
17
  # 6. The output is redirected to a file named "stories.json".
18
18
  ###################################################################################
19
19
 
20
- export TALKPIPE_CHATTERLANG_SCRIPT='
21
- LOOP 50 TIMES {
22
- INPUT FROM "Write a fictitious five sentence story about technology development in an imaginary country."
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
- | dumpsJsonl | print;
27
- }
28
- '
29
- #chatterlang_script --script "
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
+
@@ -0,0 +1,2 @@
1
+ #!/bin/bash
2
+ chatterlang_script --script Step_1_CreateSyntheticData.script
@@ -0,0 +1,2 @@
1
+ @echo off
2
+ chatterlang_script --script Step_2_IndexStories.script
@@ -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
- export TALKPIPE_CHATTERLANG_SCRIPT='
20
- INPUT FROM "stories.json"
21
- | readJsonl
22
- | progressTicks[tick_count=1, print_count=True]
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]
@@ -0,0 +1,2 @@
1
+ #!/bin/bash
2
+ chatterlang_script --script Step_2_IndexStories.script
@@ -0,0 +1,2 @@
1
+ @echo off
2
+ chatterlang_serve --form-config story_search_ui.yml --title "Story Search" --display-property query --script Step_3_SearchStories.script
@@ -12,8 +12,5 @@
12
12
  # needing to write any code.
13
13
  ###################################################################################
14
14
 
15
- export TALKPIPE_CHATTERLANG_SCRIPT='
16
- | searchWhoosh[index_path="full_text_index", field="query"]
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"]
@@ -0,0 +1,2 @@
1
+ #!/bin/bash
2
+ chatterlang_serve --form-config story_search_ui.yml --title "Story Search" --display-property query --script Step_3_SearchStories.script
@@ -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
- export TALKPIPE_CHATTERLANG_SCRIPT='
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
- | addVector[path="./vector_index", vector_field="vector", metadata_field_list="title,content", overwrite=True]
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
- export TALKPIPE_CHATTERLANG_SCRIPT='
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
- | searchVector[vector_field="vector", path="./vector_index"]
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
- export TALKPIPE_CHATTERLANG_SCRIPT='
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
- | searchVector[..., all_results_at_once=True, set_as="results"]
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
 
@@ -0,0 +1,2 @@
1
+ @echo off
2
+ chatterlang_script --script Step_1_CreateVectorDatabase.script
@@ -10,12 +10,8 @@
10
10
  # 3. The embeddings are stored in a vector index at the specified path.
11
11
  ###################################################################################
12
12
 
13
- export TALKPIPE_CHATTERLANG_SCRIPT='
14
- INPUT FROM "../Tutorial_1-Document_Indexing/stories.json"
15
- | readJsonl
16
- | progressTicks[tick_count=1, print_count=True]
17
- | llmEmbed[field="content", source="ollama", model="mxbai-embed-large", set_as="vector"]
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]
@@ -0,0 +1,2 @@
1
+ #!/bin/bash
2
+ chatterlang_script --script Step_1_CreateVectorDatabase.script
@@ -0,0 +1,2 @@
1
+ @echo off
2
+ chatterlang_serve --form-config story_by_example_ui.yml --display-property example --script Step_2_SearchByExample.script
@@ -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 `searchVector` segment to search the vector index for similar documents.
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
- export TALKPIPE_CHATTERLANG_SCRIPT='
19
- | copy
20
- | llmEmbed[field="example", source="ollama", model="mxbai-embed-large", set_as="vector"]
21
- | searchVector[vector_field="vector", path="./vector_index", top_k=10]
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"]
@@ -0,0 +1,2 @@
1
+ #!/bin/bash
2
+ chatterlang_serve --form-config story_by_example_ui.yml --display-property example --script Step_2_SearchByExample.script
@@ -0,0 +1,2 @@
1
+ @echo off
2
+ chatterlang_serve --form-config story_by_example_ui.yml --load-module step_3_extras.py --display-property example --script Step_3_SpecializedRag.script