llm-function 0.0.2__tar.gz → 0.1.0__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 (286) hide show
  1. llm_function-0.1.0/PKG-INFO +383 -0
  2. llm_function-0.1.0/llm_function/.paa.tracking/.paa.version +1 -0
  3. llm_function-0.1.0/llm_function/.paa.tracking/extra_docs/concepts/errors.md +65 -0
  4. llm_function-0.1.0/llm_function/.paa.tracking/extra_docs/concepts/runtime.md +81 -0
  5. llm_function-0.1.0/llm_function/.paa.tracking/extra_docs/concepts/tools.md +38 -0
  6. llm_function-0.1.0/llm_function/.paa.tracking/extra_docs/concepts/workflow_cache.md +22 -0
  7. llm_function-0.1.0/llm_function/.paa.tracking/extra_docs/interfaces/decorator.md +89 -0
  8. llm_function-0.1.0/llm_function/.paa.tracking/git/docs_cache/llm_function-concepts/errors.md +65 -0
  9. llm_function-0.1.0/llm_function/.paa.tracking/git/docs_cache/llm_function-concepts/runtime.md +81 -0
  10. llm_function-0.1.0/llm_function/.paa.tracking/git/docs_cache/llm_function-concepts/tools.md +38 -0
  11. llm_function-0.1.0/llm_function/.paa.tracking/git/docs_cache/llm_function-concepts/workflow_cache.md +22 -0
  12. llm_function-0.1.0/llm_function/.paa.tracking/git/docs_cache/llm_function-interfaces/decorator.md +89 -0
  13. llm_function-0.1.0/llm_function/.paa.tracking/git/docs_cache/llm_function.md +339 -0
  14. llm_function-0.1.0/llm_function/.paa.tracking/git/example_notebooks/llm_function.ipynb +450 -0
  15. llm_function-0.1.0/llm_function/.paa.tracking/git/extra_docs/llm_function/concepts/errors.md +65 -0
  16. llm_function-0.1.0/llm_function/.paa.tracking/git/extra_docs/llm_function/concepts/runtime.md +81 -0
  17. llm_function-0.1.0/llm_function/.paa.tracking/git/extra_docs/llm_function/concepts/tools.md +38 -0
  18. llm_function-0.1.0/llm_function/.paa.tracking/git/extra_docs/llm_function/concepts/workflow_cache.md +22 -0
  19. llm_function-0.1.0/llm_function/.paa.tracking/git/extra_docs/llm_function/interfaces/decorator.md +89 -0
  20. {llm_function-0.0.2/llm_function/.paa.tracking/python_modules → llm_function-0.1.0/llm_function/.paa.tracking/git/module}/llm_function.py +143 -20
  21. llm_function-0.1.0/llm_function/.paa.tracking/git/tests/llm_function/test_llm_function.py +214 -0
  22. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/git/tracking/pyproject.toml +2 -2
  23. llm_function-0.1.0/llm_function/.paa.tracking/git/tracking/release_notes.md +19 -0
  24. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/COMMIT_EDITMSG +1 -0
  25. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/index +0 -0
  26. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/logs/HEAD +1 -0
  27. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/logs/refs/heads/master +1 -0
  28. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/objects/1f/c849c4f0d3cf1d9ffff4358a3eabce6b820d73 +0 -0
  29. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/objects/2f/79f2bee026966805fa8326417acdadeaf720a1 +0 -0
  30. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/objects/36/79219b54892d9062e887aca6289079479570b9 +3 -0
  31. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/objects/39/f4e78e14e1ee1381b4ea5df1cee8404cee7057 +0 -0
  32. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/objects/46/8391bf2d314b0a99606adea9579fee9cd75be7 +0 -0
  33. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/objects/46/cfbf209ff79280d95767887189f6f02b06c9c8 +0 -0
  34. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/objects/50/81a8d28164a30d9236e56a24cd5e70f00425ac +0 -0
  35. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/objects/58/56766b61db2e4fde07e1172130fc57f27cc7a5 +0 -0
  36. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/objects/68/fe9b990a5303fa688dbc0f8032004edbeb933f +0 -0
  37. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/objects/72/25901553af8e43ebcbc70f855c9f434629f17e +0 -0
  38. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/objects/73/4b081edd0b8bbe482c9700c3bcc1a317828d5d +0 -0
  39. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/objects/a6/7a9669585b39d1d3f112a3b5bccbd2aaf30e64 +0 -0
  40. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/objects/b8/414783e9de9e36b3219743e1cf8e3c9f8c4e96 +0 -0
  41. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/objects/c1/aa857205ca648912bd0d68766d93cdd91f76dc +0 -0
  42. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/objects/c2/1968e88b0bf36c52e1cb31358134f089d2696a +1 -0
  43. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/objects/c9/c82dc2247fb6bc4ade753493c0a5e9e03f4bea +0 -0
  44. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/objects/cd/a31fedf854fcf91ea8d2403eb05993d15aa8ec +0 -0
  45. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/objects/d5/8a6fe3dd4456f3553bff06145a8c37bf292f2b +0 -0
  46. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/objects/da/8c1a1dfbaab5736c793bc83a66903f8ba48fdd +0 -0
  47. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/objects/e6/58bd7ec86dce765db3e0db94b7fae9fc2ad02c +0 -0
  48. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/objects/ee/b471d301de66b527ba9d4564436798c0cc0d08 +0 -0
  49. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/objects/f7/0771a180df39d25ae557e130d22cb657ddab57 +0 -0
  50. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/objects/fd/10a6812cf08d15a4e904f6d9673f0db1728270 +0 -0
  51. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/refs/heads/master +1 -0
  52. llm_function-0.1.0/llm_function/.paa.tracking/git_repo/refs/tags/v0.1.0 +1 -0
  53. llm_function-0.1.0/llm_function/.paa.tracking/lsts_package_versions.yml +3 -0
  54. llm_function-0.1.0/llm_function/.paa.tracking/notebook.ipynb +450 -0
  55. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/pyproject.toml +2 -2
  56. {llm_function-0.0.2/llm_function/artifacts/.paa.tracking/git/module → llm_function-0.1.0/llm_function/.paa.tracking/python_modules}/llm_function.py +143 -20
  57. llm_function-0.1.0/llm_function/.paa.tracking/release_notes.md +19 -0
  58. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/version_logs.csv +4 -0
  59. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/__init__.py +1 -1
  60. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git/docs_cache/llm_function-concepts/errors.md +65 -0
  61. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git/docs_cache/llm_function-concepts/runtime.md +81 -0
  62. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git/docs_cache/llm_function-concepts/tools.md +38 -0
  63. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git/docs_cache/llm_function-concepts/workflow_cache.md +22 -0
  64. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git/docs_cache/llm_function-interfaces/decorator.md +89 -0
  65. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git/docs_cache/llm_function.md +339 -0
  66. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git/example_notebooks/llm_function.ipynb +450 -0
  67. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git/extra_docs/llm_function/concepts/errors.md +65 -0
  68. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git/extra_docs/llm_function/concepts/runtime.md +81 -0
  69. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git/extra_docs/llm_function/concepts/tools.md +38 -0
  70. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git/extra_docs/llm_function/concepts/workflow_cache.md +22 -0
  71. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git/extra_docs/llm_function/interfaces/decorator.md +89 -0
  72. {llm_function-0.0.2/llm_function → llm_function-0.1.0/llm_function/artifacts}/.paa.tracking/git/module/llm_function.py +143 -20
  73. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git/tests/llm_function/test_llm_function.py +214 -0
  74. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/artifacts/.paa.tracking/git/tracking/pyproject.toml +2 -2
  75. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git/tracking/release_notes.md +19 -0
  76. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/COMMIT_EDITMSG +1 -0
  77. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/index +0 -0
  78. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/logs/HEAD +1 -0
  79. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/logs/refs/heads/master +1 -0
  80. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/objects/1f/c849c4f0d3cf1d9ffff4358a3eabce6b820d73 +0 -0
  81. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/objects/2f/79f2bee026966805fa8326417acdadeaf720a1 +0 -0
  82. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/objects/36/79219b54892d9062e887aca6289079479570b9 +3 -0
  83. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/objects/39/f4e78e14e1ee1381b4ea5df1cee8404cee7057 +0 -0
  84. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/objects/46/8391bf2d314b0a99606adea9579fee9cd75be7 +0 -0
  85. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/objects/46/cfbf209ff79280d95767887189f6f02b06c9c8 +0 -0
  86. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/objects/50/81a8d28164a30d9236e56a24cd5e70f00425ac +0 -0
  87. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/objects/58/56766b61db2e4fde07e1172130fc57f27cc7a5 +0 -0
  88. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/objects/68/fe9b990a5303fa688dbc0f8032004edbeb933f +0 -0
  89. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/objects/72/25901553af8e43ebcbc70f855c9f434629f17e +0 -0
  90. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/objects/73/4b081edd0b8bbe482c9700c3bcc1a317828d5d +0 -0
  91. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/objects/a6/7a9669585b39d1d3f112a3b5bccbd2aaf30e64 +0 -0
  92. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/objects/b8/414783e9de9e36b3219743e1cf8e3c9f8c4e96 +0 -0
  93. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/objects/c1/aa857205ca648912bd0d68766d93cdd91f76dc +0 -0
  94. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/objects/c2/1968e88b0bf36c52e1cb31358134f089d2696a +1 -0
  95. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/objects/c9/c82dc2247fb6bc4ade753493c0a5e9e03f4bea +0 -0
  96. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/objects/cd/a31fedf854fcf91ea8d2403eb05993d15aa8ec +0 -0
  97. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/objects/d5/8a6fe3dd4456f3553bff06145a8c37bf292f2b +0 -0
  98. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/objects/da/8c1a1dfbaab5736c793bc83a66903f8ba48fdd +0 -0
  99. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/objects/e6/58bd7ec86dce765db3e0db94b7fae9fc2ad02c +0 -0
  100. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/objects/ee/b471d301de66b527ba9d4564436798c0cc0d08 +0 -0
  101. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/objects/f7/0771a180df39d25ae557e130d22cb657ddab57 +0 -0
  102. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/objects/fd/10a6812cf08d15a4e904f6d9673f0db1728270 +0 -0
  103. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/refs/heads/master +1 -0
  104. llm_function-0.1.0/llm_function/artifacts/.paa.tracking/git_repo/refs/tags/v0.1.0 +1 -0
  105. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/llm_function.py +143 -20
  106. llm_function-0.1.0/llm_function/mkdocs/docs/decorator.md +89 -0
  107. llm_function-0.1.0/llm_function/mkdocs/docs/description.md +339 -0
  108. llm_function-0.1.0/llm_function/mkdocs/docs/errors.md +65 -0
  109. llm_function-0.1.0/llm_function/mkdocs/docs/release-notes.md +19 -0
  110. llm_function-0.1.0/llm_function/mkdocs/docs/runtime.md +81 -0
  111. llm_function-0.1.0/llm_function/mkdocs/docs/tools.md +38 -0
  112. llm_function-0.1.0/llm_function/mkdocs/docs/workflow_cache.md +22 -0
  113. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/mkdocs.yml +8 -2
  114. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/404.html +173 -4
  115. llm_function-0.1.0/llm_function/mkdocs/site/decorator/index.html +843 -0
  116. llm_function-0.1.0/llm_function/mkdocs/site/description/index.html +989 -0
  117. llm_function-0.1.0/llm_function/mkdocs/site/errors/index.html +728 -0
  118. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/index.html +173 -4
  119. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/release-notes/index.html +218 -5
  120. {llm_function-0.0.2/llm_function/mkdocs/site/description → llm_function-0.1.0/llm_function/mkdocs/site/runtime}/index.html +246 -117
  121. llm_function-0.1.0/llm_function/mkdocs/site/search/search_index.json +1 -0
  122. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/sitemap.xml.gz +0 -0
  123. {llm_function-0.0.2/llm_function/mkdocs/site/llm_function_tools → llm_function-0.1.0/llm_function/mkdocs/site/tools}/index.html +227 -149
  124. llm_function-0.1.0/llm_function/mkdocs/site/workflow_cache/index.html +690 -0
  125. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/setup.py +4 -4
  126. llm_function-0.1.0/llm_function/tests/test_llm_function.py +214 -0
  127. llm_function-0.1.0/llm_function.egg-info/PKG-INFO +383 -0
  128. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function.egg-info/SOURCES.txt +87 -27
  129. llm_function-0.1.0/llm_function.egg-info/requires.txt +4 -0
  130. llm_function-0.0.2/PKG-INFO +0 -211
  131. llm_function-0.0.2/llm_function/.paa.tracking/.paa.version +0 -1
  132. llm_function-0.0.2/llm_function/.paa.tracking/git/docs_cache/llm_function.md +0 -167
  133. llm_function-0.0.2/llm_function/.paa.tracking/git/example_notebooks/llm_function.ipynb +0 -264
  134. llm_function-0.0.2/llm_function/.paa.tracking/git/tracking/release_notes.md +0 -9
  135. llm_function-0.0.2/llm_function/.paa.tracking/git_repo/COMMIT_EDITMSG +0 -1
  136. llm_function-0.0.2/llm_function/.paa.tracking/git_repo/index +0 -0
  137. llm_function-0.0.2/llm_function/.paa.tracking/git_repo/logs/HEAD +0 -1
  138. llm_function-0.0.2/llm_function/.paa.tracking/git_repo/logs/refs/heads/master +0 -1
  139. llm_function-0.0.2/llm_function/.paa.tracking/git_repo/objects/2d/176188f19194515e5b5c8434ae84e94edbffdb +0 -0
  140. llm_function-0.0.2/llm_function/.paa.tracking/git_repo/objects/55/d196aad68e2cc20a2ea496529d9dabeb75bb0e +0 -0
  141. llm_function-0.0.2/llm_function/.paa.tracking/git_repo/objects/5e/981704731458562f0d521a2a41df5d7aabc131 +0 -0
  142. llm_function-0.0.2/llm_function/.paa.tracking/git_repo/objects/80/d09a14ebff4f881ed498763b2fb02186ada8d9 +0 -0
  143. llm_function-0.0.2/llm_function/.paa.tracking/git_repo/objects/81/f6d3f093763a2e259203676f69030fa5a13059 +0 -0
  144. llm_function-0.0.2/llm_function/.paa.tracking/git_repo/objects/8b/e2712bb0e8e1d20680ff8fec95e3d3967cdb32 +0 -0
  145. llm_function-0.0.2/llm_function/.paa.tracking/git_repo/objects/91/f1d4c0830abe4ebb0902dc052f5dfe9e8fade7 +0 -0
  146. llm_function-0.0.2/llm_function/.paa.tracking/git_repo/objects/c5/c3b2e6c4ec245ad4de3920096666609b658241 +0 -0
  147. llm_function-0.0.2/llm_function/.paa.tracking/git_repo/objects/e3/c2c5d2e72b8a550b5c9af1e36052a29f5f45ab +0 -3
  148. llm_function-0.0.2/llm_function/.paa.tracking/git_repo/objects/ef/5476ed91c86a92159efe193f43d490007b831d +0 -2
  149. llm_function-0.0.2/llm_function/.paa.tracking/git_repo/objects/f8/158749dcad7af50215628525e91782e8aa4107 +0 -0
  150. llm_function-0.0.2/llm_function/.paa.tracking/git_repo/refs/heads/master +0 -1
  151. llm_function-0.0.2/llm_function/.paa.tracking/git_repo/refs/tags/v0.0.2 +0 -1
  152. llm_function-0.0.2/llm_function/.paa.tracking/lsts_package_versions.yml +0 -3
  153. llm_function-0.0.2/llm_function/.paa.tracking/notebook.ipynb +0 -264
  154. llm_function-0.0.2/llm_function/.paa.tracking/release_notes.md +0 -9
  155. llm_function-0.0.2/llm_function/artifacts/.paa.tracking/git/docs_cache/llm_function.md +0 -167
  156. llm_function-0.0.2/llm_function/artifacts/.paa.tracking/git/example_notebooks/llm_function.ipynb +0 -264
  157. llm_function-0.0.2/llm_function/artifacts/.paa.tracking/git/tracking/release_notes.md +0 -9
  158. llm_function-0.0.2/llm_function/artifacts/.paa.tracking/git_repo/COMMIT_EDITMSG +0 -1
  159. llm_function-0.0.2/llm_function/artifacts/.paa.tracking/git_repo/index +0 -0
  160. llm_function-0.0.2/llm_function/artifacts/.paa.tracking/git_repo/logs/HEAD +0 -1
  161. llm_function-0.0.2/llm_function/artifacts/.paa.tracking/git_repo/logs/refs/heads/master +0 -1
  162. llm_function-0.0.2/llm_function/artifacts/.paa.tracking/git_repo/objects/2d/176188f19194515e5b5c8434ae84e94edbffdb +0 -0
  163. llm_function-0.0.2/llm_function/artifacts/.paa.tracking/git_repo/objects/55/d196aad68e2cc20a2ea496529d9dabeb75bb0e +0 -0
  164. llm_function-0.0.2/llm_function/artifacts/.paa.tracking/git_repo/objects/5e/981704731458562f0d521a2a41df5d7aabc131 +0 -0
  165. llm_function-0.0.2/llm_function/artifacts/.paa.tracking/git_repo/objects/80/d09a14ebff4f881ed498763b2fb02186ada8d9 +0 -0
  166. llm_function-0.0.2/llm_function/artifacts/.paa.tracking/git_repo/objects/81/f6d3f093763a2e259203676f69030fa5a13059 +0 -0
  167. llm_function-0.0.2/llm_function/artifacts/.paa.tracking/git_repo/objects/8b/e2712bb0e8e1d20680ff8fec95e3d3967cdb32 +0 -0
  168. llm_function-0.0.2/llm_function/artifacts/.paa.tracking/git_repo/objects/91/f1d4c0830abe4ebb0902dc052f5dfe9e8fade7 +0 -0
  169. llm_function-0.0.2/llm_function/artifacts/.paa.tracking/git_repo/objects/c5/c3b2e6c4ec245ad4de3920096666609b658241 +0 -0
  170. llm_function-0.0.2/llm_function/artifacts/.paa.tracking/git_repo/objects/e3/c2c5d2e72b8a550b5c9af1e36052a29f5f45ab +0 -3
  171. llm_function-0.0.2/llm_function/artifacts/.paa.tracking/git_repo/objects/ef/5476ed91c86a92159efe193f43d490007b831d +0 -2
  172. llm_function-0.0.2/llm_function/artifacts/.paa.tracking/git_repo/objects/f8/158749dcad7af50215628525e91782e8aa4107 +0 -0
  173. llm_function-0.0.2/llm_function/artifacts/.paa.tracking/git_repo/refs/heads/master +0 -1
  174. llm_function-0.0.2/llm_function/artifacts/.paa.tracking/git_repo/refs/tags/v0.0.2 +0 -1
  175. llm_function-0.0.2/llm_function/mkdocs/docs/description.md +0 -167
  176. llm_function-0.0.2/llm_function/mkdocs/docs/llm_function_tools.md +0 -168
  177. llm_function-0.0.2/llm_function/mkdocs/docs/release-notes.md +0 -9
  178. llm_function-0.0.2/llm_function/mkdocs/site/search/search_index.json +0 -1
  179. llm_function-0.0.2/llm_function.egg-info/PKG-INFO +0 -211
  180. llm_function-0.0.2/llm_function.egg-info/requires.txt +0 -4
  181. {llm_function-0.0.2 → llm_function-0.1.0}/LICENSE +0 -0
  182. {llm_function-0.0.2 → llm_function-0.1.0}/NOTICE +0 -0
  183. {llm_function-0.0.2 → llm_function-0.1.0}/README.md +0 -0
  184. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/.paa.config +0 -0
  185. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/git/dependencies/llm_func_deps/llm_function_config.py +0 -0
  186. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/git/dependencies/llm_func_deps/tool_registry.py +0 -0
  187. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/git_repo/HEAD +0 -0
  188. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/git_repo/config +0 -0
  189. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/git_repo/description +0 -0
  190. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/git_repo/hooks/applypatch-msg.sample +0 -0
  191. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/git_repo/hooks/commit-msg.sample +0 -0
  192. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/git_repo/hooks/fsmonitor-watchman.sample +0 -0
  193. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/git_repo/hooks/post-update.sample +0 -0
  194. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/git_repo/hooks/pre-applypatch.sample +0 -0
  195. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/git_repo/hooks/pre-commit.sample +0 -0
  196. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/git_repo/hooks/pre-merge-commit.sample +0 -0
  197. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/git_repo/hooks/pre-push.sample +0 -0
  198. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/git_repo/hooks/pre-rebase.sample +0 -0
  199. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/git_repo/hooks/pre-receive.sample +0 -0
  200. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/git_repo/hooks/prepare-commit-msg.sample +0 -0
  201. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/git_repo/hooks/push-to-checkout.sample +0 -0
  202. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/git_repo/hooks/sendemail-validate.sample +0 -0
  203. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/git_repo/hooks/update.sample +0 -0
  204. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/git_repo/info/exclude +0 -0
  205. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/git_repo/objects/23/d10b479e3102724a6eb510225cc24bb2ce9d78 +0 -0
  206. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/git_repo/objects/63/9282ebc80b9db9b677374a7c16bc7472d5e71c +0 -0
  207. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/git_repo/objects/9d/2a8151dd42e6abfffbbbd674b850a7066daa1a +0 -0
  208. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/git_repo/objects/fb/834f2f59b432c0688699b91926899c0e0f2a5d +0 -0
  209. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/package_licenses.json +0 -0
  210. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/package_mapping.json +0 -0
  211. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/python_modules/components/llm_func_deps/llm_function_config.py +0 -0
  212. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/.paa.tracking/python_modules/components/llm_func_deps/tool_registry.py +0 -0
  213. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/artifacts/.paa.tracking/git/dependencies/llm_func_deps/llm_function_config.py +0 -0
  214. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/artifacts/.paa.tracking/git/dependencies/llm_func_deps/tool_registry.py +0 -0
  215. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/artifacts/.paa.tracking/git_repo/HEAD +0 -0
  216. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/artifacts/.paa.tracking/git_repo/config +0 -0
  217. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/artifacts/.paa.tracking/git_repo/description +0 -0
  218. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/artifacts/.paa.tracking/git_repo/hooks/applypatch-msg.sample +0 -0
  219. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/artifacts/.paa.tracking/git_repo/hooks/commit-msg.sample +0 -0
  220. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/artifacts/.paa.tracking/git_repo/hooks/fsmonitor-watchman.sample +0 -0
  221. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/artifacts/.paa.tracking/git_repo/hooks/post-update.sample +0 -0
  222. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/artifacts/.paa.tracking/git_repo/hooks/pre-applypatch.sample +0 -0
  223. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/artifacts/.paa.tracking/git_repo/hooks/pre-commit.sample +0 -0
  224. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/artifacts/.paa.tracking/git_repo/hooks/pre-merge-commit.sample +0 -0
  225. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/artifacts/.paa.tracking/git_repo/hooks/pre-push.sample +0 -0
  226. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/artifacts/.paa.tracking/git_repo/hooks/pre-rebase.sample +0 -0
  227. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/artifacts/.paa.tracking/git_repo/hooks/pre-receive.sample +0 -0
  228. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/artifacts/.paa.tracking/git_repo/hooks/prepare-commit-msg.sample +0 -0
  229. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/artifacts/.paa.tracking/git_repo/hooks/push-to-checkout.sample +0 -0
  230. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/artifacts/.paa.tracking/git_repo/hooks/sendemail-validate.sample +0 -0
  231. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/artifacts/.paa.tracking/git_repo/hooks/update.sample +0 -0
  232. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/artifacts/.paa.tracking/git_repo/info/exclude +0 -0
  233. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/artifacts/.paa.tracking/git_repo/objects/23/d10b479e3102724a6eb510225cc24bb2ce9d78 +0 -0
  234. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/artifacts/.paa.tracking/git_repo/objects/63/9282ebc80b9db9b677374a7c16bc7472d5e71c +0 -0
  235. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/artifacts/.paa.tracking/git_repo/objects/9d/2a8151dd42e6abfffbbbd674b850a7066daa1a +0 -0
  236. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/artifacts/.paa.tracking/git_repo/objects/fb/834f2f59b432c0688699b91926899c0e0f2a5d +0 -0
  237. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/docs/css/extra.css +0 -0
  238. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/docs/index.md +0 -0
  239. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/images/favicon.png +0 -0
  240. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/bundle.fe8b6f2b.min.js +0 -0
  241. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/bundle.fe8b6f2b.min.js.map +0 -0
  242. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.ar.min.js +0 -0
  243. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.da.min.js +0 -0
  244. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.de.min.js +0 -0
  245. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.du.min.js +0 -0
  246. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.el.min.js +0 -0
  247. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.es.min.js +0 -0
  248. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.fi.min.js +0 -0
  249. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.fr.min.js +0 -0
  250. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.he.min.js +0 -0
  251. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.hi.min.js +0 -0
  252. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.hu.min.js +0 -0
  253. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.hy.min.js +0 -0
  254. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.it.min.js +0 -0
  255. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.ja.min.js +0 -0
  256. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.jp.min.js +0 -0
  257. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.kn.min.js +0 -0
  258. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.ko.min.js +0 -0
  259. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.multi.min.js +0 -0
  260. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.nl.min.js +0 -0
  261. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.no.min.js +0 -0
  262. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.pt.min.js +0 -0
  263. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.ro.min.js +0 -0
  264. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.ru.min.js +0 -0
  265. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.sa.min.js +0 -0
  266. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.stemmer.support.min.js +0 -0
  267. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.sv.min.js +0 -0
  268. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.ta.min.js +0 -0
  269. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.te.min.js +0 -0
  270. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.th.min.js +0 -0
  271. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.tr.min.js +0 -0
  272. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.vi.min.js +0 -0
  273. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/min/lunr.zh.min.js +0 -0
  274. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/tinyseg.js +0 -0
  275. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/lunr/wordcut.js +0 -0
  276. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/workers/search.b8dbb3d2.min.js +0 -0
  277. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/javascripts/workers/search.b8dbb3d2.min.js.map +0 -0
  278. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/stylesheets/main.3cba04c6.min.css +0 -0
  279. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/stylesheets/main.3cba04c6.min.css.map +0 -0
  280. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/stylesheets/palette.06af60db.min.css +0 -0
  281. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/assets/stylesheets/palette.06af60db.min.css.map +0 -0
  282. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/css/extra.css +0 -0
  283. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function/mkdocs/site/sitemap.xml +0 -0
  284. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function.egg-info/dependency_links.txt +0 -0
  285. {llm_function-0.0.2 → llm_function-0.1.0}/llm_function.egg-info/top_level.txt +0 -0
  286. {llm_function-0.0.2 → llm_function-0.1.0}/setup.cfg +0 -0
@@ -0,0 +1,383 @@
1
+ Metadata-Version: 2.4
2
+ Name: llm_function
3
+ Version: 0.1.0
4
+ Summary: Llm function is a decorator that uses llm to assemble reusable workflows from available tools to match input and output models.
5
+ Home-page: https://kiril-mordan.github.io/adaptive-reusables/llm_function/
6
+ Author: Kyrylo Mordan
7
+ Author-email: parachute.repo@gmail.com
8
+ License: apache-2.0
9
+ Keywords: aa-paa-tool
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ License-File: NOTICE
14
+ Requires-Dist: workflow_auto_assembler>=0.1.1
15
+ Requires-Dist: pydantic
16
+ Requires-Dist: attrsx
17
+ Requires-Dist: attrs
18
+ Dynamic: author
19
+ Dynamic: author-email
20
+ Dynamic: classifier
21
+ Dynamic: description
22
+ Dynamic: description-content-type
23
+ Dynamic: home-page
24
+ Dynamic: keywords
25
+ Dynamic: license
26
+ Dynamic: license-file
27
+ Dynamic: requires-dist
28
+ Dynamic: summary
29
+
30
+ # Llm function
31
+
32
+ `llm_function` helps you build reusable LLM functions with normal Python signatures.
33
+
34
+ You define a function with Pydantic input and output models, describe what it should do
35
+ in the docstring, and provide a set of available tools. At runtime, `llm_function`
36
+ uses [`workflow_auto_assembler`](https://pypi.org/project/workflow-auto-assembler/) to
37
+ assemble and execute a workflow that satisfies that typed function contract.
38
+
39
+ The result is an LLM-backed function that can be reused like any other Python function,
40
+ while still being grounded in explicit tools, schemas, and config.
41
+
42
+ Tool definition and discovery live in
43
+ [`llm_function_tools`](https://pypi.org/project/llm-function-tools/).
44
+
45
+ Currently intended usage pattern for `llm_function`:
46
+
47
+ - define typed tools
48
+ - mark them with `llm_function_tools`
49
+ - pass them into `llm_function` through a tool source
50
+ - bundle runtime settings and tools into config
51
+ - call the decorated function like a normal Python function
52
+
53
+
54
+
55
+ ```python
56
+ from pathlib import Path
57
+ from tempfile import TemporaryDirectory
58
+
59
+ from pydantic import BaseModel, Field
60
+ from typing import Type, List, Optional
61
+
62
+ from llm_function_tools import llm_tool
63
+ from llm_function import InMemoryToolSource, PythonFileToolSource, LlmFunctionConfig, LlmFunctionRuntime, LlmRuntimeConfig, llm_function
64
+
65
+ ```
66
+
67
+ ## Define available tools
68
+
69
+ The runtime can assemble workflows only from tools you expose through tool sources. Tools can be defined directly in the current notebook or kept in a separate `.py` file.
70
+
71
+
72
+
73
+ ```python
74
+ class GetWeatherInput(BaseModel):
75
+ city: str = Field(..., description="City name.")
76
+
77
+
78
+ class GetWeatherOutput(BaseModel):
79
+ forecast: str = Field(..., description="Weather forecast for the city.")
80
+
81
+
82
+ @llm_tool(tags=["weather"])
83
+ def get_weather(inputs: GetWeatherInput) -> GetWeatherOutput:
84
+ """Get current weather for a city."""
85
+ return GetWeatherOutput(forecast=f"Sunny in {inputs.city}")
86
+
87
+
88
+ class EmailInformationPoint(BaseModel):
89
+ title: str = Field(None, description="Few word description of the information.")
90
+ content: str = Field(..., description="Content of the information.")
91
+
92
+ class SendReportEmailInput(BaseModel):
93
+ city: str = Field(..., description="Name of the city where report will be send.")
94
+ information: list[EmailInformationPoint]
95
+
96
+ class SendReportEmailOutput(BaseModel):
97
+ email_sent: bool = Field(..., description="Conformation that email was send successfully.")
98
+ message: str = Field(None, description="Optional comments from the process.")
99
+
100
+ @llm_tool(tags=["email"])
101
+ def send_report_email(inputs: SendReportEmailInput) -> SendReportEmailOutput:
102
+ """Sends a report email with given information points to a city."""
103
+
104
+ if inputs.city not in ["London", "Berlin"]:
105
+ return SendReportEmailOutput(
106
+ email_sent = False,
107
+ message = f"Email was not sent to {inputs.city}!"
108
+ )
109
+ else:
110
+ return SendReportEmailOutput(
111
+ email_sent = True,
112
+ message = f"Email sent to {inputs.city}!"
113
+ )
114
+
115
+ class QueryDatabaseInput(BaseModel):
116
+ topic: str = Field(..., description="Topic of a requested piece of information.")
117
+ location: str = Field(..., description="Filter for location name.")
118
+ uid: str = Field(None, description="Filter for unique indentifier of the database item.")
119
+
120
+ class QueryDatabaseOutput(BaseModel):
121
+ info: str = Field(..., description="Content of the information.")
122
+ uid: str = Field(None, description="Unique indentifier of the database item.")
123
+
124
+ @llm_tool(tags=["database"])
125
+ def query_database(inputs : QueryDatabaseInput) -> QueryDatabaseOutput:
126
+ """Get information from the database with provided filters."""
127
+ return QueryDatabaseOutput(
128
+ info = f"Content extracted from the database for {inputs.topic} in {inputs.location} is ...",
129
+ uid = "0000"
130
+ )
131
+
132
+ class QueryWebInput(BaseModel):
133
+ search_input: str = Field(..., description="Topic to be searched on the web.")
134
+
135
+
136
+ class QueryWebOutput(BaseModel):
137
+ search_results: List[str] = Field(..., description="List relevant info from search results.")
138
+
139
+ @llm_tool(tags=["web"])
140
+ def query_web(inputs : QueryWebInput) -> QueryWebOutput:
141
+ """Get information from the internet for provided query."""
142
+ return QueryWebOutput(
143
+ search_results = ["Relevant content found in first search result is ..."],
144
+ )
145
+
146
+
147
+ tool_sources = [InMemoryToolSource([get_weather, send_report_email, query_database, query_web])]
148
+
149
+ ```
150
+
151
+ You can also keep tools in a separate `.py` file and load them with `PythonFileToolSource`:
152
+
153
+
154
+
155
+ ```python
156
+ tmp_dir = TemporaryDirectory()
157
+ tool_file = Path(tmp_dir.name) / "weather_tools.py"
158
+
159
+ tool_file.write_text(
160
+ """
161
+ from pydantic import BaseModel, Field
162
+ from llm_function_tools import llm_tool
163
+
164
+
165
+ class GetWeatherInput(BaseModel):
166
+ city: str = Field(..., description='City name.')
167
+
168
+
169
+ class GetWeatherOutput(BaseModel):
170
+ forecast: str = Field(..., description='Weather forecast for the city.')
171
+
172
+
173
+ @llm_tool(tags=['weather'])
174
+ def get_weather(inputs: GetWeatherInput) -> GetWeatherOutput:
175
+ '''Get current weather for a city.'''
176
+ return GetWeatherOutput(forecast=f'Sunny in {inputs.city}')
177
+ """.strip()
178
+ )
179
+
180
+ file_tool_sources = [PythonFileToolSource(str(tool_file))]
181
+ file_tool_sources
182
+
183
+ ```
184
+
185
+
186
+
187
+
188
+ [PythonFileToolSource(file_path='/tmp/tmpg4e3db4r/weather_tools.py', include_plain_typed=False, location_type='local', package_name=None, package_version=None, module_name=None, loggerLvl=20, logger_name=None, logger_format='%(levelname)s:%(name)s:%(message)s')]
189
+
190
+
191
+
192
+ ## Create reusable config
193
+
194
+ Bundle runtime settings and tool sources once, then reuse that config across multiple decorated functions.
195
+
196
+
197
+
198
+ ```python
199
+ runtime_config = LlmRuntimeConfig(
200
+ llm_handler_params={
201
+ "llm_h_type": "ollama",
202
+ "llm_h_params": {
203
+ "connection_string": "http://localhost:11434",
204
+ "model_name": "gpt-oss:20b",
205
+ },
206
+ },
207
+ storage_path="/tmp",
208
+ )
209
+
210
+ llm_config = LlmFunctionConfig(
211
+ runtime=runtime_config,
212
+ tool_sources=tool_sources,
213
+ )
214
+
215
+ llm_config
216
+
217
+ ```
218
+
219
+
220
+
221
+
222
+ LlmFunctionConfig(runtime=LlmRuntimeConfig(llm_handler_params={'llm_h_type': 'ollama', 'llm_h_params': {'connection_string': 'http://localhost:11434', 'model_name': 'gpt-oss:20b'}}, storage_path='/tmp', force_replan=False, max_retry=None, reset_loops=None, compare_params=None, test_params=None), tool_sources=[InMemoryToolSource(tools=[<function get_weather at 0x762e88216f80>, <function send_report_email at 0x762e8823c550>, <function query_database at 0x762e8823c820>, <function query_web at 0x762e8823caf0>], location_type='local', package_name=None, package_version=None, origin_ref=None, loggerLvl=20, logger_name=None, logger_format='%(levelname)s:%(name)s:%(message)s')], tool_registry=None)
223
+
224
+
225
+
226
+ ## Create reusable runtime
227
+
228
+ Use `LlmFunctionRuntime` when multiple decorated functions or repeated calls should reuse the same initialized `WorkflowAutoAssembler` and in-memory workflow cache.
229
+
230
+
231
+
232
+ ```python
233
+ llm_runtime = LlmFunctionRuntime(config=llm_config)
234
+
235
+ llm_runtime
236
+
237
+ ```
238
+
239
+
240
+
241
+
242
+ LlmFunctionRuntime(available_functions=None, available_callables=None, tool_registry=None, tool_sources=[InMemoryToolSource(tools=[<function get_weather at 0x762e88216f80>, <function send_report_email at 0x762e8823c550>, <function query_database at 0x762e8823c820>, <function query_web at 0x762e8823caf0>], location_type='local', package_name=None, package_version=None, origin_ref=None, loggerLvl=20, logger_name=None, logger_format='%(levelname)s:%(name)s:%(message)s')], config=LlmFunctionConfig(runtime=LlmRuntimeConfig(llm_handler_params={'llm_h_type': 'ollama', 'llm_h_params': {'connection_string': 'http://localhost:11434', 'model_name': 'gpt-oss:20b'}}, storage_path='/tmp', force_replan=False, max_retry=None, reset_loops=None, compare_params=None, test_params=None), tool_sources=[InMemoryToolSource(tools=[<function get_weather at 0x762e88216f80>, <function send_report_email at 0x762e8823c550>, <function query_database at 0x762e8823c820>, <function query_web at 0x762e8823caf0>], location_type='local', package_name=None, package_version=None, origin_ref=None, loggerLvl=20, logger_name=None, logger_format='%(levelname)s:%(name)s:%(message)s')], tool_registry=None), llm_handler_params={'llm_h_type': 'ollama', 'llm_h_params': {'connection_string': 'http://localhost:11434', 'model_name': 'gpt-oss:20b'}}, storage_path='/tmp', resolved_tools={'available_functions': [LlmFunctionItem(func_id='a1ab73be67259e736149bd35da129a143206383d6b63749e5cbbe8ec49dbc9eb', name='get_weather', description='Get current weather for a city.', input_schema_json={'properties': {'city': {'description': 'City name.', 'title': 'City', 'type': 'string'}}, 'required': ['city'], 'title': 'GetWeatherInput', 'type': 'object'}, output_schema_json={'properties': {'forecast': {'description': 'Weather forecast for the city.', 'title': 'Forecast', 'type': 'string'}}, 'required': ['forecast'], 'title': 'GetWeatherOutput', 'type': 'object'}), LlmFunctionItem(func_id='a5f3428a9f0b010f6bfdd9c8e956600f0a627ec520ee5967942a2844909515a3', name='send_report_email', description='Sends a report email with given information points to a city.', input_schema_json={'$defs': {'EmailInformationPoint': {'properties': {'title': {'default': None, 'description': 'Few word description of the information.', 'title': 'Title', 'type': 'string'}, 'content': {'description': 'Content of the information.', 'title': 'Content', 'type': 'string'}}, 'required': ['content'], 'title': 'EmailInformationPoint', 'type': 'object'}}, 'properties': {'city': {'description': 'Name of the city where report will be send.', 'title': 'City', 'type': 'string'}, 'information': {'items': {'$ref': '#/$defs/EmailInformationPoint'}, 'title': 'Information', 'type': 'array'}}, 'required': ['city', 'information'], 'title': 'SendReportEmailInput', 'type': 'object'}, output_schema_json={'properties': {'email_sent': {'description': 'Conformation that email was send successfully.', 'title': 'Email Sent', 'type': 'boolean'}, 'message': {'default': None, 'description': 'Optional comments from the process.', 'title': 'Message', 'type': 'string'}}, 'required': ['email_sent'], 'title': 'SendReportEmailOutput', 'type': 'object'}), LlmFunctionItem(func_id='9bed51d9fc2fa9d99609fc920b83b1f60cf2c5df311b33a7292b21b3cfec6568', name='query_database', description='Get information from the database with provided filters.', input_schema_json={'properties': {'topic': {'description': 'Topic of a requested piece of information.', 'title': 'Topic', 'type': 'string'}, 'location': {'description': 'Filter for location name.', 'title': 'Location', 'type': 'string'}, 'uid': {'default': None, 'description': 'Filter for unique indentifier of the database item.', 'title': 'Uid', 'type': 'string'}}, 'required': ['topic', 'location'], 'title': 'QueryDatabaseInput', 'type': 'object'}, output_schema_json={'properties': {'info': {'description': 'Content of the information.', 'title': 'Info', 'type': 'string'}, 'uid': {'default': None, 'description': 'Unique indentifier of the database item.', 'title': 'Uid', 'type': 'string'}}, 'required': ['info'], 'title': 'QueryDatabaseOutput', 'type': 'object'}), LlmFunctionItem(func_id='97bd46f01b044bda078ac8171188e74d1e9428778f00a510b8a070b4b9110ff1', name='query_web', description='Get information from the internet for provided query.', input_schema_json={'properties': {'search_input': {'description': 'Topic to be searched on the web.', 'title': 'Search Input', 'type': 'string'}}, 'required': ['search_input'], 'title': 'QueryWebInput', 'type': 'object'}, output_schema_json={'properties': {'search_results': {'description': 'List relevant info from search results.', 'items': {'type': 'string'}, 'title': 'Search Results', 'type': 'array'}}, 'required': ['search_results'], 'title': 'QueryWebOutput', 'type': 'object'})], 'available_callables': {'a1ab73be67259e736149bd35da129a143206383d6b63749e5cbbe8ec49dbc9eb': <function get_weather at 0x762e88216f80>, 'a5f3428a9f0b010f6bfdd9c8e956600f0a627ec520ee5967942a2844909515a3': <function send_report_email at 0x762e8823c550>, '9bed51d9fc2fa9d99609fc920b83b1f60cf2c5df311b33a7292b21b3cfec6568': <function query_database at 0x762e8823c820>, '97bd46f01b044bda078ac8171188e74d1e9428778f00a510b8a070b4b9110ff1': <function query_web at 0x762e8823caf0>}, 'resolved_tools': [ResolvedTool(tool_spec=ToolSpec(func=<function get_weather at 0x762e88216f80>, name='get_weather', description='Get current weather for a city.', input_model=<class '__main__.GetWeatherInput'>, output_model=<class '__main__.GetWeatherOutput'>, metadata={}, tags=[]), func=<function get_weather at 0x762e88216f80>, source_type='memory', location_type='local', package_name=None, package_version=None, module_name='__main__', file_path=None, origin_ref=None, metadata={}), ResolvedTool(tool_spec=ToolSpec(func=<function send_report_email at 0x762e8823c550>, name='send_report_email', description='Sends a report email with given information points to a city.', input_model=<class '__main__.SendReportEmailInput'>, output_model=<class '__main__.SendReportEmailOutput'>, metadata={}, tags=[]), func=<function send_report_email at 0x762e8823c550>, source_type='memory', location_type='local', package_name=None, package_version=None, module_name='__main__', file_path=None, origin_ref=None, metadata={}), ResolvedTool(tool_spec=ToolSpec(func=<function query_database at 0x762e8823c820>, name='query_database', description='Get information from the database with provided filters.', input_model=<class '__main__.QueryDatabaseInput'>, output_model=<class '__main__.QueryDatabaseOutput'>, metadata={}, tags=[]), func=<function query_database at 0x762e8823c820>, source_type='memory', location_type='local', package_name=None, package_version=None, module_name='__main__', file_path=None, origin_ref=None, metadata={}), ResolvedTool(tool_spec=ToolSpec(func=<function query_web at 0x762e8823caf0>, name='query_web', description='Get information from the internet for provided query.', input_model=<class '__main__.QueryWebInput'>, output_model=<class '__main__.QueryWebOutput'>, metadata={}, tags=[]), func=<function query_web at 0x762e8823caf0>, source_type='memory', location_type='local', package_name=None, package_version=None, module_name='__main__', file_path=None, origin_ref=None, metadata={})]}, waa_h=WorkflowAutoAssembler(workflow_error_types=<enum 'WorkflowErrorType'>, workflow_error=<class 'workflow_auto_assembler.workflow_auto_assembler.WorkflowError'>, available_functions=[LlmFunctionItem(func_id='a1ab73be67259e736149bd35da129a143206383d6b63749e5cbbe8ec49dbc9eb', name='get_weather', description='Get current weather for a city.', input_schema_json={'properties': {'city': {'description': 'City name.', 'title': 'City', 'type': 'string'}}, 'required': ['city'], 'title': 'GetWeatherInput', 'type': 'object'}, output_schema_json={'properties': {'forecast': {'description': 'Weather forecast for the city.', 'title': 'Forecast', 'type': 'string'}}, 'required': ['forecast'], 'title': 'GetWeatherOutput', 'type': 'object'}), LlmFunctionItem(func_id='a5f3428a9f0b010f6bfdd9c8e956600f0a627ec520ee5967942a2844909515a3', name='send_report_email', description='Sends a report email with given information points to a city.', input_schema_json={'$defs': {'EmailInformationPoint': {'properties': {'title': {'default': None, 'description': 'Few word description of the information.', 'title': 'Title', 'type': 'string'}, 'content': {'description': 'Content of the information.', 'title': 'Content', 'type': 'string'}}, 'required': ['content'], 'title': 'EmailInformationPoint', 'type': 'object'}}, 'properties': {'city': {'description': 'Name of the city where report will be send.', 'title': 'City', 'type': 'string'}, 'information': {'items': {'$ref': '#/$defs/EmailInformationPoint'}, 'title': 'Information', 'type': 'array'}}, 'required': ['city', 'information'], 'title': 'SendReportEmailInput', 'type': 'object'}, output_schema_json={'properties': {'email_sent': {'description': 'Conformation that email was send successfully.', 'title': 'Email Sent', 'type': 'boolean'}, 'message': {'default': None, 'description': 'Optional comments from the process.', 'title': 'Message', 'type': 'string'}}, 'required': ['email_sent'], 'title': 'SendReportEmailOutput', 'type': 'object'}), LlmFunctionItem(func_id='9bed51d9fc2fa9d99609fc920b83b1f60cf2c5df311b33a7292b21b3cfec6568', name='query_database', description='Get information from the database with provided filters.', input_schema_json={'properties': {'topic': {'description': 'Topic of a requested piece of information.', 'title': 'Topic', 'type': 'string'}, 'location': {'description': 'Filter for location name.', 'title': 'Location', 'type': 'string'}, 'uid': {'default': None, 'description': 'Filter for unique indentifier of the database item.', 'title': 'Uid', 'type': 'string'}}, 'required': ['topic', 'location'], 'title': 'QueryDatabaseInput', 'type': 'object'}, output_schema_json={'properties': {'info': {'description': 'Content of the information.', 'title': 'Info', 'type': 'string'}, 'uid': {'default': None, 'description': 'Unique indentifier of the database item.', 'title': 'Uid', 'type': 'string'}}, 'required': ['info'], 'title': 'QueryDatabaseOutput', 'type': 'object'}), LlmFunctionItem(func_id='97bd46f01b044bda078ac8171188e74d1e9428778f00a510b8a070b4b9110ff1', name='query_web', description='Get information from the internet for provided query.', input_schema_json={'properties': {'search_input': {'description': 'Topic to be searched on the web.', 'title': 'Search Input', 'type': 'string'}}, 'required': ['search_input'], 'title': 'QueryWebInput', 'type': 'object'}, output_schema_json={'properties': {'search_results': {'description': 'List relevant info from search results.', 'items': {'type': 'string'}, 'title': 'Search Results', 'type': 'array'}}, 'required': ['search_results'], 'title': 'QueryWebOutput', 'type': 'object'})], available_callables={'a1ab73be67259e736149bd35da129a143206383d6b63749e5cbbe8ec49dbc9eb': <function get_weather at 0x762e88216f80>, 'a5f3428a9f0b010f6bfdd9c8e956600f0a627ec520ee5967942a2844909515a3': <function send_report_email at 0x762e8823c550>, '9bed51d9fc2fa9d99609fc920b83b1f60cf2c5df311b33a7292b21b3cfec6568': <function query_database at 0x762e8823c820>, '97bd46f01b044bda078ac8171188e74d1e9428778f00a510b8a070b4b9110ff1': <function query_web at 0x762e8823caf0>}, max_output_unexpected=3, max_retry=10, reset_loops=2, storage_path='/tmp', llm_handler_h=LlmHandler(llm_h_type='ollama', llm_h_params={'connection_string': 'http://localhost:11434', 'model_name': 'gpt-oss:20b'}, llm_h_class=<class 'workflow_auto_assembler.workflow_auto_assembler.OllamaHandlerAsync'>, llm_h=OllamaHandlerAsync(connection_string='http://localhost:11434', model_name='gpt-oss:20b', model=<ollama._client.AsyncClient object at 0x762e883a0190>, kwargs={}, loggerLvl=20, logger_name=None, logger_format='%(levelname)s:%(name)s:%(message)s'), loggerLvl=20, logger_name=None, logger_format='%(levelname)s:%(name)s:%(message)s'), llm_handler_class=<class 'workflow_auto_assembler.workflow_auto_assembler.LlmHandler'>, llm_handler_params={'llm_h_type': 'ollama', 'llm_h_params': {'connection_string': 'http://localhost:11434', 'model_name': 'gpt-oss:20b'}}, check_h=WorkflowCheck(workflow_error_types=<enum 'WorkflowErrorType'>, workflow_error=<class 'workflow_auto_assembler.workflow_auto_assembler.WorkflowError'>, system_message='{purpose_description}\n{expected_output_schema}\n{function_call_description}\n', system_message_items={'purpose_description': '## Role\nYou are an initial check for Workflow Agent tasked with creating a complete workflow for a given task. The workflow must be constructed solely from calls to the functions provided. Each workflow should be represented as a JSON list, where each element is an object representing a single function call. For any function input that is meant to be filled using the output of a previous step rather than provided directly, indicate this using the format: "source: <previous_function_name>.output.<field_name>". Your task is to determine whether given provided inputs the workflow could be contracted and explain your decision in few statements tops.\n', 'expected_output_schema': '## Output Requirements\n- **Respond ONLY with valid JSON** — specifically, an object. - **Do NOT** provide any additional commentary, explanations, or text outside this JSON object. - The object must represent structured response, with **exactly** the following fields:\n 1. `"decision"` (bool) - true if required workflow could be assembled from provided tools, false if not. \n 2. `"justification"` (string) - explaination for the `"decision"`.\n \n### Expected Format\n{\n "decision": true/false,\n "justification": "This task can/cannot be solved with provided tools, because ..."\n},\n', 'function_call_description': '## Available functions\nBelow is the list of available functions that you can use to build your workflow. Each function is defined by its name, a description, and a JSON schema for its parameters. For example, the function list is as follows:\n{available_functions}\n'}, debug_prompts={'hf': '\nYour output contains functions that are not available for function calling. Pls try again, this time using only provided functions. \nNot available functions:\n{hfunctions}\nAvailable functions:\n{afunctions}\n\nDo not comment!\n', 'alt': '\nYour output contains function that have failed during function calling. Pls try again, this time contructing the workflow that uses different functions. \nFailed function:\n{ffunction}\nOther available functions:\n{afunctions}\n\nDo not comment!\n', 'mo': 'Your output is missing output_model, pls include it as a final step!\n'}, check_prompt='{task_description}\n{input_schema}\n{output_schema}\nIf the task description includes steps that are not explicitly represented in the output schema, you may ignore those extra steps. However, each required output field must be produced by a function whose name/description clearly matches the field’s intent. Do not map unrelated outputs simply because the types are compatible. If a required output implies a specific operation (e.g., persistence, verification, generation), you must have a function that explicitly performs that operation; otherwise decision must be false.\n', check_prompt_items={'input_schema': '--- The following is the expected input model for the future workflow, Workflow Agent could reference values from it if necessesary, given the task with format "source: input_model.output.<field_name>". \n{input_model_schema}\n---\n', 'output_schema': '--- The following is the expected output model for the future workflow, which would be included as additional workflow step named \'output_model\'. Outputs from functions selected in that workflow would be able to populate its fields, given the task with format "source: <previous_workflow_step>.output.<field_name>" or "source: input_model.output.<field_name>". \n{output_model_schema}\n---\n'}, prompts_filepath=None, available_functions=[LlmFunctionItem(func_id='a1ab73be67259e736149bd35da129a143206383d6b63749e5cbbe8ec49dbc9eb', name='get_weather', description='Get current weather for a city.', input_schema_json={'properties': {'city': {'description': 'City name.', 'title': 'City', 'type': 'string'}}, 'required': ['city'], 'title': 'GetWeatherInput', 'type': 'object'}, output_schema_json={'properties': {'forecast': {'description': 'Weather forecast for the city.', 'title': 'Forecast', 'type': 'string'}}, 'required': ['forecast'], 'title': 'GetWeatherOutput', 'type': 'object'}), LlmFunctionItem(func_id='a5f3428a9f0b010f6bfdd9c8e956600f0a627ec520ee5967942a2844909515a3', name='send_report_email', description='Sends a report email with given information points to a city.', input_schema_json={'$defs': {'EmailInformationPoint': {'properties': {'title': {'default': None, 'description': 'Few word description of the information.', 'title': 'Title', 'type': 'string'}, 'content': {'description': 'Content of the information.', 'title': 'Content', 'type': 'string'}}, 'required': ['content'], 'title': 'EmailInformationPoint', 'type': 'object'}}, 'properties': {'city': {'description': 'Name of the city where report will be send.', 'title': 'City', 'type': 'string'}, 'information': {'items': {'$ref': '#/$defs/EmailInformationPoint'}, 'title': 'Information', 'type': 'array'}}, 'required': ['city', 'information'], 'title': 'SendReportEmailInput', 'type': 'object'}, output_schema_json={'properties': {'email_sent': {'description': 'Conformation that email was send successfully.', 'title': 'Email Sent', 'type': 'boolean'}, 'message': {'default': None, 'description': 'Optional comments from the process.', 'title': 'Message', 'type': 'string'}}, 'required': ['email_sent'], 'title': 'SendReportEmailOutput', 'type': 'object'}), LlmFunctionItem(func_id='9bed51d9fc2fa9d99609fc920b83b1f60cf2c5df311b33a7292b21b3cfec6568', name='query_database', description='Get information from the database with provided filters.', input_schema_json={'properties': {'topic': {'description': 'Topic of a requested piece of information.', 'title': 'Topic', 'type': 'string'}, 'location': {'description': 'Filter for location name.', 'title': 'Location', 'type': 'string'}, 'uid': {'default': None, 'description': 'Filter for unique indentifier of the database item.', 'title': 'Uid', 'type': 'string'}}, 'required': ['topic', 'location'], 'title': 'QueryDatabaseInput', 'type': 'object'}, output_schema_json={'properties': {'info': {'description': 'Content of the information.', 'title': 'Info', 'type': 'string'}, 'uid': {'default': None, 'description': 'Unique indentifier of the database item.', 'title': 'Uid', 'type': 'string'}}, 'required': ['info'], 'title': 'QueryDatabaseOutput', 'type': 'object'}), LlmFunctionItem(func_id='97bd46f01b044bda078ac8171188e74d1e9428778f00a510b8a070b4b9110ff1', name='query_web', description='Get information from the internet for provided query.', input_schema_json={'properties': {'search_input': {'description': 'Topic to be searched on the web.', 'title': 'Search Input', 'type': 'string'}}, 'required': ['search_input'], 'title': 'QueryWebInput', 'type': 'object'}, output_schema_json={'properties': {'search_results': {'description': 'List relevant info from search results.', 'items': {'type': 'string'}, 'title': 'Search Results', 'type': 'array'}}, 'required': ['search_results'], 'title': 'QueryWebOutput', 'type': 'object'})], n_checks=7, max_retry=10, llm_h=LlmHandler(llm_h_type='ollama', llm_h_params={'connection_string': 'http://localhost:11434', 'model_name': 'gpt-oss:20b'}, llm_h_class=<class 'workflow_auto_assembler.workflow_auto_assembler.OllamaHandlerAsync'>, llm_h=OllamaHandlerAsync(connection_string='http://localhost:11434', model_name='gpt-oss:20b', model=<ollama._client.AsyncClient object at 0x762e883a0190>, kwargs={}, loggerLvl=20, logger_name=None, logger_format='%(levelname)s:%(name)s:%(message)s'), loggerLvl=20, logger_name=None, logger_format='%(levelname)s:%(name)s:%(message)s'), llm_class=<class 'workflow_auto_assembler.workflow_auto_assembler.LlmHandlerMock'>, llm_params={}, loggerLvl=20, logger_name=None, logger_format='%(levelname)s:%(name)s:%(message)s'), check_class=<class 'workflow_auto_assembler.workflow_auto_assembler.WorkflowCheck'>, check_params={}, planner_h=WorkflowPlanner(workflow_error_types=<enum 'WorkflowErrorType'>, workflow_error=<class 'workflow_auto_assembler.workflow_auto_assembler.WorkflowError'>, system_message='{purpose_description}\n{expected_output_schema}\n{function_call_description}\n', system_message_items={'purpose_description': '## Role\nYou are a Workflow Agent tasked with creating a complete workflow for a given task. Your workflow must be constructed solely from calls to the functions provided. Each workflow should be represented as a JSON list, where each element is an object representing a single function call. For any function input that is meant to be filled using the output of a previous step rather than provided directly, indicate this using the format: "source: <previous_function_name>.output.<field_name>".\n', 'expected_output_schema': '## Output Requirements\n- **Respond ONLY with valid JSON** — specifically, an **array** of objects. - **Do NOT** provide any additional commentary, explanations, or text outside this JSON array. - Each object in the array must represent **one tool call**, with **exactly** the following fields:\n 1. `"name"` (string) - the tool\'s name from the list below.\n 2. `"args"` (object) - any arguments the tool requires.\n- **Important:** If a function argument is intended to be sourced from a previous step\'s output, indicate this using the format: "source: <previous_function_name>.output.<field_name>". - **No expressions:** All argument values must be valid JSON literals (string/number/boolean/null/object/array). Do not use operators like `+` or string concatenation. If you need to include a referenced value inside a longer message, put the full message as a single JSON string (for example: "Converted value: source: convert_units.output.converted_value").\n \n### Expected Format\n[\n {\n "name": "function_name_1",\n "args": {}\n },\n ...,\n {\n "name": "function_name_n",\n "args": {"arg1": "value for arg1"}\n }\n]\n', 'function_call_description': '## Available functions\nBelow is the list of available functions that you can use to build your workflow. Each function is defined by its name, a description, and a JSON schema for its parameters. For example, the function list is as follows:\n{available_functions}\n'}, debug_prompts={'hf': '\nYour output contains functions that are not available for function calling. Pls try again, this time using only provided functions. \nNot available functions:\n{hfunctions}\nAvailable functions:\n{afunctions}\n\nDo not comment!\n', 'alt': '\nYour output contains function that have failed during function calling. Pls try again, this time contructing the workflow that uses different functions. \nFailed function:\n{ffunction}\nOther available functions:\n{afunctions}\n\nDo not comment!\n', 'mo': '\nThe following is the expected output model for the workflow, which should be included as additional workflow step named \'output_model\'. Outputs from functions selected in the workflow should be able to populate its fields, given the task with format "source: <previous_workflow_step>.output.<field_name>" or "source: input_model.output.<field_name>". \n{output_model_schema}\nYour output is missing output_model, pls include it as a final step!\n', 'om': '\nThe output_model step exists but its "args" are missing or empty. Pls include all required output_model fields and map them from previous steps or input_model.\nThe expected output model schema is: {output_model_schema}\n', 'unexpected': '\nYour planned workflow was assembled and ran using some example inputs. As a result of running your workflow, the output deviated from the expected one. Here are the differences:\n{differences}\nThe differences may include a summary line like "Unsatisfied output fields: ...", and may include case ids when multiple test cases were used. Use this info to rethink the workflow wiring.\nPlease adjust steps in your workflow that might have contributed to those differences by changing inputs to later refferenced steps or swapping functions for something else all together. Steps in the refferences are in the same order as items in your planned workflow, starting with 1. If output fields are unsatisfied, consider rewiring the output_model mappings to different existing steps or to input_model fields when appropriate. If rewiring is not enough, change functions or reorder steps. Do not repeat the exact same wiring that produced the mismatched outputs.\nDo not comment!\n'}, plan_prompt='{task_description}\n{input_schema}\n{output_schema}\n', plan_prompt_items={'input_schema': '--- The following is the expected input model for the workflow, reference values from it if necessesary, given the task with format "source: input_model.output.<field_name>". \n{input_model_schema}\n---\n', 'output_schema': '--- The following is the expected output model for the workflow, which should be included as additional workflow step named \'output_model\'. Outputs from functions selected in the workflow should be able to populate its fields, given the task with format "source: <previous_workflow_step>.output.<field_name>" or "source: input_model.output.<field_name>". \n{output_model_schema}\n---\n'}, prompts_filepath=None, available_functions=[LlmFunctionItem(func_id='a1ab73be67259e736149bd35da129a143206383d6b63749e5cbbe8ec49dbc9eb', name='get_weather', description='Get current weather for a city.', input_schema_json={'properties': {'city': {'description': 'City name.', 'title': 'City', 'type': 'string'}}, 'required': ['city'], 'title': 'GetWeatherInput', 'type': 'object'}, output_schema_json={'properties': {'forecast': {'description': 'Weather forecast for the city.', 'title': 'Forecast', 'type': 'string'}}, 'required': ['forecast'], 'title': 'GetWeatherOutput', 'type': 'object'}), LlmFunctionItem(func_id='a5f3428a9f0b010f6bfdd9c8e956600f0a627ec520ee5967942a2844909515a3', name='send_report_email', description='Sends a report email with given information points to a city.', input_schema_json={'$defs': {'EmailInformationPoint': {'properties': {'title': {'default': None, 'description': 'Few word description of the information.', 'title': 'Title', 'type': 'string'}, 'content': {'description': 'Content of the information.', 'title': 'Content', 'type': 'string'}}, 'required': ['content'], 'title': 'EmailInformationPoint', 'type': 'object'}}, 'properties': {'city': {'description': 'Name of the city where report will be send.', 'title': 'City', 'type': 'string'}, 'information': {'items': {'$ref': '#/$defs/EmailInformationPoint'}, 'title': 'Information', 'type': 'array'}}, 'required': ['city', 'information'], 'title': 'SendReportEmailInput', 'type': 'object'}, output_schema_json={'properties': {'email_sent': {'description': 'Conformation that email was send successfully.', 'title': 'Email Sent', 'type': 'boolean'}, 'message': {'default': None, 'description': 'Optional comments from the process.', 'title': 'Message', 'type': 'string'}}, 'required': ['email_sent'], 'title': 'SendReportEmailOutput', 'type': 'object'}), LlmFunctionItem(func_id='9bed51d9fc2fa9d99609fc920b83b1f60cf2c5df311b33a7292b21b3cfec6568', name='query_database', description='Get information from the database with provided filters.', input_schema_json={'properties': {'topic': {'description': 'Topic of a requested piece of information.', 'title': 'Topic', 'type': 'string'}, 'location': {'description': 'Filter for location name.', 'title': 'Location', 'type': 'string'}, 'uid': {'default': None, 'description': 'Filter for unique indentifier of the database item.', 'title': 'Uid', 'type': 'string'}}, 'required': ['topic', 'location'], 'title': 'QueryDatabaseInput', 'type': 'object'}, output_schema_json={'properties': {'info': {'description': 'Content of the information.', 'title': 'Info', 'type': 'string'}, 'uid': {'default': None, 'description': 'Unique indentifier of the database item.', 'title': 'Uid', 'type': 'string'}}, 'required': ['info'], 'title': 'QueryDatabaseOutput', 'type': 'object'}), LlmFunctionItem(func_id='97bd46f01b044bda078ac8171188e74d1e9428778f00a510b8a070b4b9110ff1', name='query_web', description='Get information from the internet for provided query.', input_schema_json={'properties': {'search_input': {'description': 'Topic to be searched on the web.', 'title': 'Search Input', 'type': 'string'}}, 'required': ['search_input'], 'title': 'QueryWebInput', 'type': 'object'}, output_schema_json={'properties': {'search_results': {'description': 'List relevant info from search results.', 'items': {'type': 'string'}, 'title': 'Search Results', 'type': 'array'}}, 'required': ['search_results'], 'title': 'QueryWebOutput', 'type': 'object'})], max_retry=10, llm_h=LlmHandler(llm_h_type='ollama', llm_h_params={'connection_string': 'http://localhost:11434', 'model_name': 'gpt-oss:20b'}, llm_h_class=<class 'workflow_auto_assembler.workflow_auto_assembler.OllamaHandlerAsync'>, llm_h=OllamaHandlerAsync(connection_string='http://localhost:11434', model_name='gpt-oss:20b', model=<ollama._client.AsyncClient object at 0x762e883a0190>, kwargs={}, loggerLvl=20, logger_name=None, logger_format='%(levelname)s:%(name)s:%(message)s'), loggerLvl=20, logger_name=None, logger_format='%(levelname)s:%(name)s:%(message)s'), llm_class=<class 'workflow_auto_assembler.workflow_auto_assembler.LlmHandlerMock'>, llm_params={}, loggerLvl=20, logger_name=None, logger_format='%(levelname)s:%(name)s:%(message)s'), planner_class=<class 'workflow_auto_assembler.workflow_auto_assembler.WorkflowPlanner'>, planner_params={}, adaptor_h=WorkflowAdaptor(workflow_error_types=<enum 'WorkflowErrorType'>, workflow_error=<class 'workflow_auto_assembler.workflow_auto_assembler.WorkflowError'>, system_message='{purpose_description}\n{generated_workflow}\n{workflow_current_state}\n{expected_output_schema}\n', system_message_items={'purpose_description': "## Role\nYou are the Adaptor Agent. Your task is to generate a mapping for the selected function's inputs from the planning agent's workflow output and the available state, which represents outputs from each step of the workflow. Do not reference the output of the same function as an input for that function. All references must point to outputs from previous steps or come from external inputs.\n", 'generated_workflow': "## Generated Workflow\nThe planning agent's workflow is:\n{raw_workflow}\n", 'workflow_current_state': '## Current State Schema\nThe current state (available outputs schema from previous functions) is:\n{workflow_current_state}\n', 'expected_output_schema': '## Output Requirements\nGenerate a valid JSON object that maps the inputs for the selected function id. For any input that should be derived from a previous step\'s output, reference the source using this format: <function_identifier>.output.<field_name>. Do not use function names as <function_identifier>, but instead use \'id\' from generated workflow. If a literal value is already valid for an input (for example, "Berlin" for the city), do not convert it to a reference. Your response must consist solely of the JSON object with no extra text, explanations, or markdown formatting. The workflow may referance the `input_model` which should be expected under `function_identifier` = 0. \nIf the selected function\'s input schema has required fields, your output must be a JSON object that includes all required fields. Do not return null for the entire args object when required fields exist. Return an object with explicit fields instead. If the input schema has no required fields, an empty object {} is acceptable. Always return a JSON object (not null, not a list). Preserve any valid literals already present in the planned workflow.\nFor instance, if the required mapping is:\n{\n "input_field_1": "id_1.output.fieldX",\n "input_field_2": "literal_value",\n "input_field_3": [\n {"subfield": "id_2.output.fieldY"}\n ]\n}\nThen your response should include exactly that JSON object and nothing else.\n'}, debug_prompts={'mapping': '\nYour output does not seem to be formated propperly, and some of the fields expect different kinds of inputs. Pls try again, this time making sure inputs are compatible with expected input schema. \nProblems with generated mapping: {mapping_errors}\n\nDo not comment!\n', 'unexpected': '\nYour planned workflow was assembled and ran using some example inputs. As a result of running your workflow, the output deviated from the expected one. Here are the differences:\n{differences}\nPlease adjust your workflow.\nDo not comment!\n'}, adapt_prompt='Function: {selected_function_name}\nExpected Input Schema: {selected_function_input_schema}\n', prompts_filepath=None, available_functions=[LlmFunctionItem(func_id='a1ab73be67259e736149bd35da129a143206383d6b63749e5cbbe8ec49dbc9eb', name='get_weather', description='Get current weather for a city.', input_schema_json={'properties': {'city': {'description': 'City name.', 'title': 'City', 'type': 'string'}}, 'required': ['city'], 'title': 'GetWeatherInput', 'type': 'object'}, output_schema_json={'properties': {'forecast': {'description': 'Weather forecast for the city.', 'title': 'Forecast', 'type': 'string'}}, 'required': ['forecast'], 'title': 'GetWeatherOutput', 'type': 'object'}), LlmFunctionItem(func_id='a5f3428a9f0b010f6bfdd9c8e956600f0a627ec520ee5967942a2844909515a3', name='send_report_email', description='Sends a report email with given information points to a city.', input_schema_json={'$defs': {'EmailInformationPoint': {'properties': {'title': {'default': None, 'description': 'Few word description of the information.', 'title': 'Title', 'type': 'string'}, 'content': {'description': 'Content of the information.', 'title': 'Content', 'type': 'string'}}, 'required': ['content'], 'title': 'EmailInformationPoint', 'type': 'object'}}, 'properties': {'city': {'description': 'Name of the city where report will be send.', 'title': 'City', 'type': 'string'}, 'information': {'items': {'$ref': '#/$defs/EmailInformationPoint'}, 'title': 'Information', 'type': 'array'}}, 'required': ['city', 'information'], 'title': 'SendReportEmailInput', 'type': 'object'}, output_schema_json={'properties': {'email_sent': {'description': 'Conformation that email was send successfully.', 'title': 'Email Sent', 'type': 'boolean'}, 'message': {'default': None, 'description': 'Optional comments from the process.', 'title': 'Message', 'type': 'string'}}, 'required': ['email_sent'], 'title': 'SendReportEmailOutput', 'type': 'object'}), LlmFunctionItem(func_id='9bed51d9fc2fa9d99609fc920b83b1f60cf2c5df311b33a7292b21b3cfec6568', name='query_database', description='Get information from the database with provided filters.', input_schema_json={'properties': {'topic': {'description': 'Topic of a requested piece of information.', 'title': 'Topic', 'type': 'string'}, 'location': {'description': 'Filter for location name.', 'title': 'Location', 'type': 'string'}, 'uid': {'default': None, 'description': 'Filter for unique indentifier of the database item.', 'title': 'Uid', 'type': 'string'}}, 'required': ['topic', 'location'], 'title': 'QueryDatabaseInput', 'type': 'object'}, output_schema_json={'properties': {'info': {'description': 'Content of the information.', 'title': 'Info', 'type': 'string'}, 'uid': {'default': None, 'description': 'Unique indentifier of the database item.', 'title': 'Uid', 'type': 'string'}}, 'required': ['info'], 'title': 'QueryDatabaseOutput', 'type': 'object'}), LlmFunctionItem(func_id='97bd46f01b044bda078ac8171188e74d1e9428778f00a510b8a070b4b9110ff1', name='query_web', description='Get information from the internet for provided query.', input_schema_json={'properties': {'search_input': {'description': 'Topic to be searched on the web.', 'title': 'Search Input', 'type': 'string'}}, 'required': ['search_input'], 'title': 'QueryWebInput', 'type': 'object'}, output_schema_json={'properties': {'search_results': {'description': 'List relevant info from search results.', 'items': {'type': 'string'}, 'title': 'Search Results', 'type': 'array'}}, 'required': ['search_results'], 'title': 'QueryWebOutput', 'type': 'object'})], llm_function_item_class=<class 'workflow_auto_assembler.workflow_auto_assembler.LlmFunctionItem'>, max_retry=10, llm_h=LlmHandler(llm_h_type='ollama', llm_h_params={'connection_string': 'http://localhost:11434', 'model_name': 'gpt-oss:20b'}, llm_h_class=<class 'workflow_auto_assembler.workflow_auto_assembler.OllamaHandlerAsync'>, llm_h=OllamaHandlerAsync(connection_string='http://localhost:11434', model_name='gpt-oss:20b', model=<ollama._client.AsyncClient object at 0x762e883a0190>, kwargs={}, loggerLvl=20, logger_name=None, logger_format='%(levelname)s:%(name)s:%(message)s'), loggerLvl=20, logger_name=None, logger_format='%(levelname)s:%(name)s:%(message)s'), llm_class=<class 'workflow_auto_assembler.workflow_auto_assembler.LlmHandlerMock'>, llm_params={}, input_collector_h=InputCollector(loggerLvl=20, logger_name=None, logger_format='%(levelname)s:%(name)s:%(message)s'), input_collector_class=<class 'workflow_auto_assembler.workflow_auto_assembler.InputCollectorMock'>, input_collector_params={}, loggerLvl=20, logger_name=None, logger_format='%(levelname)s:%(name)s:%(message)s'), adaptor_class=<class 'workflow_auto_assembler.workflow_auto_assembler.WorkflowAdaptor'>, adaptor_params={}, runner_h=WorkflowRunner(workflow_error_types=<enum 'WorkflowErrorType'>, workflow_error=<class 'workflow_auto_assembler.workflow_auto_assembler.WorkflowError'>, available_functions=[LlmFunctionItem(func_id='a1ab73be67259e736149bd35da129a143206383d6b63749e5cbbe8ec49dbc9eb', name='get_weather', description='Get current weather for a city.', input_schema_json={'properties': {'city': {'description': 'City name.', 'title': 'City', 'type': 'string'}}, 'required': ['city'], 'title': 'GetWeatherInput', 'type': 'object'}, output_schema_json={'properties': {'forecast': {'description': 'Weather forecast for the city.', 'title': 'Forecast', 'type': 'string'}}, 'required': ['forecast'], 'title': 'GetWeatherOutput', 'type': 'object'}), LlmFunctionItem(func_id='a5f3428a9f0b010f6bfdd9c8e956600f0a627ec520ee5967942a2844909515a3', name='send_report_email', description='Sends a report email with given information points to a city.', input_schema_json={'$defs': {'EmailInformationPoint': {'properties': {'title': {'default': None, 'description': 'Few word description of the information.', 'title': 'Title', 'type': 'string'}, 'content': {'description': 'Content of the information.', 'title': 'Content', 'type': 'string'}}, 'required': ['content'], 'title': 'EmailInformationPoint', 'type': 'object'}}, 'properties': {'city': {'description': 'Name of the city where report will be send.', 'title': 'City', 'type': 'string'}, 'information': {'items': {'$ref': '#/$defs/EmailInformationPoint'}, 'title': 'Information', 'type': 'array'}}, 'required': ['city', 'information'], 'title': 'SendReportEmailInput', 'type': 'object'}, output_schema_json={'properties': {'email_sent': {'description': 'Conformation that email was send successfully.', 'title': 'Email Sent', 'type': 'boolean'}, 'message': {'default': None, 'description': 'Optional comments from the process.', 'title': 'Message', 'type': 'string'}}, 'required': ['email_sent'], 'title': 'SendReportEmailOutput', 'type': 'object'}), LlmFunctionItem(func_id='9bed51d9fc2fa9d99609fc920b83b1f60cf2c5df311b33a7292b21b3cfec6568', name='query_database', description='Get information from the database with provided filters.', input_schema_json={'properties': {'topic': {'description': 'Topic of a requested piece of information.', 'title': 'Topic', 'type': 'string'}, 'location': {'description': 'Filter for location name.', 'title': 'Location', 'type': 'string'}, 'uid': {'default': None, 'description': 'Filter for unique indentifier of the database item.', 'title': 'Uid', 'type': 'string'}}, 'required': ['topic', 'location'], 'title': 'QueryDatabaseInput', 'type': 'object'}, output_schema_json={'properties': {'info': {'description': 'Content of the information.', 'title': 'Info', 'type': 'string'}, 'uid': {'default': None, 'description': 'Unique indentifier of the database item.', 'title': 'Uid', 'type': 'string'}}, 'required': ['info'], 'title': 'QueryDatabaseOutput', 'type': 'object'}), LlmFunctionItem(func_id='97bd46f01b044bda078ac8171188e74d1e9428778f00a510b8a070b4b9110ff1', name='query_web', description='Get information from the internet for provided query.', input_schema_json={'properties': {'search_input': {'description': 'Topic to be searched on the web.', 'title': 'Search Input', 'type': 'string'}}, 'required': ['search_input'], 'title': 'QueryWebInput', 'type': 'object'}, output_schema_json={'properties': {'search_results': {'description': 'List relevant info from search results.', 'items': {'type': 'string'}, 'title': 'Search Results', 'type': 'array'}}, 'required': ['search_results'], 'title': 'QueryWebOutput', 'type': 'object'})], available_callables={'a1ab73be67259e736149bd35da129a143206383d6b63749e5cbbe8ec49dbc9eb': <function get_weather at 0x762e88216f80>, 'a5f3428a9f0b010f6bfdd9c8e956600f0a627ec520ee5967942a2844909515a3': <function send_report_email at 0x762e8823c550>, '9bed51d9fc2fa9d99609fc920b83b1f60cf2c5df311b33a7292b21b3cfec6568': <function query_database at 0x762e8823c820>, '97bd46f01b044bda078ac8171188e74d1e9428778f00a510b8a070b4b9110ff1': <function query_web at 0x762e8823caf0>}, output_comparer_h=OutputComparer(ignore_optional=True, max_decimals=None, ignore_fields=set(), ignore_types=set(), loggerLvl=20, logger_name=None, logger_format='%(levelname)s:%(name)s:%(message)s'), output_comparer_class=<class 'workflow_auto_assembler.workflow_auto_assembler.OutputComparerMock'>, output_comparer_params={}, loggerLvl=20, logger_name=None, logger_format='%(levelname)s:%(name)s:%(message)s'), runner_class=<class 'workflow_auto_assembler.workflow_auto_assembler.WorkflowRunner'>, runner_params={}, storage_h=WorkflowStorage(workflow_error_types=<enum 'WorkflowErrorType'>, workflow_error=<class 'workflow_auto_assembler.workflow_auto_assembler.WorkflowError'>, model_class=<class 'workflow_auto_assembler.workflow_auto_assembler.AssembledWorkflow'>, workflow_cache={}, loggerLvl=20, logger_name=None, logger_format='%(levelname)s:%(name)s:%(message)s'), storage_class=<class 'workflow_auto_assembler.workflow_auto_assembler.WorkflowStorage'>, storage_params={}, input_collector_h=InputCollector(loggerLvl=20, logger_name=None, logger_format='%(levelname)s:%(name)s:%(message)s'), input_collector_class=<class 'workflow_auto_assembler.workflow_auto_assembler.InputCollector'>, input_collector_params={}, output_comparer_h=OutputComparer(ignore_optional=True, max_decimals=None, ignore_fields=set(), ignore_types=set(), loggerLvl=20, logger_name=None, logger_format='%(levelname)s:%(name)s:%(message)s'), output_comparer_class=<class 'workflow_auto_assembler.workflow_auto_assembler.OutputComparer'>, output_comparer_params={}, loggerLvl=20, logger_name=None, logger_format='%(levelname)s:%(name)s:%(message)s'), waa_class=<class 'workflow_auto_assembler.workflow_auto_assembler.WorkflowAutoAssembler'>, waa_params={}, loggerLvl=20, logger_name=None, logger_format='%(levelname)s:%(name)s:%(message)s')
243
+
244
+
245
+
246
+ ## Define workflow input and output schemas
247
+
248
+ The decorated function body is unused. Its signature and docstring define the target typed function contract.
249
+
250
+
251
+
252
+ ```python
253
+ class WfInputs(BaseModel):
254
+ city: str = Field(..., description="Name of the city for which weather to be extracted.")
255
+
256
+ class WfOutputs(BaseModel):
257
+ city: str = Field(..., description="Name of the city for which the report email was sent.")
258
+ email_sent: bool = Field(..., description="Confirmation that the report email was sent.")
259
+ info : str = Field(..., description="Information found in the database.")
260
+ message: str = Field(..., description="Optional comments from the email sending process.")
261
+
262
+ test_params = [
263
+ {
264
+ "inputs": WfInputs(city = "London"),
265
+ "outputs": WfOutputs(
266
+ city = "London",
267
+ info = "Content extracted from the database for Birds in London is ...",
268
+ email_sent = True,
269
+ message = "Email sent to London!"
270
+ )
271
+ },
272
+ {
273
+ "inputs": WfInputs(city = "Sydney"),
274
+ "outputs": WfOutputs(
275
+ city = "Sydney",
276
+ info = "Content extracted from the database for Birds in Sydney is ...",
277
+ email_sent = False,
278
+ message = "Email was not sent to Sydney!"
279
+ )
280
+ }
281
+ ]
282
+
283
+ @llm_function(runtime=llm_runtime, test_params = test_params)
284
+ def query_db_and_send_email(input: WfInputs) -> WfOutputs:
285
+ """
286
+ Query database to find information on birds and get latest weather for the city, then send an email there.
287
+ """
288
+ pass
289
+
290
+ ```
291
+
292
+ ## Call the generated typed function
293
+
294
+ On each call, the decorator reuses the shared `LlmFunctionRuntime`, calls `actualize_workflow(...)`, and returns the typed output.
295
+
296
+
297
+
298
+ ```python
299
+ result = query_db_and_send_email(WfInputs(city="London"))
300
+ result
301
+ ```
302
+
303
+
304
+
305
+
306
+ WfOutputs(city='London', email_sent=True, info='Content extracted from the database for Birds in London is ...', message='Email sent to London!')
307
+
308
+
309
+
310
+
311
+ ```python
312
+ result = query_db_and_send_email(WfInputs(city="Wrocław"))
313
+ result
314
+
315
+ ```
316
+
317
+
318
+
319
+
320
+ WfOutputs(city='Wrocław', email_sent=False, info='Content extracted from the database for Birds in Wrocław is ...', message='Email was not sent to Wrocław!')
321
+
322
+
323
+
324
+ If planning is not possible or failed along the way, a function suppose to return `LlmFunctionError` error.
325
+
326
+
327
+ ```python
328
+ class WfInputs(BaseModel):
329
+ city: str = Field(..., description="Name of the city.")
330
+
331
+
332
+ class WfOutputs(BaseModel):
333
+ city: str = Field(..., description="Name of the city.")
334
+ summary: str = Field(..., description="Some summary that is not about forcasting.")
335
+
336
+
337
+ @llm_function(config=llm_config)
338
+ def impossible_get_city_weather(input: WfInputs) -> WfOutputs:
339
+ """
340
+ Get weather for the provided city and prepare a short user-facing non forcast summary.
341
+ """
342
+ pass
343
+
344
+ result = impossible_get_city_weather(WfInputs(city="Wrocław"))
345
+ result
346
+
347
+ ```
348
+
349
+ WARNING:WorkflowAutoAssembler:Workflow planning is not possible!
350
+ WARNING:WorkflowAutoAssembler:Workflow failed to converge.
351
+
352
+
353
+
354
+ ---------------------------------------------------------------------------
355
+
356
+ LlmFunctionError Traceback (most recent call last)
357
+
358
+ Cell In[9], line 17
359
+ 12 """
360
+ 13 Get weather for the provided city and prepare a short user-facing non forcast summary.
361
+ 14 """
362
+ 15 pass
363
+ ---> 17 result = impossible_get_city_weather(WfInputs(city="Wrocław"))
364
+ 18 result
365
+
366
+
367
+ File ~/miniforge3/envs/testenv/lib/python3.10/site-packages/llm_function/llm_function.py:596, in LlmFunction.as_decorator.<locals>.decorator.<locals>.sync_wrapper(*args, **kwargs)
368
+ 593 @wraps(func)
369
+ 594 def sync_wrapper(*args, **kwargs):
370
+ 595 bound = signature.bind(*args, **kwargs)
371
+ --> 596 return self._run_coro_blocking(_invoke_async(bound.arguments[input_name]))
372
+
373
+
374
+ File ~/miniforge3/envs/testenv/lib/python3.10/site-packages/llm_function/llm_function.py:509, in LlmFunction._run_coro_blocking(self, coro)
375
+ 507 if "value" in error:
376
+ 508 if isinstance(error["value"], LlmFunctionError):
377
+ --> 509 raise LlmFunctionError(error["value"].workflow_error) from None
378
+ 510 raise error["value"]
379
+ 512 return result["value"]
380
+
381
+
382
+ LlmFunctionError: The only provided function that obtains weather data is get_weather, which returns a forecast string. There is no function available that can transform this forecast into a short user-facing non‑forecast summary as required by the output schema. Therefore the task cannot be completed with the given tools.
383
+
@@ -0,0 +1,65 @@
1
+ # Errors
2
+
3
+ `llm_function` raises `LlmFunctionError` when [`workflow_auto_assembler`](https://pypi.org/project/workflow-auto-assembler/) returns a workflow error.
4
+
5
+ This keeps the typed function contract clean:
6
+
7
+ - successful calls return the declared output model
8
+ - failed calls raise
9
+
10
+ ## Underlying Workflow Error
11
+
12
+ The original workflow error is available on:
13
+
14
+ - `exc.workflow_error`
15
+
16
+ This makes it possible to:
17
+
18
+ - catch one stable exception type at the `llm_function` layer
19
+ - still inspect the underlying workflow failure details
20
+
21
+
22
+ ## Example
23
+
24
+ Example raised error:
25
+
26
+ ```python
27
+ ---------------------------------------------------------------------------
28
+ LlmFunctionError Traceback (most recent call last)
29
+ Cell In[9], line 17
30
+ 12 """
31
+ 13 Get weather for the provided city and prepare a short user-facing non forcast summary.
32
+ 14 """
33
+ 15 pass
34
+ ---> 17 result = impossible_get_city_weather(WfInputs(city="Wrocław"))
35
+ 18 result
36
+
37
+ File ~/miniforge3/envs/testenv/lib/python3.10/site-packages/llm_function/llm_function.py:596, in LlmFunction.as_decorator.<locals>.decorator.<locals>.sync_wrapper(*args, **kwargs)
38
+ 593 @wraps(func)
39
+ 594 def sync_wrapper(*args, **kwargs):
40
+ 595 bound = signature.bind(*args, **kwargs)
41
+ --> 596 return self._run_coro_blocking(_invoke_async(bound.arguments[input_name]))
42
+
43
+ File ~/miniforge3/envs/testenv/lib/python3.10/site-packages/llm_function/llm_function.py:509, in LlmFunction._run_coro_blocking(self, coro)
44
+ 507 if "value" in error:
45
+ 508 if isinstance(error["value"], LlmFunctionError):
46
+ --> 509 raise LlmFunctionError(error["value"].workflow_error) from None
47
+ 510 raise error["value"]
48
+ 512 return result["value"]
49
+
50
+ LlmFunctionError: The required output field "summary" must contain a non‑forecast description of the weather, and no available function explicitly performs weather summarization or non‑forecast content generation. The only tool that provides weather information is get_weather, which returns a forecast string, not a separate summary. Since there is no function that can transform or produce a non‑forecast summary from the inputs, the task cannot be constructed with the provided tools.
51
+ ```
52
+
53
+ Example underlying workflow error:
54
+
55
+ ```python
56
+ {
57
+ "error_message": "The available functions only allow retrieving weather information and sending an email. There is no function that can query the database to obtain bird information, so the required 'info' field in the output schema cannot be produced.",
58
+ "error_type": None,
59
+ "additional_info": {
60
+ "stage": "init_check",
61
+ "workflow_possible": False,
62
+ "justification": "The available functions only allow retrieving weather information and sending an email. There is no function that can query the database to obtain bird information, so the required 'info' field in the output schema cannot be produced."
63
+ }
64
+ }
65
+ ```
@@ -0,0 +1,81 @@
1
+ # Runtime
2
+
3
+ `LlmFunctionRuntime` is the reusable runtime object for `llm_function`.
4
+
5
+ It exists so multiple decorated functions or repeated calls can reuse the same initialized runtime state.
6
+
7
+ ## What Runtime Reuses
8
+
9
+ In the current implementation, runtime is responsible for:
10
+
11
+ - resolving tools once
12
+ - initializing a shared [`workflow_auto_assembler`](https://pypi.org/project/workflow-auto-assembler/) instance once
13
+ - reusing that initialized instance across calls
14
+
15
+ ## Why Runtime Exists
16
+
17
+ Without a shared runtime, each decorated call has to build runtime state again.
18
+
19
+ With `LlmFunctionRuntime`, repeated calls can reuse:
20
+
21
+ - the same resolved toolset
22
+ - the same in-memory workflow cache held by WAA
23
+
24
+ This is especially useful when:
25
+
26
+ - multiple LLM-backed functions share the same tools
27
+ - one process makes repeated calls for similar tasks
28
+
29
+ ## Relationship To Config
30
+
31
+ `LlmRuntimeConfig` is configuration data.
32
+
33
+ `LlmFunctionRuntime` is the initialized execution object built from configuration and tool sources.
34
+
35
+ That means:
36
+
37
+ - config describes runtime settings
38
+ - runtime holds shared initialized state
39
+
40
+ ## Example
41
+
42
+ ```python
43
+ from llm_function import (
44
+ InMemoryToolSource,
45
+ LlmFunctionConfig,
46
+ LlmFunctionRuntime,
47
+ LlmRuntimeConfig,
48
+ llm_function,
49
+ )
50
+
51
+ tool_sources = [
52
+ InMemoryToolSource([get_weather, send_report_email]),
53
+ ]
54
+
55
+ runtime_config = LlmRuntimeConfig(
56
+ llm_handler_params={
57
+ "llm_h_type": "ollama",
58
+ "llm_h_params": {
59
+ "connection_string": "http://localhost:11434",
60
+ "model_name": "gpt-oss:20b",
61
+ },
62
+ },
63
+ storage_path="/tmp",
64
+ )
65
+
66
+ llm_config = LlmFunctionConfig(
67
+ runtime=runtime_config,
68
+ tool_sources=tool_sources,
69
+ )
70
+
71
+ llm_runtime = LlmFunctionRuntime(config=llm_config)
72
+
73
+
74
+ @llm_function(runtime=llm_runtime)
75
+ def get_city_weather(input: WfInputs) -> WfOutputs:
76
+ """
77
+ Get weather for the provided city and prepare a short summary.
78
+ """
79
+ ```
80
+
81
+ In this setup, repeated calls reuse the same initialized runtime instead of constructing a new `WorkflowAutoAssembler` for every function call.