symbolicai 0.21.0__tar.gz → 1.0.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 (285) hide show
  1. {symbolicai-0.21.0 → symbolicai-1.0.0}/.gitignore +0 -4
  2. symbolicai-1.0.0/MANIFEST.in +3 -0
  3. {symbolicai-0.21.0 → symbolicai-1.0.0}/PKG-INFO +4 -2
  4. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/FEATURES/contracts.md +29 -18
  5. {symbolicai-0.21.0 → symbolicai-1.0.0}/examples/contracts.ipynb +2 -2
  6. {symbolicai-0.21.0 → symbolicai-1.0.0}/icon_converter.py +1 -0
  7. {symbolicai-0.21.0 → symbolicai-1.0.0}/installer.py +4 -3
  8. {symbolicai-0.21.0 → symbolicai-1.0.0}/legacy/notebooks/Basics.ipynb +6 -3
  9. {symbolicai-0.21.0 → symbolicai-1.0.0}/legacy/notebooks/ChatBot.ipynb +4 -2
  10. {symbolicai-0.21.0 → symbolicai-1.0.0}/legacy/notebooks/Indexer.ipynb +8 -3
  11. {symbolicai-0.21.0 → symbolicai-1.0.0}/legacy/notebooks/News.ipynb +5 -3
  12. {symbolicai-0.21.0 → symbolicai-1.0.0}/legacy/notebooks/Queries.ipynb +5 -2
  13. {symbolicai-0.21.0 → symbolicai-1.0.0}/legacy/notebooks/TTS_Persona.ipynb +4 -4
  14. {symbolicai-0.21.0 → symbolicai-1.0.0}/legacy/notebooks/examples/lean.py +1 -0
  15. {symbolicai-0.21.0 → symbolicai-1.0.0}/legacy/notebooks/examples/news.py +0 -1
  16. {symbolicai-0.21.0 → symbolicai-1.0.0}/legacy/notebooks/examples/paper.py +0 -1
  17. {symbolicai-0.21.0 → symbolicai-1.0.0}/legacy/notebooks/examples/sql.py +1 -2
  18. {symbolicai-0.21.0 → symbolicai-1.0.0}/pyproject.toml +3 -2
  19. symbolicai-1.0.0/ruff.toml +68 -0
  20. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/__init__.py +96 -64
  21. symbolicai-1.0.0/symai/backend/base.py +208 -0
  22. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/drawing/engine_bfl.py +12 -11
  23. symbolicai-1.0.0/symai/backend/engines/drawing/engine_gpt_image.py +223 -0
  24. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/embedding/engine_llama_cpp.py +20 -24
  25. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/embedding/engine_openai.py +3 -5
  26. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/execute/engine_python.py +6 -5
  27. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/files/engine_io.py +74 -67
  28. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/imagecaptioning/engine_blip2.py +3 -3
  29. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/imagecaptioning/engine_llavacpp_client.py +54 -38
  30. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/index/engine_pinecone.py +23 -24
  31. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/index/engine_vectordb.py +16 -14
  32. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/lean/engine_lean4.py +38 -34
  33. symbolicai-1.0.0/symai/backend/engines/neurosymbolic/__init__.py +52 -0
  34. symbolicai-1.0.0/symai/backend/engines/neurosymbolic/engine_anthropic_claudeX_chat.py +497 -0
  35. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/neurosymbolic/engine_anthropic_claudeX_reasoning.py +263 -191
  36. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/neurosymbolic/engine_deepseekX_reasoning.py +53 -49
  37. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/neurosymbolic/engine_google_geminiX_reasoning.py +212 -211
  38. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/neurosymbolic/engine_groq.py +87 -63
  39. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/neurosymbolic/engine_huggingface.py +21 -24
  40. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/neurosymbolic/engine_llama_cpp.py +44 -46
  41. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/neurosymbolic/engine_openai_gptX_chat.py +256 -229
  42. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/neurosymbolic/engine_openai_gptX_reasoning.py +270 -150
  43. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/ocr/engine_apilayer.py +6 -8
  44. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/output/engine_stdout.py +1 -4
  45. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/search/engine_openai.py +7 -7
  46. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/search/engine_perplexity.py +5 -5
  47. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/search/engine_serpapi.py +12 -14
  48. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/speech_to_text/engine_local_whisper.py +20 -27
  49. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/symbolic/engine_wolframalpha.py +3 -3
  50. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/text_to_speech/engine_openai.py +5 -7
  51. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/text_vision/engine_clip.py +7 -11
  52. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/userinput/engine_console.py +3 -3
  53. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/webscraping/engine_requests.py +81 -48
  54. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/mixin/__init__.py +13 -0
  55. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/mixin/anthropic.py +4 -2
  56. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/mixin/deepseek.py +2 -0
  57. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/mixin/google.py +2 -0
  58. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/mixin/openai.py +11 -3
  59. symbolicai-1.0.0/symai/backend/settings.py +146 -0
  60. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/chat.py +101 -78
  61. symbolicai-1.0.0/symai/collect/__init__.py +8 -0
  62. symbolicai-1.0.0/symai/collect/dynamic.py +115 -0
  63. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/collect/pipeline.py +35 -27
  64. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/collect/stats.py +75 -63
  65. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/components.py +198 -169
  66. symbolicai-1.0.0/symai/constraints.py +41 -0
  67. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/core.py +698 -359
  68. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/core_ext.py +32 -34
  69. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/endpoints/api.py +80 -73
  70. symbolicai-1.0.0/symai/extended/.DS_Store +0 -0
  71. symbolicai-1.0.0/symai/extended/__init__.py +50 -0
  72. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/api_builder.py +11 -8
  73. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/arxiv_pdf_parser.py +13 -12
  74. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/bibtex_parser.py +2 -3
  75. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/conversation.py +101 -90
  76. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/document.py +17 -10
  77. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/file_merger.py +18 -13
  78. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/graph.py +18 -13
  79. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/html_style_template.py +2 -4
  80. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/interfaces/blip_2.py +1 -2
  81. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/interfaces/clip.py +1 -2
  82. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/interfaces/console.py +7 -1
  83. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/interfaces/flux.py +1 -1
  84. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/interfaces/gpt_image.py +1 -1
  85. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/interfaces/input.py +1 -1
  86. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/interfaces/llava.py +0 -1
  87. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/interfaces/naive_vectordb.py +7 -8
  88. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/interfaces/naive_webscraping.py +1 -1
  89. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/interfaces/pinecone.py +6 -5
  90. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/interfaces/terminal.py +2 -3
  91. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/interfaces/tts.py +1 -1
  92. symbolicai-1.0.0/symai/extended/metrics/__init__.py +11 -0
  93. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/metrics/similarity.py +11 -13
  94. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/os_command.py +17 -16
  95. symbolicai-1.0.0/symai/extended/packages/__init__.py +29 -0
  96. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/packages/symdev.py +19 -16
  97. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/packages/sympkg.py +12 -9
  98. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/packages/symrun.py +21 -19
  99. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/repo_cloner.py +11 -10
  100. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/seo_query_optimizer.py +1 -2
  101. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/solver.py +20 -23
  102. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/summarizer.py +4 -3
  103. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/taypan_interpreter.py +10 -12
  104. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/vectordb.py +99 -82
  105. symbolicai-1.0.0/symai/formatter/__init__.py +10 -0
  106. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/formatter/formatter.py +12 -16
  107. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/formatter/regex.py +62 -63
  108. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/functional.py +173 -122
  109. symbolicai-1.0.0/symai/imports.py +363 -0
  110. symbolicai-1.0.0/symai/interfaces.py +101 -0
  111. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/memory.py +14 -13
  112. symbolicai-1.0.0/symai/misc/console.py +96 -0
  113. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/misc/loader.py +5 -3
  114. symbolicai-1.0.0/symai/models/__init__.py +18 -0
  115. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/models/base.py +269 -181
  116. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/models/errors.py +0 -1
  117. symbolicai-1.0.0/symai/ops/__init__.py +35 -0
  118. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/ops/measures.py +11 -15
  119. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/ops/primitives.py +348 -228
  120. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/post_processors.py +32 -28
  121. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/pre_processors.py +39 -41
  122. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/processor.py +6 -4
  123. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/prompts.py +59 -45
  124. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/server/huggingface_server.py +23 -20
  125. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/server/llama_cpp_server.py +7 -5
  126. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/shell.py +3 -4
  127. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/shellsv.py +499 -375
  128. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/strategy.py +517 -287
  129. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/symbol.py +111 -116
  130. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/utils.py +42 -36
  131. {symbolicai-0.21.0 → symbolicai-1.0.0}/symbolicai.egg-info/PKG-INFO +4 -2
  132. {symbolicai-0.21.0 → symbolicai-1.0.0}/symbolicai.egg-info/SOURCES.txt +2 -14
  133. {symbolicai-0.21.0 → symbolicai-1.0.0}/symbolicai.egg-info/requires.txt +3 -1
  134. {symbolicai-0.21.0 → symbolicai-1.0.0}/tests/engines/search/perplexity_engine.py +0 -1
  135. {symbolicai-0.21.0 → symbolicai-1.0.0}/uv.lock +91 -59
  136. symbolicai-0.21.0/MANIFEST.in +0 -4
  137. symbolicai-0.21.0/symai/backend/base.py +0 -195
  138. symbolicai-0.21.0/symai/backend/driver/webclient.py +0 -217
  139. symbolicai-0.21.0/symai/backend/engines/drawing/engine_gpt_image.py +0 -202
  140. symbolicai-0.21.0/symai/backend/engines/embedding/engine_plugin_embeddings.py +0 -12
  141. symbolicai-0.21.0/symai/backend/engines/neurosymbolic/__init__.py +0 -24
  142. symbolicai-0.21.0/symai/backend/engines/neurosymbolic/engine_anthropic_claudeX_chat.py +0 -417
  143. symbolicai-0.21.0/symai/backend/settings.py +0 -79
  144. symbolicai-0.21.0/symai/collect/__init__.py +0 -2
  145. symbolicai-0.21.0/symai/collect/dynamic.py +0 -107
  146. symbolicai-0.21.0/symai/constraints.py +0 -38
  147. symbolicai-0.21.0/symai/extended/__init__.py +0 -16
  148. symbolicai-0.21.0/symai/extended/metrics/__init__.py +0 -1
  149. symbolicai-0.21.0/symai/extended/packages/__init__.py +0 -3
  150. symbolicai-0.21.0/symai/extended/personas/__init__.py +0 -3
  151. symbolicai-0.21.0/symai/extended/personas/builder.py +0 -105
  152. symbolicai-0.21.0/symai/extended/personas/dialogue.py +0 -126
  153. symbolicai-0.21.0/symai/extended/personas/persona.py +0 -154
  154. symbolicai-0.21.0/symai/extended/personas/research/__init__.py +0 -1
  155. symbolicai-0.21.0/symai/extended/personas/research/yann_lecun.py +0 -62
  156. symbolicai-0.21.0/symai/extended/personas/sales/__init__.py +0 -1
  157. symbolicai-0.21.0/symai/extended/personas/sales/erik_james.py +0 -62
  158. symbolicai-0.21.0/symai/extended/personas/student/__init__.py +0 -1
  159. symbolicai-0.21.0/symai/extended/personas/student/max_tenner.py +0 -51
  160. symbolicai-0.21.0/symai/extended/strategies/__init__.py +0 -1
  161. symbolicai-0.21.0/symai/extended/strategies/cot.py +0 -40
  162. symbolicai-0.21.0/symai/formatter/__init__.py +0 -2
  163. symbolicai-0.21.0/symai/imports.py +0 -354
  164. symbolicai-0.21.0/symai/interfaces.py +0 -72
  165. symbolicai-0.21.0/symai/misc/console.py +0 -86
  166. symbolicai-0.21.0/symai/models/__init__.py +0 -2
  167. symbolicai-0.21.0/symai/ops/__init__.py +0 -25
  168. {symbolicai-0.21.0 → symbolicai-1.0.0}/.gitbook.yaml +0 -0
  169. {symbolicai-0.21.0 → symbolicai-1.0.0}/.github/FUNDING.yml +0 -0
  170. {symbolicai-0.21.0 → symbolicai-1.0.0}/.symai/symsh.config.json +0 -0
  171. {symbolicai-0.21.0 → symbolicai-1.0.0}/CITATION.cff +0 -0
  172. {symbolicai-0.21.0 → symbolicai-1.0.0}/Dockerfile +0 -0
  173. {symbolicai-0.21.0 → symbolicai-1.0.0}/LICENSE +0 -0
  174. {symbolicai-0.21.0 → symbolicai-1.0.0}/README.md +0 -0
  175. {symbolicai-0.21.0 → symbolicai-1.0.0}/app.py +0 -0
  176. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/images/banner.png +0 -0
  177. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/images/cat.jpg +0 -0
  178. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/images/cat.png +0 -0
  179. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/images/contract_flow.png +0 -0
  180. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/images/img1.png +0 -0
  181. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/images/img10.png +0 -0
  182. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/images/img2.png +0 -0
  183. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/images/img3.png +0 -0
  184. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/images/img4.png +0 -0
  185. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/images/img5.png +0 -0
  186. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/images/img6.png +0 -0
  187. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/images/img7.png +0 -0
  188. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/images/img8.png +0 -0
  189. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/images/img9.png +0 -0
  190. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/images/preview.gif +0 -0
  191. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/images/screen1.jpeg +0 -0
  192. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/images/symai_logo.png +0 -0
  193. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/images/symsh.png +0 -0
  194. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/images/vid1.png +0 -0
  195. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/images/vid2.png +0 -0
  196. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/images/vid3.png +0 -0
  197. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/images/vid4.png +0 -0
  198. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/images/vid5.png +0 -0
  199. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/images/vid6.png +0 -0
  200. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/results/news.html +0 -0
  201. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/results/news.png +0 -0
  202. {symbolicai-0.21.0 → symbolicai-1.0.0}/assets/results/news_prev.png +0 -0
  203. {symbolicai-0.21.0 → symbolicai-1.0.0}/bin/install.ps1 +0 -0
  204. {symbolicai-0.21.0 → symbolicai-1.0.0}/bin/install.sh +0 -0
  205. {symbolicai-0.21.0 → symbolicai-1.0.0}/build.py +0 -0
  206. {symbolicai-0.21.0 → symbolicai-1.0.0}/docker-compose.yml +0 -0
  207. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/ENGINES/clip_engine.md +0 -0
  208. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/ENGINES/custom_engine.md +0 -0
  209. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/ENGINES/drawing_engine.md +0 -0
  210. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/ENGINES/file_engine.md +0 -0
  211. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/ENGINES/indexing_engine.md +0 -0
  212. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/ENGINES/local_engine.md +0 -0
  213. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/ENGINES/neurosymbolic_engine.md +0 -0
  214. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/ENGINES/ocr_engine.md +0 -0
  215. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/ENGINES/search_engine.md +0 -0
  216. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/ENGINES/speech_to_text_engine.md +0 -0
  217. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/ENGINES/symbolic_engine.md +0 -0
  218. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/ENGINES/webscraping_engine.md +0 -0
  219. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/FEATURES/error_handling.md +0 -0
  220. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/FEATURES/expressions.md +0 -0
  221. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/FEATURES/import.md +0 -0
  222. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/FEATURES/operations.md +0 -0
  223. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/FEATURES/primitives.md +0 -0
  224. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/INSTALLATION.md +0 -0
  225. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/INTRODUCTION.md +0 -0
  226. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/QUICKSTART.md +0 -0
  227. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/SUMMARY.md +0 -0
  228. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/TOOLS/chatbot.md +0 -0
  229. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/TOOLS/packages.md +0 -0
  230. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/TOOLS/shell.md +0 -0
  231. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/TUTORIALS/chatbot.md +0 -0
  232. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/TUTORIALS/context.md +0 -0
  233. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/TUTORIALS/data_query.md +0 -0
  234. {symbolicai-0.21.0 → symbolicai-1.0.0}/docs/source/TUTORIALS/video_tutorials.md +0 -0
  235. {symbolicai-0.21.0 → symbolicai-1.0.0}/environment.yml +0 -0
  236. {symbolicai-0.21.0 → symbolicai-1.0.0}/examples/primitives.ipynb +2 -2
  237. {symbolicai-0.21.0 → symbolicai-1.0.0}/legacy/notebooks/Conversation.ipynb +0 -0
  238. {symbolicai-0.21.0 → symbolicai-1.0.0}/legacy/notebooks/examples/Lean engine.png +0 -0
  239. {symbolicai-0.21.0 → symbolicai-1.0.0}/legacy/notebooks/examples/a_star.txt +0 -0
  240. {symbolicai-0.21.0 → symbolicai-1.0.0}/legacy/notebooks/examples/abstract.py +0 -0
  241. {symbolicai-0.21.0 → symbolicai-1.0.0}/legacy/notebooks/examples/audio.mp3 +0 -0
  242. {symbolicai-0.21.0 → symbolicai-1.0.0}/legacy/notebooks/examples/dbpedia_samples.jsonl +0 -0
  243. {symbolicai-0.21.0 → symbolicai-1.0.0}/legacy/notebooks/examples/dbpedia_samples_prepared_train.jsonl +0 -0
  244. {symbolicai-0.21.0 → symbolicai-1.0.0}/legacy/notebooks/examples/dbpedia_samples_prepared_valid.jsonl +0 -0
  245. {symbolicai-0.21.0 → symbolicai-1.0.0}/legacy/notebooks/examples/demo.py +0 -0
  246. {symbolicai-0.21.0 → symbolicai-1.0.0}/legacy/notebooks/examples/demo_strategy.py +0 -0
  247. {symbolicai-0.21.0 → symbolicai-1.0.0}/legacy/notebooks/examples/docs.py +0 -0
  248. {symbolicai-0.21.0 → symbolicai-1.0.0}/legacy/notebooks/examples/einsteins_puzzle.txt +0 -0
  249. {symbolicai-0.21.0 → symbolicai-1.0.0}/legacy/notebooks/examples/file.json +0 -0
  250. {symbolicai-0.21.0 → symbolicai-1.0.0}/legacy/notebooks/examples/paper.pdf +0 -0
  251. {symbolicai-0.21.0 → symbolicai-1.0.0}/public/eai.svg +0 -0
  252. {symbolicai-0.21.0 → symbolicai-1.0.0}/pytest.ini +0 -0
  253. {symbolicai-0.21.0 → symbolicai-1.0.0}/setup.cfg +0 -0
  254. {symbolicai-0.21.0 → symbolicai-1.0.0}/setup.py +0 -0
  255. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/TERMS_OF_SERVICE.md +0 -0
  256. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/__init__.py +0 -0
  257. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/engines/__init__.py +0 -0
  258. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/backend/mixin/groq.py +0 -0
  259. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/context.py +0 -0
  260. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/endpoints/__init__py +0 -0
  261. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/exceptions.py +0 -0
  262. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/interfaces/__init__.py +0 -0
  263. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/interfaces/dall_e.py +1 -1
  264. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/interfaces/file.py +0 -0
  265. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/interfaces/ocr.py +1 -1
  266. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/interfaces/openai_search.py +0 -0
  267. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/interfaces/perplexity.py +0 -0
  268. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/interfaces/python.py +0 -0
  269. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/interfaces/serpapi.py +1 -1
  270. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/interfaces/whisper.py +1 -1
  271. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/extended/interfaces/wolframalpha.py +1 -1
  272. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/formatter/emoji.pytxt +0 -0
  273. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/menu/__init__.py +0 -0
  274. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/menu/screen.py +0 -0
  275. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/misc/__init__.py +0 -0
  276. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/server/__init__.py +0 -0
  277. {symbolicai-0.21.0 → symbolicai-1.0.0}/symai/symsh.md +0 -0
  278. {symbolicai-0.21.0 → symbolicai-1.0.0}/symbolicai.egg-info/dependency_links.txt +0 -0
  279. {symbolicai-0.21.0 → symbolicai-1.0.0}/symbolicai.egg-info/entry_points.txt +0 -0
  280. {symbolicai-0.21.0 → symbolicai-1.0.0}/symbolicai.egg-info/top_level.txt +0 -0
  281. {symbolicai-0.21.0 → symbolicai-1.0.0}/tests/README.md +0 -0
  282. {symbolicai-0.21.0 → symbolicai-1.0.0}/tests/data/audio.mp3 +0 -0
  283. {symbolicai-0.21.0 → symbolicai-1.0.0}/tests/data/pg1727.txt +0 -0
  284. {symbolicai-0.21.0 → symbolicai-1.0.0}/tests/engines/search/openai_engine.py +0 -0
  285. {symbolicai-0.21.0 → symbolicai-1.0.0}/trusted_repos.yml +0 -0
@@ -162,7 +162,3 @@ symsh
162
162
  .bash_history
163
163
  .conversation_state
164
164
  .symai
165
- zagent-review
166
- zagent-research
167
- .codex/context
168
- llama.cpp
@@ -0,0 +1,3 @@
1
+ global-exclude test_*.py
2
+ include symai/**/*
3
+ exclude **/*.pyc
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: symbolicai
3
- Version: 0.21.0
3
+ Version: 1.0.0
4
4
  Summary: A Neurosymbolic Perspective on Large Language Models
5
5
  Author-email: Marius-Constantin Dinu <marius@extensity.ai>, Leoveanu-Condrei Claudiu <leo@extensity.ai>
6
6
  License: BSD 3-Clause License
@@ -84,6 +84,7 @@ Requires-Dist: httpx>=0.27.2
84
84
  Requires-Dist: nest-asyncio>=1.6.0
85
85
  Requires-Dist: rich>=13.9.4
86
86
  Requires-Dist: playwright>=1.55.0
87
+ Requires-Dist: llvmlite>=0.45.1
87
88
  Provides-Extra: bitsandbytes
88
89
  Requires-Dist: bitsandbytes>=0.43.1; extra == "bitsandbytes"
89
90
  Provides-Extra: blip2
@@ -107,7 +108,8 @@ Provides-Extra: wolframalpha
107
108
  Requires-Dist: wolframalpha>=5.0.0; extra == "wolframalpha"
108
109
  Provides-Extra: whisper
109
110
  Requires-Dist: openai-whisper>=20240930; extra == "whisper"
110
- Requires-Dist: numba>=0.60.0; extra == "whisper"
111
+ Requires-Dist: numba>=0.62.1; extra == "whisper"
112
+ Requires-Dist: llvmlite>=0.45.1; extra == "whisper"
111
113
  Provides-Extra: serpapi
112
114
  Requires-Dist: google_search_results>=2.4.2; extra == "serpapi"
113
115
  Provides-Extra: services
@@ -157,10 +157,10 @@ This method defines the pre-conditions for your contract. It's called with the v
157
157
 
158
158
  The `act` method provides an optional intermediate processing step that occurs *after* input pre-validation (and potential pre-remedy) and *before* the main output validation/generation phase (`_validate_output`).
159
159
 
160
- * **Signature**: `def act(self, input: YourInputModelOrActInputModel, **kwargs) -> YourIntermediateModel:`
161
- * The `input` parameter **must be named `input`** and be type-hinted with an `LLMDataModel` subclass.
162
- * It must have a return type annotation, also an `LLMDataModel` subclass. This can be a different type than the input, allowing `act` to transform the data.
163
- * `**kwargs` from the original call (excluding `'input'`) are passed to `act`.
160
+ * **Signature**: `def act(self, act_input: YourInputModelOrActInputModel, **kwargs) -> YourIntermediateModel:`
161
+ * The decorator treats the **first positional or positional-or-keyword parameter after `self`** as the contract input. You can keep naming it `input` for clarity, but any valid identifier works.
162
+ * That parameter must be type-hinted with an `LLMDataModel` subclass (or a Python type that can be wrapped dynamically). The method must also declare a return type annotation so the contract knows which `LLMDataModel` to build next.
163
+ * `**kwargs` from the original callexcluding the canonical input argument—are passed through to `act`.
164
164
  * **Behavior**:
165
165
  * Perform transformations on the `input`, computations, or state updates on `self`.
166
166
  * The object returned by `act` becomes the `current_input` for the `_validate_output` stage (where the LLM is typically called to generate the final output type).
@@ -205,10 +205,11 @@ This method defines the post-conditions. It's called by `_validate_output` with
205
205
 
206
206
  This is your class's original `forward` method, containing the primary logic. The `@contract` decorator wraps this method.
207
207
 
208
- * **Signature**: `def forward(self, input: YourInputModel, **kwargs) -> YourOutputModel:`
209
- * The `input` parameter **must be named `input`** and be type-hinted with an `LLMDataModel` subclass that matches (or is compatible with) the input to `pre` and `act`.
210
- * It **must have a return type annotation** (e.g., `-> YourOutputModel`), which must be an `LLMDataModel` subclass. This declared type is crucial for the contract's type validation and output generation phases.
211
- * It **must not use positional arguments (`*args`)**; only keyword arguments are supported for the main input. Other `**kwargs` are passed through to the neurosymbolic engine.
208
+ * **Signature**: `def forward(self, model_input: YourInputModel, **kwargs) -> YourOutputModel:`
209
+ * The decorator binds the **first positional or positional-or-keyword parameter after `self`** as the canonical contract input. Naming the parameter `input` is still idiomatic, but any identifier works.
210
+ * That parameter must be type-hinted with an `LLMDataModel` subclass (or a Python type that the decorator can wrap dynamically) compatible with your `pre`/`act` expectations.
211
+ * The method **must have a return type annotation** (e.g., `-> YourOutputModel`), which must be an `LLMDataModel` subclass. This declared type is crucial for the contract's type validation and output generation phases.
212
+ * Calls may use positional or keyword arguments interchangeably; any remaining `**kwargs` are forwarded unchanged to your logic and downstream engines.
212
213
  * **Behavior**:
213
214
  * This method is **always called** by the contract's `wrapped_forward` (in its `finally` block), regardless of whether the preceding contract validations (`pre`, `act`, `post`, remedies) succeeded or failed.
214
215
  * **Developer Responsibility**: Inside your `forward` method, you *must* check `self.contract_successful` and/or `self.contract_result`.
@@ -219,9 +220,9 @@ This is your class's original `forward` method, containing the primary logic. Th
219
220
  ```python
220
221
  raise self.contract_exception or ValueError("Contract failed!")
221
222
  ```
222
- * The `input` argument received by *this* `forward` method (the one you write) depends on whether the contract succeeded:
223
- * If `contract_successful == True`: `input` is the `current_input` from `wrapped_forward` which was used by `_validate_output`. This `current_input` is the output of `_act` if `act` is defined, otherwise it's the output of `_validate_input`.
224
- * If `contract_successful == False`: `input` is the `original_input` (the raw input to the contract call, after initial type validation by `_is_valid_input` but before `pre` or `act` modifications).
223
+ * The argument bound to your first non-`self` parameter (e.g., `model_input`) depends on whether the contract succeeded:
224
+ * If `contract_successful == True`: that argument is the `current_input` from `wrapped_forward` which was used by `_validate_output`. This `current_input` is the output of `_act` if `act` is defined, otherwise it's the output of `_validate_input`.
225
+ * If `contract_successful == False`: that argument is the `original_input` (the raw value provided to the contract call, after initial type validation by `_is_valid_input` but before `pre` or `act` modifications).
225
226
 
226
227
  ```python
227
228
  def forward(self, input: MyInput, **kwargs) -> MyOutput:
@@ -237,6 +238,16 @@ This is your class's original `forward` method, containing the primary logic. Th
237
238
  return final_result
238
239
  ```
239
240
 
241
+ #### Input Binding Rules
242
+
243
+ The contract wrapper now resolves the canonical input value without requiring an `input=` keyword argument. The resolution order is:
244
+
245
+ 1. The first positional argument supplied when you call the contracted instance (i.e., `my_expr(my_input)`).
246
+ 2. If no positional value is provided, the first positional-or-keyword parameter defined after `self` in your `forward` signature (for example, `model_input`) is fetched from `**kwargs`.
247
+ 3. As a backwards-compatible fallback, an explicit `input=` keyword argument is still accepted.
248
+
249
+ The resolved object is then passed consistently through `_is_valid_input`, `pre`, `act`, `_validate_output`, and finally your original `forward` method. All remaining keyword arguments are forwarded untouched.
250
+
240
251
  #### Error Handling and Propagation
241
252
 
242
253
  When a contract validation or remediation step fails, the exception is captured in `self.contract_exception`, and `self.contract_successful` is set to `False`. If you prefer to surface these errors instead of returning fallback values, you can propagate the exception in your `forward` implementation:
@@ -285,17 +296,17 @@ To illustrate, say you want a non-trivial `title: str` in your output object, bu
285
296
 
286
297
  ## Contract Execution Flow
287
298
 
288
- When you call an instance of your contracted class (e.g., `my_instance(input=my_input_data)`), the `wrapped_forward` method (created by the `@contract` decorator) executes the following sequence:
299
+ When you call an instance of your contracted class (e.g., `my_instance(my_input_data)` or `my_instance(input=my_input_data)`), the `wrapped_forward` method (created by the `@contract` decorator) executes the following sequence:
289
300
 
290
301
  0. **Return Type Annotation Validation & Dynamic Wrapping (`_is_valid_output` + `_try_dynamic_type_annotation`)**:
291
302
  * Inspects your `forward` method's return type annotation (`sig.return_annotation`).
292
303
  * Ensures you provided a return type annotation and it’s a subclass of `LLMDataModel`.
293
304
  * If the annotation is a native Python/typing type (e.g., `str`, `list[int]`, `Optional[...]`), the system automatically builds a dynamic `LLMDataModel` wrapper for the output type, allowing subsequent validation and unwrapping.
294
305
 
295
- 1. **Initial Input Validation & Dynamic Wrapping (`_is_valid_input` + `_try_dynamic_type_annotation`)**:
296
- * Checks if the provided `input` kwarg is an instance of `LLMDataModel`. Fails fast if not.
297
- * Extracts the `original_input` object.
298
- * If the `input` is a native Python type (and not an `LLMDataModel`), the system inspects your `forward` signature to infer the expected Python type and automatically wraps your primitive or container in a temporary `LLMDataModel` for validation (via `_try_dynamic_type_annotation`).
306
+ 1. **Initial Input Collection & Dynamic Wrapping (`_is_valid_input` + `_try_dynamic_type_annotation`)**:
307
+ * Determines the canonical contract input by prioritizing the first positional argument after `self`. If no positional value is provided, it falls back to the first compatible keyword (preferring the corresponding parameter name, then `input` for backward compatibility).
308
+ * Validates that canonical value with `_is_valid_input` and stores it as `original_input`.
309
+ * If the value is a native Python type (and not already an `LLMDataModel`), the system inspects your `forward` signature to infer the expected Python type and automatically wraps your primitive or container in a temporary `LLMDataModel` for validation (via `_try_dynamic_type_annotation`).
299
310
 
300
311
  2. **Pre-condition Validation (`_validate_input`)**:
301
312
  * The `current_input` (initially `original_input`) is passed to your `pre(input)` method.
@@ -304,7 +315,7 @@ When you call an instance of your contracted class (e.g., `my_instance(input=my_
304
315
 
305
316
  3. **Intermediate Action (`_act`)**:
306
317
  * If your class defines an `act` method:
307
- * Its signature is validated (parameter named `input`, `LLMDataModel` type hints for input and output).
318
+ * Its signature is validated to ensure the first positional (or positional-or-keyword) parameter after `self` is type-hinted, and the return annotation is present.
308
319
  * `act(current_input, **act_kwargs)` is called. `current_input` here is the output from the pre-condition validation step.
309
320
  * The result of `act` becomes the new `current_input`.
310
321
  * The actual type of `act`'s return value is checked against its annotation.
@@ -332,7 +343,7 @@ When you call an instance of your contracted class (e.g., `my_instance(input=my_
332
343
  * It determines the `forward_input` for your original `forward` method:
333
344
  * If `self.contract_successful` is `True`, `forward_input` is the `current_input` that successfully passed through `_act` and was used by `_validate_output`.
334
345
  * If `self.contract_successful` is `False`, `forward_input` is the `original_input`.
335
- * Your class's original `forward(self, input=forward_input, **kwargs)` method is called.
346
+ * Your class's original `forward` method is invoked with that canonical input reinserted (as the first positional argument or matching keyword) alongside the untouched auxiliary `**kwargs`.
336
347
  * The value returned by *your* `forward` method becomes the ultimate return value of the contract call.
337
348
  * A final output type check is performed on this returned value against your `forward` method's declared return type annotation. If the contract is configured with `graceful=True`, this final type check is skipped instead of raising a `TypeError`.
338
349
 
@@ -26,9 +26,9 @@
26
26
  "# ──────────────────────────────────────────────────────────────\n",
27
27
  "# SymbolicAI core │\n",
28
28
  "# ──────────────────────────────────────────────────────────────\n",
29
- "from symai import Expression # Base class for your LLM “operators”\n",
29
+ "from symai import Expression # Base class for your LLM “operators”\n",
30
30
  "from symai.models import LLMDataModel # Thin Pydantic wrapper w/ LLM hints\n",
31
- "from symai.strategy import contract # The Design-by-Contract decorator"
31
+ "from symai.strategy import contract # The Design-by-Contract decorator"
32
32
  ]
33
33
  },
34
34
  {
@@ -1,6 +1,7 @@
1
1
  import os
2
2
  import platform
3
3
  import shutil
4
+
4
5
  import cairosvg
5
6
  from PIL import Image
6
7
 
@@ -1,10 +1,11 @@
1
1
  import os
2
2
  import platform
3
3
  import queue
4
- import customtkinter
5
- import threading
6
4
  import subprocess
7
- from customtkinter import CTkButton, CTkEntry, CTk, CTkProgressBar, CTkLabel, CTkTextbox
5
+ import threading
6
+
7
+ import customtkinter
8
+ from customtkinter import CTk, CTkButton, CTkEntry, CTkLabel, CTkProgressBar, CTkTextbox
8
9
 
9
10
 
10
11
  def get_anaconda_url():
@@ -24,12 +24,14 @@
24
24
  "source": [
25
25
  "import os\n",
26
26
  "import warnings\n",
27
+ "\n",
27
28
  "warnings.filterwarnings('ignore')\n",
28
29
  "os.chdir('../') # set the working directory to the root of the project\n",
29
30
  "import numpy as np\n",
31
+ "from IPython.display import display\n",
32
+ "\n",
30
33
  "from symai import *\n",
31
- "from symai.components import *\n",
32
- "from IPython.display import display"
34
+ "from symai.components import *"
33
35
  ]
34
36
  },
35
37
  {
@@ -587,7 +589,8 @@
587
589
  "metadata": {},
588
590
  "outputs": [],
589
591
  "source": [
590
- "from examples.docs import Docs, CppDocs\n",
592
+ "from examples.docs import CppDocs, Docs\n",
593
+ "\n",
591
594
  "docs = Docs()"
592
595
  ]
593
596
  },
@@ -24,11 +24,13 @@
24
24
  "source": [
25
25
  "import os\n",
26
26
  "import warnings\n",
27
+ "\n",
27
28
  "warnings.filterwarnings('ignore')\n",
28
29
  "os.chdir('../') # set the working directory to the root of the project\n",
30
+ "from IPython.display import display\n",
31
+ "\n",
29
32
  "from symai import *\n",
30
- "from symai.components import *\n",
31
- "from IPython.display import display"
33
+ "from symai.components import *"
32
34
  ]
33
35
  },
34
36
  {
@@ -6,9 +6,10 @@
6
6
  "metadata": {},
7
7
  "outputs": [],
8
8
  "source": [
9
- "from symai.components import *\n",
10
9
  "from symai.backend.mixin.tracker import OpenAICostTracker\n",
11
- "from symai import *"
10
+ "\n",
11
+ "from symai import *\n",
12
+ "from symai.components import *"
12
13
  ]
13
14
  },
14
15
  {
@@ -124,6 +125,7 @@
124
125
  "outputs": [],
125
126
  "source": [
126
127
  "from symai.extended import RepositoryCloner\n",
128
+ "\n",
127
129
  "cloner = RepositoryCloner() # load repository cloner"
128
130
  ]
129
131
  },
@@ -301,9 +303,11 @@
301
303
  }
302
304
  ],
303
305
  "source": [
304
- "from symai.components import TokenTracker, Stream\n",
305
306
  "from symai.backend.mixin.tracker import OpenAICostTracker\n",
307
+ "\n",
306
308
  "from symai import *\n",
309
+ "from symai.components import Stream, TokenTracker\n",
310
+ "\n",
307
311
  "website = 'wyour datddy' # load page\n",
308
312
  "\n",
309
313
  "with OpenAICostTracker() as tracker: # track the cost using OpenAI API\n",
@@ -391,6 +395,7 @@
391
395
  ],
392
396
  "source": [
393
397
  "from symai import Interface\n",
398
+ "\n",
394
399
  "res = Interface('selenium')('https://www.baidu-venture.net/touzizuhe.html')"
395
400
  ]
396
401
  },
@@ -24,11 +24,13 @@
24
24
  "source": [
25
25
  "import os\n",
26
26
  "import warnings\n",
27
+ "\n",
27
28
  "warnings.filterwarnings('ignore')\n",
28
29
  "os.chdir('../') # set the working directory to the root of the project\n",
30
+ "from IPython.display import display\n",
31
+ "\n",
29
32
  "from symai import *\n",
30
- "from symai.components import *\n",
31
- "from IPython.display import display"
33
+ "from symai.components import *"
32
34
  ]
33
35
  },
34
36
  {
@@ -79,7 +81,7 @@
79
81
  "metadata": {},
80
82
  "outputs": [],
81
83
  "source": [
82
- "from examples.news import HEADER_STYLE_DESCRIPTION, HTML_TEMPLATE, HTML_STREAM_STYLE_DESCRIPTION"
84
+ "from examples.news import HEADER_STYLE_DESCRIPTION, HTML_STREAM_STYLE_DESCRIPTION, HTML_TEMPLATE"
83
85
  ]
84
86
  },
85
87
  {
@@ -17,11 +17,14 @@
17
17
  "source": [
18
18
  "import os\n",
19
19
  "import warnings\n",
20
+ "\n",
20
21
  "warnings.filterwarnings('ignore')\n",
21
22
  "print(os.getcwd())\n",
22
- "from symai import *\n",
23
- "from IPython.display import display\n",
24
23
  "from examples.sql import SQL\n",
24
+ "from IPython.display import display\n",
25
+ "\n",
26
+ "from symai import *\n",
27
+ "\n",
25
28
  "sql = SQL()"
26
29
  ]
27
30
  },
@@ -6,11 +6,11 @@
6
6
  "metadata": {},
7
7
  "outputs": [],
8
8
  "source": [
9
- "from symai.extended.personas import PersonaBuilder\n",
10
- "from symai.extended.personas import Dialogue\n",
11
- "from symai.extended.api_builder import APIExecutor\n",
9
+ "from symai.extended.personas import Dialogue, PersonaBuilder\n",
12
10
  "from symai.extended.personas.student import MaxTenner\n",
13
- "from symai import Interface"
11
+ "\n",
12
+ "from symai import Interface\n",
13
+ "from symai.extended.api_builder import APIExecutor"
14
14
  ]
15
15
  },
16
16
  {
@@ -1,4 +1,5 @@
1
1
  from symai.backend.engines.lean.engine_lean4 import LeanEngine
2
+
2
3
  # Example usage
3
4
  if __name__ == "__main__":
4
5
  # Initialize LeanEngine
@@ -1,7 +1,6 @@
1
1
  from symai import *
2
2
  from symai.components import *
3
3
 
4
-
5
4
  HEADER_STYLE_DESCRIPTION = """Design a web app with HTML, CSS and inline JavaScript.
6
5
  Use dark theme and best practices for colors, text font, etc.
7
6
  Use Bootstrap for styling.
@@ -1,7 +1,6 @@
1
1
  from symai import *
2
2
  from symai.components import *
3
3
 
4
-
5
4
  HEADER_STYLE_DESCRIPTION = """Design a web app with HTML, CSS and inline JavaScript.
6
5
  Use dark theme and best practices for colors, text font, etc.
7
6
  Use Bootstrap for styling.
@@ -1,9 +1,8 @@
1
1
  import symai as ai
2
- from symai.post_processors import StripPostProcessor, CodeExtractPostProcessor
2
+ from symai.post_processors import CodeExtractPostProcessor, StripPostProcessor
3
3
  from symai.pre_processors import PreProcessor
4
4
  from symai.symbol import Expression, Symbol
5
5
 
6
-
7
6
  SQL_CONTEXT = """[Description]
8
7
  The following statements describe the Structured Query Language (SQL):
9
8
 
@@ -66,6 +66,7 @@ dependencies = [
66
66
  "nest-asyncio>=1.6.0",
67
67
  "rich>=13.9.4",
68
68
  "playwright>=1.55.0",
69
+ "llvmlite>=0.45.1",
69
70
  ]
70
71
 
71
72
  [project.optional-dependencies]
@@ -75,7 +76,7 @@ hf = ["transformers>=4.45.2", "accelerate>=0.33.0", "peft>=0.13.1", "d
75
76
  webscraping = ["beautifulsoup4>=4.12.3", "trafilatura>=2.0.0", "pdfminer.six", "playwright>=1.45.0"]
76
77
  llama_cpp = ["llama-cpp-python[server]>=0.3.7"] # handle separately since this dependency may not compile and require special maintenance
77
78
  wolframalpha = ["wolframalpha>=5.0.0"]
78
- whisper = ["openai-whisper>=20240930", "numba>=0.60.0"]
79
+ whisper = ["openai-whisper>=20240930", "numba>=0.62.1", "llvmlite>=0.45.1"]
79
80
  serpapi = ["google_search_results>=2.4.2"]
80
81
  services = ["fastapi>=0.110.0", "redis>=5.0.2", "uvicorn>=0.27.1"]
81
82
  solver = ["z3-solver>=4.12.6.0"]
@@ -100,7 +101,7 @@ exclude = ["tests", "examples", "notebooks", "outputs", "assets", "app.py"]
100
101
 
101
102
  [dependency-groups]
102
103
  dev = [
103
- "isort>=6.0.1",
104
+ "ruff>=0.14.4",
104
105
  "pytest>=8.3.1",
105
106
  ]
106
107
 
@@ -0,0 +1,68 @@
1
+ exclude = [
2
+ ".codex",
3
+ ".symai",
4
+ ".bzr",
5
+ ".direnv",
6
+ ".eggs",
7
+ ".git",
8
+ ".git-rewrite",
9
+ ".hg",
10
+ ".ipynb_checkpoints",
11
+ ".mypy_cache",
12
+ ".nox",
13
+ ".pants.d",
14
+ ".pyenv",
15
+ ".pytest_cache",
16
+ ".pytype",
17
+ ".ruff_cache",
18
+ ".svn",
19
+ ".tox",
20
+ ".venv",
21
+ ".vscode",
22
+ "__pypackages__",
23
+ "_build",
24
+ "buck-out",
25
+ "build",
26
+ "dist",
27
+ "node_modules",
28
+ "site-packages",
29
+ "venv",
30
+ "scripts",
31
+ "tests"
32
+ ]
33
+
34
+ line-length = 100
35
+ indent-width = 4
36
+ target-version = "py312"
37
+
38
+ [lint]
39
+ # Rules URL: https://docs.astral.sh/ruff/rules
40
+ select = [
41
+ "F","E4","E7","E9",
42
+ "I","UP","B","SIM","C4","A","ARG","ISC","RET","RSE",
43
+ "G","LOG","TC","PTH","EM","C90",
44
+ "PLE","PLC","PLW",
45
+ "RUF","T10","T20"
46
+ ]
47
+ ignore = [
48
+ "B028", # no explicit stacklevel; enable if you rely on warnings for users
49
+ "PLW0603", # global statement discouraged; often noisy in legacy code
50
+ "G004", # logging-f-string
51
+ "A002", # argument-shadowing-builtin
52
+ ]
53
+
54
+ # Allow fix for all enabled rules (when `--fix`) is provided.
55
+ fixable = ["ALL"]
56
+ unfixable = []
57
+
58
+ # Allow unused variables when underscore-prefixed.
59
+ dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
60
+
61
+ [lint.mccabe]
62
+ max-complexity = 10
63
+
64
+ [format]
65
+ quote-style = "double"
66
+ indent-style = "tab"
67
+ skip-magic-trailing-comma = false
68
+ line-ending = "auto"