symbolicai 1.0.0__tar.gz → 1.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.
- {symbolicai-1.0.0 → symbolicai-1.1.0}/PKG-INFO +19 -9
- {symbolicai-1.0.0 → symbolicai-1.1.0}/README.md +2 -2
- symbolicai-1.1.0/docs/source/ENGINES/indexing_engine.md +283 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/ENGINES/neurosymbolic_engine.md +22 -2
- symbolicai-1.1.0/docs/source/ENGINES/scrape_engine.md +43 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/ENGINES/search_engine.md +52 -3
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/INSTALLATION.md +2 -2
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/SUMMARY.md +1 -1
- {symbolicai-1.0.0 → symbolicai-1.1.0}/pyproject.toml +8 -3
- {symbolicai-1.0.0 → symbolicai-1.1.0}/ruff.toml +2 -2
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/__init__.py +198 -134
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/base.py +51 -51
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/drawing/engine_bfl.py +33 -33
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/drawing/engine_gpt_image.py +4 -10
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/embedding/engine_llama_cpp.py +50 -35
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/embedding/engine_openai.py +22 -16
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/execute/engine_python.py +16 -16
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/files/engine_io.py +51 -49
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/imagecaptioning/engine_blip2.py +27 -23
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/imagecaptioning/engine_llavacpp_client.py +53 -46
- symbolicai-1.1.0/symai/backend/engines/index/engine_pinecone.py +261 -0
- symbolicai-1.1.0/symai/backend/engines/index/engine_qdrant.py +1011 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/index/engine_vectordb.py +78 -52
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/lean/engine_lean4.py +65 -25
- symbolicai-1.1.0/symai/backend/engines/neurosymbolic/__init__.py +52 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/neurosymbolic/engine_anthropic_claudeX_chat.py +137 -135
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/neurosymbolic/engine_anthropic_claudeX_reasoning.py +145 -152
- symbolicai-1.1.0/symai/backend/engines/neurosymbolic/engine_cerebras.py +328 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/neurosymbolic/engine_deepseekX_reasoning.py +75 -49
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/neurosymbolic/engine_google_geminiX_reasoning.py +199 -155
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/neurosymbolic/engine_groq.py +106 -72
- symbolicai-1.1.0/symai/backend/engines/neurosymbolic/engine_huggingface.py +216 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/neurosymbolic/engine_llama_cpp.py +121 -93
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/neurosymbolic/engine_openai_gptX_chat.py +213 -132
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/neurosymbolic/engine_openai_gptX_reasoning.py +180 -137
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/ocr/engine_apilayer.py +18 -20
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/output/engine_stdout.py +9 -9
- {symbolicai-1.0.0/symai/backend/engines/webscraping → symbolicai-1.1.0/symai/backend/engines/scrape}/engine_requests.py +25 -11
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/search/engine_openai.py +95 -83
- symbolicai-1.1.0/symai/backend/engines/search/engine_parallel.py +665 -0
- symbolicai-1.1.0/symai/backend/engines/search/engine_perplexity.py +113 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/search/engine_serpapi.py +33 -28
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/speech_to_text/engine_local_whisper.py +37 -27
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/symbolic/engine_wolframalpha.py +14 -8
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/text_to_speech/engine_openai.py +15 -19
- symbolicai-1.1.0/symai/backend/engines/text_vision/engine_clip.py +93 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/userinput/engine_console.py +3 -4
- symbolicai-1.1.0/symai/backend/mixin/anthropic.py +66 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/mixin/deepseek.py +4 -5
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/mixin/google.py +5 -4
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/mixin/groq.py +2 -4
- symbolicai-1.1.0/symai/backend/mixin/openai.py +164 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/settings.py +14 -14
- symbolicai-1.1.0/symai/chat.py +375 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/collect/dynamic.py +13 -11
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/collect/pipeline.py +39 -31
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/collect/stats.py +109 -69
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/components.py +556 -238
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/constraints.py +14 -5
- symbolicai-1.1.0/symai/core.py +2149 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/core_ext.py +55 -50
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/endpoints/api.py +113 -58
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/api_builder.py +22 -17
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/arxiv_pdf_parser.py +13 -5
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/bibtex_parser.py +8 -4
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/conversation.py +88 -69
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/document.py +40 -27
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/file_merger.py +45 -7
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/graph.py +38 -24
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/html_style_template.py +17 -11
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/interfaces/clip.py +4 -2
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/interfaces/console.py +5 -3
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/interfaces/dall_e.py +3 -1
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/interfaces/file.py +2 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/interfaces/flux.py +3 -1
- symbolicai-1.1.0/symai/extended/interfaces/gpt_image.py +25 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/interfaces/input.py +2 -1
- symbolicai-1.0.0/symai/extended/interfaces/naive_webscraping.py → symbolicai-1.1.0/symai/extended/interfaces/naive_scrape.py +3 -2
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/interfaces/naive_vectordb.py +2 -2
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/interfaces/ocr.py +4 -2
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/interfaces/openai_search.py +2 -0
- symbolicai-1.1.0/symai/extended/interfaces/parallel.py +30 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/interfaces/perplexity.py +2 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/interfaces/pinecone.py +6 -4
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/interfaces/python.py +2 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/interfaces/serpapi.py +2 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/interfaces/terminal.py +0 -1
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/interfaces/tts.py +2 -1
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/interfaces/whisper.py +2 -1
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/interfaces/wolframalpha.py +1 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/metrics/__init__.py +1 -1
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/metrics/similarity.py +5 -2
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/os_command.py +31 -22
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/packages/symdev.py +39 -34
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/packages/sympkg.py +30 -27
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/packages/symrun.py +46 -35
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/repo_cloner.py +10 -9
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/seo_query_optimizer.py +15 -12
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/solver.py +104 -76
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/summarizer.py +8 -7
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/taypan_interpreter.py +10 -9
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/vectordb.py +28 -15
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/formatter/formatter.py +39 -31
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/formatter/regex.py +46 -44
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/functional.py +184 -86
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/imports.py +85 -51
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/interfaces.py +1 -1
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/memory.py +33 -24
- symbolicai-1.1.0/symai/menu/screen.py +56 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/misc/console.py +27 -27
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/misc/loader.py +4 -3
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/models/base.py +147 -76
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/ops/__init__.py +1 -1
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/ops/measures.py +17 -14
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/ops/primitives.py +933 -635
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/post_processors.py +28 -24
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/pre_processors.py +58 -52
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/processor.py +15 -9
- symbolicai-1.1.0/symai/prompts.py +1416 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/server/huggingface_server.py +115 -32
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/server/llama_cpp_server.py +14 -6
- symbolicai-1.1.0/symai/server/qdrant_server.py +206 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/shell.py +98 -39
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/shellsv.py +307 -223
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/strategy.py +135 -81
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/symbol.py +276 -225
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/utils.py +62 -46
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symbolicai.egg-info/PKG-INFO +19 -9
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symbolicai.egg-info/SOURCES.txt +9 -6
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symbolicai.egg-info/requires.txt +19 -7
- {symbolicai-1.0.0 → symbolicai-1.1.0}/uv.lock +2185 -46
- symbolicai-1.0.0/docs/source/ENGINES/indexing_engine.md +0 -31
- symbolicai-1.0.0/docs/source/ENGINES/webscraping_engine.md +0 -11
- symbolicai-1.0.0/symai/backend/engines/index/engine_pinecone.py +0 -233
- symbolicai-1.0.0/symai/backend/engines/neurosymbolic/__init__.py +0 -52
- symbolicai-1.0.0/symai/backend/engines/neurosymbolic/engine_huggingface.py +0 -183
- symbolicai-1.0.0/symai/backend/engines/search/engine_perplexity.py +0 -114
- symbolicai-1.0.0/symai/backend/engines/text_vision/engine_clip.py +0 -87
- symbolicai-1.0.0/symai/backend/mixin/anthropic.py +0 -58
- symbolicai-1.0.0/symai/backend/mixin/openai.py +0 -142
- symbolicai-1.0.0/symai/chat.py +0 -305
- symbolicai-1.0.0/symai/core.py +0 -1864
- symbolicai-1.0.0/symai/extended/interfaces/gpt_image.py +0 -16
- symbolicai-1.0.0/symai/menu/screen.py +0 -47
- symbolicai-1.0.0/symai/prompts.py +0 -1351
- symbolicai-1.0.0/tests/engines/search/openai_engine.py +0 -82
- symbolicai-1.0.0/tests/engines/search/perplexity_engine.py +0 -233
- {symbolicai-1.0.0 → symbolicai-1.1.0}/.gitbook.yaml +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/.github/FUNDING.yml +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/.gitignore +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/.symai/symsh.config.json +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/CITATION.cff +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/Dockerfile +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/LICENSE +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/MANIFEST.in +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/app.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/images/banner.png +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/images/cat.jpg +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/images/cat.png +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/images/contract_flow.png +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/images/img1.png +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/images/img10.png +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/images/img2.png +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/images/img3.png +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/images/img4.png +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/images/img5.png +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/images/img6.png +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/images/img7.png +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/images/img8.png +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/images/img9.png +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/images/preview.gif +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/images/screen1.jpeg +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/images/symai_logo.png +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/images/symsh.png +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/images/vid1.png +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/images/vid2.png +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/images/vid3.png +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/images/vid4.png +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/images/vid5.png +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/images/vid6.png +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/results/news.html +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/results/news.png +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/assets/results/news_prev.png +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/bin/install.ps1 +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/bin/install.sh +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/build.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docker-compose.yml +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/ENGINES/clip_engine.md +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/ENGINES/custom_engine.md +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/ENGINES/drawing_engine.md +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/ENGINES/file_engine.md +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/ENGINES/local_engine.md +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/ENGINES/ocr_engine.md +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/ENGINES/speech_to_text_engine.md +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/ENGINES/symbolic_engine.md +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/FEATURES/contracts.md +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/FEATURES/error_handling.md +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/FEATURES/expressions.md +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/FEATURES/import.md +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/FEATURES/operations.md +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/FEATURES/primitives.md +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/INTRODUCTION.md +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/QUICKSTART.md +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/TOOLS/chatbot.md +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/TOOLS/packages.md +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/TOOLS/shell.md +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/TUTORIALS/chatbot.md +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/TUTORIALS/context.md +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/TUTORIALS/data_query.md +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/docs/source/TUTORIALS/video_tutorials.md +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/environment.yml +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/examples/contracts.ipynb +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/examples/primitives.ipynb +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/icon_converter.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/installer.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/legacy/notebooks/Basics.ipynb +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/legacy/notebooks/ChatBot.ipynb +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/legacy/notebooks/Conversation.ipynb +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/legacy/notebooks/Indexer.ipynb +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/legacy/notebooks/News.ipynb +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/legacy/notebooks/Queries.ipynb +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/legacy/notebooks/TTS_Persona.ipynb +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/legacy/notebooks/examples/Lean engine.png +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/legacy/notebooks/examples/a_star.txt +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/legacy/notebooks/examples/abstract.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/legacy/notebooks/examples/audio.mp3 +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/legacy/notebooks/examples/dbpedia_samples.jsonl +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/legacy/notebooks/examples/dbpedia_samples_prepared_train.jsonl +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/legacy/notebooks/examples/dbpedia_samples_prepared_valid.jsonl +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/legacy/notebooks/examples/demo.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/legacy/notebooks/examples/demo_strategy.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/legacy/notebooks/examples/docs.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/legacy/notebooks/examples/einsteins_puzzle.txt +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/legacy/notebooks/examples/file.json +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/legacy/notebooks/examples/lean.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/legacy/notebooks/examples/news.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/legacy/notebooks/examples/paper.pdf +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/legacy/notebooks/examples/paper.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/legacy/notebooks/examples/sql.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/public/eai.svg +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/pytest.ini +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/setup.cfg +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/setup.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/TERMS_OF_SERVICE.md +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/__init__.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/engines/__init__.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/backend/mixin/__init__.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/collect/__init__.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/context.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/endpoints/__init__py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/exceptions.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/.DS_Store +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/__init__.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/interfaces/__init__.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/interfaces/blip_2.py +1 -1
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/interfaces/llava.py +1 -1
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/extended/packages/__init__.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/formatter/__init__.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/formatter/emoji.pytxt +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/menu/__init__.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/misc/__init__.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/models/__init__.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/models/errors.py +1 -1
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/server/__init__.py +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symai/symsh.md +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symbolicai.egg-info/dependency_links.txt +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symbolicai.egg-info/entry_points.txt +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/symbolicai.egg-info/top_level.txt +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/tests/README.md +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/tests/data/audio.mp3 +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/tests/data/pg1727.txt +0 -0
- {symbolicai-1.0.0 → symbolicai-1.1.0}/trusted_repos.yml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: symbolicai
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1.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
|
|
@@ -85,6 +85,7 @@ Requires-Dist: nest-asyncio>=1.6.0
|
|
|
85
85
|
Requires-Dist: rich>=13.9.4
|
|
86
86
|
Requires-Dist: playwright>=1.55.0
|
|
87
87
|
Requires-Dist: llvmlite>=0.45.1
|
|
88
|
+
Requires-Dist: cerebras-cloud-sdk>=1.59.0
|
|
88
89
|
Provides-Extra: bitsandbytes
|
|
89
90
|
Requires-Dist: bitsandbytes>=0.43.1; extra == "bitsandbytes"
|
|
90
91
|
Provides-Extra: blip2
|
|
@@ -97,11 +98,12 @@ Requires-Dist: accelerate>=0.33.0; extra == "hf"
|
|
|
97
98
|
Requires-Dist: peft>=0.13.1; extra == "hf"
|
|
98
99
|
Requires-Dist: datasets>=3.0.1; extra == "hf"
|
|
99
100
|
Requires-Dist: trl>=0.11.3; extra == "hf"
|
|
100
|
-
Provides-Extra:
|
|
101
|
-
Requires-Dist: beautifulsoup4>=4.12.3; extra == "
|
|
102
|
-
Requires-Dist: trafilatura>=2.0.0; extra == "
|
|
103
|
-
Requires-Dist: pdfminer.six; extra == "
|
|
104
|
-
Requires-Dist: playwright>=1.45.0; extra == "
|
|
101
|
+
Provides-Extra: scrape
|
|
102
|
+
Requires-Dist: beautifulsoup4>=4.12.3; extra == "scrape"
|
|
103
|
+
Requires-Dist: trafilatura>=2.0.0; extra == "scrape"
|
|
104
|
+
Requires-Dist: pdfminer.six; extra == "scrape"
|
|
105
|
+
Requires-Dist: playwright>=1.45.0; extra == "scrape"
|
|
106
|
+
Requires-Dist: parallel-web>=0.3.3; extra == "scrape"
|
|
105
107
|
Provides-Extra: llama-cpp
|
|
106
108
|
Requires-Dist: llama-cpp-python[server]>=0.3.7; extra == "llama-cpp"
|
|
107
109
|
Provides-Extra: wolframalpha
|
|
@@ -110,6 +112,8 @@ Provides-Extra: whisper
|
|
|
110
112
|
Requires-Dist: openai-whisper>=20240930; extra == "whisper"
|
|
111
113
|
Requires-Dist: numba>=0.62.1; extra == "whisper"
|
|
112
114
|
Requires-Dist: llvmlite>=0.45.1; extra == "whisper"
|
|
115
|
+
Provides-Extra: search
|
|
116
|
+
Requires-Dist: parallel-web>=0.3.3; extra == "search"
|
|
113
117
|
Provides-Extra: serpapi
|
|
114
118
|
Requires-Dist: google_search_results>=2.4.2; extra == "serpapi"
|
|
115
119
|
Provides-Extra: services
|
|
@@ -118,14 +122,20 @@ Requires-Dist: redis>=5.0.2; extra == "services"
|
|
|
118
122
|
Requires-Dist: uvicorn>=0.27.1; extra == "services"
|
|
119
123
|
Provides-Extra: solver
|
|
120
124
|
Requires-Dist: z3-solver>=4.12.6.0; extra == "solver"
|
|
125
|
+
Provides-Extra: qdrant
|
|
126
|
+
Requires-Dist: qdrant-client; extra == "qdrant"
|
|
127
|
+
Requires-Dist: chonkie[all]>=0.4.1; extra == "qdrant"
|
|
128
|
+
Requires-Dist: tokenizers; extra == "qdrant"
|
|
121
129
|
Provides-Extra: all
|
|
122
130
|
Requires-Dist: symbolicai[hf]; extra == "all"
|
|
123
131
|
Requires-Dist: symbolicai[wolframalpha]; extra == "all"
|
|
124
132
|
Requires-Dist: symbolicai[whisper]; extra == "all"
|
|
125
|
-
Requires-Dist: symbolicai[
|
|
133
|
+
Requires-Dist: symbolicai[scrape]; extra == "all"
|
|
134
|
+
Requires-Dist: symbolicai[search]; extra == "all"
|
|
126
135
|
Requires-Dist: symbolicai[serpapi]; extra == "all"
|
|
127
136
|
Requires-Dist: symbolicai[services]; extra == "all"
|
|
128
137
|
Requires-Dist: symbolicai[solver]; extra == "all"
|
|
138
|
+
Requires-Dist: symbolicai[qdrant]; extra == "all"
|
|
129
139
|
Dynamic: license-file
|
|
130
140
|
|
|
131
141
|
# **SymbolicAI: A neuro-symbolic perspective on LLMs**
|
|
@@ -295,7 +305,7 @@ pip install "symbolicai[llamacpp]",
|
|
|
295
305
|
pip install "symbolicai[bitsandbytes]",
|
|
296
306
|
pip install "symbolicai[wolframalpha]",
|
|
297
307
|
pip install "symbolicai[whisper]",
|
|
298
|
-
pip install "symbolicai[
|
|
308
|
+
pip install "symbolicai[scrape]",
|
|
299
309
|
pip install "symbolicai[serpapi]",
|
|
300
310
|
pip install "symbolicai[services]",
|
|
301
311
|
pip install "symbolicai[solver]"
|
|
@@ -315,7 +325,7 @@ uv sync --frozen
|
|
|
315
325
|
To install optional extras via uv:
|
|
316
326
|
```bash
|
|
317
327
|
uv sync --extra all # all optional extras
|
|
318
|
-
uv sync --extra
|
|
328
|
+
uv sync --extra scrape # only scrape
|
|
319
329
|
```
|
|
320
330
|
|
|
321
331
|
> ❗️**NOTE**❗️Please note that some of these optional dependencies may require additional installation steps. Additionally, some are only experimentally supported now and may not work as expected. If a feature is extremely important to you, please consider contributing to the project or reaching out to us.
|
|
@@ -165,7 +165,7 @@ pip install "symbolicai[llamacpp]",
|
|
|
165
165
|
pip install "symbolicai[bitsandbytes]",
|
|
166
166
|
pip install "symbolicai[wolframalpha]",
|
|
167
167
|
pip install "symbolicai[whisper]",
|
|
168
|
-
pip install "symbolicai[
|
|
168
|
+
pip install "symbolicai[scrape]",
|
|
169
169
|
pip install "symbolicai[serpapi]",
|
|
170
170
|
pip install "symbolicai[services]",
|
|
171
171
|
pip install "symbolicai[solver]"
|
|
@@ -185,7 +185,7 @@ uv sync --frozen
|
|
|
185
185
|
To install optional extras via uv:
|
|
186
186
|
```bash
|
|
187
187
|
uv sync --extra all # all optional extras
|
|
188
|
-
uv sync --extra
|
|
188
|
+
uv sync --extra scrape # only scrape
|
|
189
189
|
```
|
|
190
190
|
|
|
191
191
|
> ❗️**NOTE**❗️Please note that some of these optional dependencies may require additional installation steps. Additionally, some are only experimentally supported now and may not work as expected. If a feature is extremely important to you, please consider contributing to the project or reaching out to us.
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
# Indexing Engine
|
|
2
|
+
|
|
3
|
+
SymbolicAI supports multiple indexing engines for vector search and RAG (Retrieval-Augmented Generation) operations. This document covers both the default naive vector engine and the production-ready Qdrant engine.
|
|
4
|
+
|
|
5
|
+
## Naive Vector Engine (Default)
|
|
6
|
+
|
|
7
|
+
By default, text indexing and retrieval is performed with the local naive vector engine using the `Interface` abstraction:
|
|
8
|
+
|
|
9
|
+
```python
|
|
10
|
+
from symai.interfaces import Interface
|
|
11
|
+
|
|
12
|
+
db = Interface('naive_vectordb', index_name="my_index")
|
|
13
|
+
db("Hello world", operation="add")
|
|
14
|
+
result = db("Hello", operation="search", top_k=1)
|
|
15
|
+
print(result.value) # most relevant match
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
You can also add or search multiple documents at once, and perform save/load/purge operations:
|
|
19
|
+
|
|
20
|
+
```python
|
|
21
|
+
docs = ["Alpha document", "Beta entry", "Gamma text"]
|
|
22
|
+
db = Interface('naive_vectordb', index_name="my_index")
|
|
23
|
+
db(docs, operation="add")
|
|
24
|
+
db("save", operation="config")
|
|
25
|
+
# Load or purge as needed
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Qdrant RAG Engine
|
|
29
|
+
|
|
30
|
+
The Qdrant engine provides a production-ready vector database for scalable RAG applications. It supports both local and cloud deployments, advanced document chunking, and comprehensive collection management.
|
|
31
|
+
|
|
32
|
+
### Setup
|
|
33
|
+
|
|
34
|
+
#### Option 1: Local Qdrant Server
|
|
35
|
+
|
|
36
|
+
Start a local Qdrant server using the built-in wrapper:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Using Docker (default)
|
|
40
|
+
python -m symai.server.qdrant_server
|
|
41
|
+
|
|
42
|
+
# Using Qdrant binary
|
|
43
|
+
python -m symai.server.qdrant_server --mode binary --binary-path /path/to/qdrant
|
|
44
|
+
|
|
45
|
+
# Custom configuration
|
|
46
|
+
python -m symai.server.qdrant_server --host 0.0.0.0 --port 6333 --storage-path ./qdrant_storage
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
#### Option 2: Cloud Qdrant
|
|
50
|
+
|
|
51
|
+
Configure your cloud Qdrant instance:
|
|
52
|
+
|
|
53
|
+
```python
|
|
54
|
+
import os
|
|
55
|
+
os.environ["INDEXING_ENGINE_URL"] = "https://your-cluster.qdrant.io"
|
|
56
|
+
os.environ["INDEXING_ENGINE_API_KEY"] = "your-api-key"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Basic Usage
|
|
60
|
+
|
|
61
|
+
The Qdrant engine automatically registers when a Qdrant server is available. Use it through the `Interface` abstraction:
|
|
62
|
+
|
|
63
|
+
```python
|
|
64
|
+
from symai.interfaces import Interface
|
|
65
|
+
|
|
66
|
+
# Qdrant engine is used automatically when server is running
|
|
67
|
+
db = Interface('naive_vectordb', index_name="my_collection")
|
|
68
|
+
db("Hello world", operation="add")
|
|
69
|
+
result = db("Hello", operation="search", top_k=5)
|
|
70
|
+
print(result.value) # list of relevant matches
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Advanced Usage: Direct Engine Access
|
|
74
|
+
|
|
75
|
+
For more control, use the Qdrant engine directly:
|
|
76
|
+
|
|
77
|
+
```python
|
|
78
|
+
from symai.backend.engines.index.engine_qdrant import QdrantIndexEngine
|
|
79
|
+
|
|
80
|
+
# Initialize engine
|
|
81
|
+
engine = QdrantIndexEngine(
|
|
82
|
+
url="http://localhost:6333", # or your cloud URL
|
|
83
|
+
api_key=None, # optional, for cloud instances
|
|
84
|
+
index_name="my_collection",
|
|
85
|
+
index_dims=1536, # embedding dimension
|
|
86
|
+
index_top_k=5, # default top-k for searches
|
|
87
|
+
index_metric="Cosine" # Cosine, Dot, or Euclidean
|
|
88
|
+
)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Collection Management
|
|
92
|
+
|
|
93
|
+
Create and manage collections programmatically:
|
|
94
|
+
|
|
95
|
+
```python
|
|
96
|
+
import asyncio
|
|
97
|
+
|
|
98
|
+
async def manage_collections():
|
|
99
|
+
# Create a new collection
|
|
100
|
+
await engine.create_collection(
|
|
101
|
+
collection_name="documents",
|
|
102
|
+
vector_size=1536,
|
|
103
|
+
distance="Cosine"
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
# Check if collection exists
|
|
107
|
+
exists = await engine.collection_exists("documents")
|
|
108
|
+
|
|
109
|
+
# List all collections
|
|
110
|
+
collections = await engine.list_collections()
|
|
111
|
+
|
|
112
|
+
# Get collection info
|
|
113
|
+
info = await engine.get_collection_info("documents")
|
|
114
|
+
print(f"Points: {info['points_count']}")
|
|
115
|
+
|
|
116
|
+
# Delete collection
|
|
117
|
+
await engine.delete_collection("documents")
|
|
118
|
+
|
|
119
|
+
asyncio.run(manage_collections())
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Document Chunking and RAG
|
|
123
|
+
|
|
124
|
+
The Qdrant engine includes built-in document chunking for RAG workflows:
|
|
125
|
+
|
|
126
|
+
```python
|
|
127
|
+
import asyncio
|
|
128
|
+
|
|
129
|
+
async def add_documents():
|
|
130
|
+
# Chunk and index text directly
|
|
131
|
+
num_chunks = await engine.chunk_and_upsert(
|
|
132
|
+
collection_name="documents",
|
|
133
|
+
text="Your long document text here...",
|
|
134
|
+
metadata={"source": "manual_input", "author": "John Doe"}
|
|
135
|
+
)
|
|
136
|
+
print(f"Indexed {num_chunks} chunks")
|
|
137
|
+
|
|
138
|
+
# Chunk and index from a file (PDF, DOCX, etc.)
|
|
139
|
+
num_chunks = await engine.chunk_and_upsert(
|
|
140
|
+
collection_name="documents",
|
|
141
|
+
document_path="/path/to/document.pdf",
|
|
142
|
+
metadata={"source": "document.pdf"}
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
# Chunk and index from a URL
|
|
146
|
+
num_chunks = await engine.chunk_and_upsert(
|
|
147
|
+
collection_name="documents",
|
|
148
|
+
document_url="https://example.com/document.pdf",
|
|
149
|
+
metadata={"source": "url"}
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
# Custom chunker configuration
|
|
153
|
+
num_chunks = await engine.chunk_and_upsert(
|
|
154
|
+
collection_name="documents",
|
|
155
|
+
text="Your text...",
|
|
156
|
+
chunker_name="RecursiveChunker",
|
|
157
|
+
chunker_kwargs={"chunk_size": 512, "chunk_overlap": 50}
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
asyncio.run(add_documents())
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Point Operations
|
|
164
|
+
|
|
165
|
+
For fine-grained control over individual vectors:
|
|
166
|
+
|
|
167
|
+
```python
|
|
168
|
+
import asyncio
|
|
169
|
+
import numpy as np
|
|
170
|
+
|
|
171
|
+
async def point_operations():
|
|
172
|
+
# Upsert points with embeddings
|
|
173
|
+
points = [
|
|
174
|
+
{
|
|
175
|
+
"id": 1,
|
|
176
|
+
"vector": [0.1] * 1536, # your embedding vector
|
|
177
|
+
"payload": {"text": "Document 1", "category": "tech"}
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"id": 2,
|
|
181
|
+
"vector": [0.2] * 1536,
|
|
182
|
+
"payload": {"text": "Document 2", "category": "science"}
|
|
183
|
+
}
|
|
184
|
+
]
|
|
185
|
+
await engine.upsert(collection_name="documents", points=points)
|
|
186
|
+
|
|
187
|
+
# Retrieve points by ID
|
|
188
|
+
retrieved = await engine.retrieve(
|
|
189
|
+
collection_name="documents",
|
|
190
|
+
ids=[1, 2],
|
|
191
|
+
with_payload=True,
|
|
192
|
+
with_vectors=False
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
# Search for similar vectors
|
|
196
|
+
query_vector = [0.15] * 1536
|
|
197
|
+
results = await engine.search(
|
|
198
|
+
collection_name="documents",
|
|
199
|
+
query_vector=query_vector,
|
|
200
|
+
limit=10,
|
|
201
|
+
score_threshold=0.7 # optional minimum similarity
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
# Delete points
|
|
205
|
+
await engine.delete(collection_name="documents", points_selector=[1, 2])
|
|
206
|
+
|
|
207
|
+
asyncio.run(point_operations())
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Configuration Options
|
|
211
|
+
|
|
212
|
+
The Qdrant engine supports extensive configuration:
|
|
213
|
+
|
|
214
|
+
```python
|
|
215
|
+
engine = QdrantIndexEngine(
|
|
216
|
+
# Connection settings
|
|
217
|
+
url="http://localhost:6333",
|
|
218
|
+
api_key="your-api-key", # for cloud instances
|
|
219
|
+
|
|
220
|
+
# Collection settings
|
|
221
|
+
index_name="default_collection",
|
|
222
|
+
index_dims=1536, # must match your embedding model
|
|
223
|
+
index_top_k=5,
|
|
224
|
+
index_metric="Cosine", # Cosine, Dot, or Euclidean
|
|
225
|
+
|
|
226
|
+
# Chunking settings
|
|
227
|
+
chunker_name="RecursiveChunker",
|
|
228
|
+
tokenizer_name="gpt2",
|
|
229
|
+
embedding_model_name="minishlab/potion-base-8M",
|
|
230
|
+
|
|
231
|
+
# Retry settings
|
|
232
|
+
tries=20,
|
|
233
|
+
delay=0.5,
|
|
234
|
+
max_delay=-1,
|
|
235
|
+
backoff=1,
|
|
236
|
+
jitter=0
|
|
237
|
+
)
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### Environment Variables
|
|
241
|
+
|
|
242
|
+
Configure Qdrant via environment variables:
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
# Qdrant connection
|
|
246
|
+
export INDEXING_ENGINE_URL="http://localhost:6333"
|
|
247
|
+
export INDEXING_ENGINE_API_KEY="your-api-key" # optional
|
|
248
|
+
|
|
249
|
+
# Embedding model (shared with other engines)
|
|
250
|
+
export EMBEDDING_ENGINE_API_KEY="" # empty for local, or API key for cloud
|
|
251
|
+
export EMBEDDING_ENGINE_MODEL="all-mpnet-base-v2" # or your preferred model
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### Embedding Model & API Key Behavior
|
|
255
|
+
|
|
256
|
+
- **If `EMBEDDING_ENGINE_API_KEY` is empty (`""`, the default),** SymbolicAI will use a local, lightweight embedding engine based on SentenceTransformers. You can specify any supported model name via `EMBEDDING_ENGINE_MODEL` (e.g. `"all-mpnet-base-v2"`).
|
|
257
|
+
- **If you DO provide an `EMBEDDING_ENGINE_API_KEY`**, then the respective remote embedding engine will be used (e.g. OpenAI). The model is selected according to the `EMBEDDING_ENGINE_MODEL` key where applicable.
|
|
258
|
+
|
|
259
|
+
This allows you to easily experiment locally for free, and switch to more powerful cloud backends when ready.
|
|
260
|
+
|
|
261
|
+
### Installation
|
|
262
|
+
|
|
263
|
+
Install Qdrant support using the package extra (recommended):
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
pip install symai[qdrant]
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
This installs all required dependencies:
|
|
270
|
+
- `qdrant-client` - Qdrant Python client
|
|
271
|
+
- `chonkie[all]` - Document chunking library
|
|
272
|
+
- `tokenizers` - Tokenization support
|
|
273
|
+
|
|
274
|
+
Alternatively, install dependencies individually:
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
pip install qdrant-client chonkie tokenizers
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### See Also
|
|
281
|
+
|
|
282
|
+
- See `tests/engines/index/test_qdrant_engine.py` for comprehensive usage examples
|
|
283
|
+
- Qdrant documentation: https://qdrant.tech/documentation/
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# Neuro-Symbolic Engine
|
|
2
2
|
|
|
3
3
|
The **neuro-symbolic** engine is our generic wrapper around large language models (LLMs) that support prompts, function/tool calls, vision tokens, token‐counting/truncation, etc.
|
|
4
|
-
Depending on which backend you configure (OpenAI/GPT, Claude, Gemini, Deepseek, Groq, llama.cpp, HuggingFace, …), a few things must be handled differently:
|
|
4
|
+
Depending on which backend you configure (OpenAI/GPT, Claude, Gemini, Deepseek, Groq, Cerebras, llama.cpp, HuggingFace, …), a few things must be handled differently:
|
|
5
5
|
|
|
6
6
|
* GPT-family (OpenAI) and most backends accept the usual `max_tokens`, `temperature`, etc., out of the box.
|
|
7
|
-
* Claude (Anthropic), Gemini (Google), Deepseek, and Qwen (Groq) can return an internal "thinking trace" when you enable it.
|
|
7
|
+
* Claude (Anthropic), Gemini (Google), Deepseek, Cerebras, and Qwen (Groq) can return an internal "thinking trace" when you enable it.
|
|
8
8
|
* Local engines (llamacpp, HuggingFace) do *not* yet support token counting, JSON format enforcement, or vision inputs in the same way.
|
|
9
9
|
* Groq engine requires a special format for the `NEUROSYMBOLIC_ENGINE_MODEL` key: `groq:model_id`. E.g., `groq:qwen/qwen3-32b`.
|
|
10
|
+
* Cerebras engine requires a special format for the `NEUROSYMBOLIC_ENGINE_MODEL` key: `cerebras:model_id`. E.g., `cerebras:gpt-oss-120b`.
|
|
10
11
|
* Token‐truncation and streaming are handled automatically but may vary in behavior by engine.
|
|
11
12
|
|
|
12
13
|
> ❗️**NOTE**❗️the most accurate documentation is the _code_, so be sure to check out the tests. Look for the `mandatory` mark since those are the features that were tested and are guaranteed to work.
|
|
@@ -170,6 +171,25 @@ print(res)
|
|
|
170
171
|
print(metadata["thinking"])
|
|
171
172
|
```
|
|
172
173
|
|
|
174
|
+
### Cerebras
|
|
175
|
+
|
|
176
|
+
```python
|
|
177
|
+
from symai import Symbol
|
|
178
|
+
|
|
179
|
+
# cerebras:gpt-oss-120b
|
|
180
|
+
res, metadata = Symbol("Topic: Disneyland") \
|
|
181
|
+
.query(
|
|
182
|
+
"Write a dystopic take on the topic.",
|
|
183
|
+
return_metadata=True,
|
|
184
|
+
reasoning_effort="medium", # forwarded as Cerebras reasoning_effort
|
|
185
|
+
disable_reasoning=False # forwarded as disable_reasoning
|
|
186
|
+
)
|
|
187
|
+
print(res)
|
|
188
|
+
print(metadata["thinking"])
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
For Cerebras backends, `symai` collects the reasoning trace from either the dedicated `reasoning` field on the message (when present) or from `<think>…</think>` blocks embedded in the content. In both cases the trace is exposed as `metadata["thinking"]` and removed from the final user-facing text.
|
|
192
|
+
|
|
173
193
|
---
|
|
174
194
|
|
|
175
195
|
## JSON‐Only Responses
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Scrape Engine
|
|
2
|
+
|
|
3
|
+
## Naive Scrape
|
|
4
|
+
|
|
5
|
+
To access data from the web, we can use the `naive_scrape` interface. The engine underneath is very lightweight and can be used to scrape data from websites. It is based on the `requests` library, as well as `trafilatura` for output formatting, and `bs4` for HTML parsing. `trafilatura` currently supports the following output formats: `json`, `csv`, `html`, `markdown`, `text`, `xml`
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
from symai.interfaces import Interface
|
|
9
|
+
|
|
10
|
+
scraper = Interface("naive_scrape")
|
|
11
|
+
url = "https://docs.astral.sh/uv/guides/scripts/#next-steps"
|
|
12
|
+
res = scraper(url)
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parallel (Parallel.ai)
|
|
16
|
+
|
|
17
|
+
The Parallel.ai integration routes scrape calls through the official `parallel-web` SDK and can handle PDFs, JavaScript-heavy feeds, and standard HTML pages in the same workflow. Instantiate the Parallel interface and call `.scrape(...)` with the target URL. The engine detects scrape requests automatically whenever a URL is supplied.
|
|
18
|
+
|
|
19
|
+
```python
|
|
20
|
+
from symai.extended import Interface
|
|
21
|
+
|
|
22
|
+
scraper = Interface("parallel")
|
|
23
|
+
article = scraper.scrape(
|
|
24
|
+
"https://trafilatura.readthedocs.io/en/latest/crawls.html",
|
|
25
|
+
full_content=True, # optional: request full document text
|
|
26
|
+
excerpts=True, # optional: default True, retain excerpt snippets
|
|
27
|
+
objective="Summarize crawl guidance for internal notes."
|
|
28
|
+
)
|
|
29
|
+
print(str(article))
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Configuration requires a Parallel API key and the Parallel model token. Add the following to your settings:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
{
|
|
36
|
+
…
|
|
37
|
+
"SEARCH_ENGINE_API_KEY": "…",
|
|
38
|
+
"SEARCH_ENGINE_MODEL": "parallel"
|
|
39
|
+
…
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
When invoked with a URL, the engine hits Parallel's Extract API and returns an `ExtractResult`. The result string joins excerpts or the full content if requested. Because processing is offloaded to Parallel's hosted infrastructure, the engine remains reliable on dynamic pages that the naive scraper cannot render. Install the dependency with `pip install parallel-web` before enabling this engine.
|
|
@@ -1,5 +1,54 @@
|
|
|
1
1
|
# Search Engine
|
|
2
2
|
|
|
3
|
+
## Parallel (Parallel.ai)
|
|
4
|
+
Parallel.ai provides unified search and scrape capabilities through the `parallel-web` SDK. When you invoke `.search(...)` on the Parallel interface, responses are normalized into a `SearchResult` that flattens excerpt text and appends inline citation markers. All URLs are deduplicated and cleaned of tracking parameters, and you can access structured citations via `result.get_citations()`.
|
|
5
|
+
|
|
6
|
+
```python
|
|
7
|
+
from symai.extended import Interface
|
|
8
|
+
|
|
9
|
+
engine = Interface("parallel")
|
|
10
|
+
result = engine.search(
|
|
11
|
+
"Latest advances in quantum error correction",
|
|
12
|
+
max_results=5,
|
|
13
|
+
allowed_domains=["arxiv.org", ".gov"],
|
|
14
|
+
objective="Find peer-reviewed summaries.",
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
print(str(result))
|
|
18
|
+
print(result.get_citations())
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The engine accepts either a single string or a list of query strings. Domain filters are normalized to apex domains and capped at 10 entries, mirroring the underlying Parallel API requirements. You can also change the search `mode` (default `"one-shot"`) or adjust `max_chars_per_result` to constrain excerpt length.
|
|
22
|
+
|
|
23
|
+
### Task processors via the search route
|
|
24
|
+
|
|
25
|
+
If you pass a `processor` kwarg to `engine.search(...)`, SymbolicAI automatically switches to Parallel's task route while keeping the familiar `SearchResult` interface. The query (or prepared input) becomes the task input, and any citations or reasoning returned by the processor are converted back into inline search excerpts. This allows LLM-style task processors to power the same downstream consumers that expect search responses.
|
|
26
|
+
|
|
27
|
+
```python
|
|
28
|
+
task_result = engine.search(
|
|
29
|
+
"Timisoara housing price index 2010-2025",
|
|
30
|
+
processor="base",
|
|
31
|
+
task_api_timeout=600, # optional, forwarded to task_run.result
|
|
32
|
+
task_output_schema={"type": "json"}, # optional schema/task spec hint
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
print(task_result.value) # flattened text with citations
|
|
36
|
+
print(task_result.raw["task_output"]) # raw processor output payload
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Any `allowed_domains` filters are forwarded via `source_policy` to the task run. You can also provide `task_timeout` (client-side polling window) or `task_api_timeout` (server-side execution window) for long-running tasks. When no processor is supplied, the engine uses the standard Parallel search route described above.
|
|
40
|
+
|
|
41
|
+
Enable the engine by installing `parallel-web` and configuring the Parallel credentials in your settings:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
{
|
|
45
|
+
…
|
|
46
|
+
"SEARCH_ENGINE_API_KEY": "…",
|
|
47
|
+
"SEARCH_ENGINE_MODEL": "parallel"
|
|
48
|
+
…
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
3
52
|
## SerpApi (Google)
|
|
4
53
|
To obtain fact-based content, we can perform search queries via `SerpApi` with a `Google` backend. The following example demonstrates how to search for a query and return the results:
|
|
5
54
|
|
|
@@ -14,7 +63,7 @@ Here's a quick example for how to set it up:
|
|
|
14
63
|
```bash
|
|
15
64
|
{
|
|
16
65
|
…
|
|
17
|
-
"SEARCH_ENGINE_API_KEY":
|
|
66
|
+
"SEARCH_ENGINE_API_KEY": "…",
|
|
18
67
|
"SEARCH_ENGINE_ENGINE": "google",
|
|
19
68
|
…
|
|
20
69
|
}
|
|
@@ -34,7 +83,7 @@ Please note that the system_message is optional and can be used to provide conte
|
|
|
34
83
|
```bash
|
|
35
84
|
{
|
|
36
85
|
…
|
|
37
|
-
"SEARCH_ENGINE_API_KEY": "
|
|
86
|
+
"SEARCH_ENGINE_API_KEY": "…",
|
|
38
87
|
"SEARCH_ENGINE_MODEL": "sonar",
|
|
39
88
|
…
|
|
40
89
|
}
|
|
@@ -96,7 +145,7 @@ Here's how to configure the OpenAI search engine:
|
|
|
96
145
|
```bash
|
|
97
146
|
{
|
|
98
147
|
…
|
|
99
|
-
"SEARCH_ENGINE_API_KEY": "
|
|
148
|
+
"SEARCH_ENGINE_API_KEY": "…",
|
|
100
149
|
"SEARCH_ENGINE_MODEL": "gpt-4.1-mini",
|
|
101
150
|
…
|
|
102
151
|
}
|
|
@@ -27,7 +27,7 @@ pip install "symbolicai[llamacpp]",
|
|
|
27
27
|
pip install "symbolicai[bitsandbytes]",
|
|
28
28
|
pip install "symbolicai[wolframalpha]",
|
|
29
29
|
pip install "symbolicai[whisper]",
|
|
30
|
-
pip install "symbolicai[
|
|
30
|
+
pip install "symbolicai[scrape]",
|
|
31
31
|
pip install "symbolicai[serpapi]",
|
|
32
32
|
pip install "symbolicai[services]",
|
|
33
33
|
pip install "symbolicai[solver]"
|
|
@@ -47,7 +47,7 @@ uv sync --frozen
|
|
|
47
47
|
To install optional extras via uv:
|
|
48
48
|
```bash
|
|
49
49
|
uv sync --extra all # all optional extras
|
|
50
|
-
uv sync --extra
|
|
50
|
+
uv sync --extra scrape # only scrape
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
> ❗️**NOTE**❗️Please note that some of these optional dependencies may require additional installation steps. Additionally, some are only experimentally supported now and may not work as expected. If a feature is extremely important to you, please consider contributing to the project or reaching out to us.
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* [Search Engine](ENGINES/search_engine.md)
|
|
17
17
|
* [Speech-to-Text Engine](ENGINES/speech_to_text_engine.md)
|
|
18
18
|
* [Symbolic Engine](ENGINES/symbolic_engine.md)
|
|
19
|
-
* [
|
|
19
|
+
* [Scrape Engine](ENGINES/scrape_engine.md)
|
|
20
20
|
|
|
21
21
|
## Features
|
|
22
22
|
* [Contracts](FEATURES/contracts.md)
|
|
@@ -67,27 +67,32 @@ dependencies = [
|
|
|
67
67
|
"rich>=13.9.4",
|
|
68
68
|
"playwright>=1.55.0",
|
|
69
69
|
"llvmlite>=0.45.1",
|
|
70
|
+
"cerebras-cloud-sdk>=1.59.0",
|
|
70
71
|
]
|
|
71
72
|
|
|
72
73
|
[project.optional-dependencies]
|
|
73
74
|
bitsandbytes = ["bitsandbytes>=0.43.1"] # handle separately because of Apple Silicon
|
|
74
75
|
blip2 = ["decord>=0.6.0", "salesforce-lavis>=1.0.0", "opencv-python-headless>=4.5.5.64"]
|
|
75
76
|
hf = ["transformers>=4.45.2", "accelerate>=0.33.0", "peft>=0.13.1", "datasets>=3.0.1", "trl>=0.11.3"]
|
|
76
|
-
|
|
77
|
+
scrape = ["beautifulsoup4>=4.12.3", "trafilatura>=2.0.0", "pdfminer.six", "playwright>=1.45.0", "parallel-web>=0.3.3"]
|
|
77
78
|
llama_cpp = ["llama-cpp-python[server]>=0.3.7"] # handle separately since this dependency may not compile and require special maintenance
|
|
78
79
|
wolframalpha = ["wolframalpha>=5.0.0"]
|
|
79
80
|
whisper = ["openai-whisper>=20240930", "numba>=0.62.1", "llvmlite>=0.45.1"]
|
|
81
|
+
search = ["parallel-web>=0.3.3"]
|
|
80
82
|
serpapi = ["google_search_results>=2.4.2"]
|
|
81
83
|
services = ["fastapi>=0.110.0", "redis>=5.0.2", "uvicorn>=0.27.1"]
|
|
82
84
|
solver = ["z3-solver>=4.12.6.0"]
|
|
85
|
+
qdrant = ["qdrant-client", "chonkie[all]>=0.4.1", "tokenizers"]
|
|
83
86
|
all = [
|
|
84
87
|
"symbolicai[hf]",
|
|
85
88
|
"symbolicai[wolframalpha]",
|
|
86
89
|
"symbolicai[whisper]",
|
|
87
|
-
"symbolicai[
|
|
90
|
+
"symbolicai[scrape]",
|
|
91
|
+
"symbolicai[search]",
|
|
88
92
|
"symbolicai[serpapi]",
|
|
89
93
|
"symbolicai[services]",
|
|
90
|
-
"symbolicai[solver]"
|
|
94
|
+
"symbolicai[solver]",
|
|
95
|
+
"symbolicai[qdrant]"
|
|
91
96
|
]
|
|
92
97
|
|
|
93
98
|
[tool.setuptools.dynamic]
|
|
@@ -33,7 +33,7 @@ exclude = [
|
|
|
33
33
|
|
|
34
34
|
line-length = 100
|
|
35
35
|
indent-width = 4
|
|
36
|
-
target-version = "
|
|
36
|
+
target-version = "py310"
|
|
37
37
|
|
|
38
38
|
[lint]
|
|
39
39
|
# Rules URL: https://docs.astral.sh/ruff/rules
|
|
@@ -63,6 +63,6 @@ max-complexity = 10
|
|
|
63
63
|
|
|
64
64
|
[format]
|
|
65
65
|
quote-style = "double"
|
|
66
|
-
indent-style = "
|
|
66
|
+
indent-style = "space"
|
|
67
67
|
skip-magic-trailing-comma = false
|
|
68
68
|
line-ending = "auto"
|