symbolicai 1.5.0__tar.gz → 1.6.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.5.0 → symbolicai-1.6.0}/AGENTS.md +1 -1
- {symbolicai-1.5.0 → symbolicai-1.6.0}/PKG-INFO +2 -9
- {symbolicai-1.5.0 → symbolicai-1.6.0}/README.md +1 -4
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/ENGINES/drawing_engine.md +43 -1
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/ENGINES/neurosymbolic_engine.md +25 -1
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/INSTALLATION.md +1 -4
- {symbolicai-1.5.0 → symbolicai-1.6.0}/pyproject.toml +0 -1
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/__init__.py +21 -71
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/base.py +0 -26
- symbolicai-1.6.0/symai/backend/engines/drawing/engine_gemini_image.py +101 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/embedding/engine_openai.py +11 -8
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/neurosymbolic/__init__.py +8 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/neurosymbolic/engine_google_geminiX_reasoning.py +14 -1
- symbolicai-1.6.0/symai/backend/engines/neurosymbolic/engine_openrouter.py +294 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/mixin/__init__.py +4 -0
- symbolicai-1.6.0/symai/backend/mixin/openrouter.py +2 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/components.py +203 -13
- symbolicai-1.6.0/symai/extended/interfaces/nanobanana.py +23 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/interfaces.py +2 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/ops/primitives.py +0 -18
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/shellsv.py +2 -7
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symbolicai.egg-info/PKG-INFO +2 -9
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symbolicai.egg-info/SOURCES.txt +4 -4
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symbolicai.egg-info/requires.txt +0 -5
- {symbolicai-1.5.0 → symbolicai-1.6.0}/uv.lock +10 -1548
- symbolicai-1.5.0/symai/collect/__init__.py +0 -8
- symbolicai-1.5.0/symai/collect/dynamic.py +0 -117
- symbolicai-1.5.0/symai/collect/pipeline.py +0 -156
- symbolicai-1.5.0/symai/collect/stats.py +0 -434
- {symbolicai-1.5.0 → symbolicai-1.6.0}/.gitbook.yaml +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/.github/FUNDING.yml +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/.gitignore +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/.symai/symsh.config.json +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/CITATION.cff +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/Dockerfile +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/LICENSE +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/MANIFEST.in +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/app.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/images/banner.png +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/images/cat.jpg +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/images/cat.png +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/images/contract_flow.png +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/images/img1.png +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/images/img10.png +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/images/img2.png +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/images/img3.png +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/images/img4.png +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/images/img5.png +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/images/img6.png +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/images/img7.png +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/images/img8.png +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/images/img9.png +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/images/preview.gif +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/images/screen1.jpeg +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/images/symai_logo.png +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/images/symsh.png +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/images/vid1.png +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/images/vid2.png +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/images/vid3.png +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/images/vid4.png +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/images/vid5.png +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/images/vid6.png +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/results/news.html +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/results/news.png +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/assets/results/news_prev.png +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/bin/install.ps1 +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/bin/install.sh +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/build.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docker-compose.yml +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/ENGINES/clip_engine.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/ENGINES/custom_engine.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/ENGINES/file_engine.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/ENGINES/indexing_engine.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/ENGINES/local_engine.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/ENGINES/ocr_engine.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/ENGINES/scrape_engine.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/ENGINES/search_engine.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/ENGINES/speech_to_text_engine.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/ENGINES/symbolic_engine.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/FEATURES/contracts.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/FEATURES/error_handling.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/FEATURES/expressions.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/FEATURES/import.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/FEATURES/operations.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/FEATURES/primitives.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/INTRODUCTION.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/QUICKSTART.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/SUMMARY.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/TOOLS/chatbot.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/TOOLS/packages.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/TOOLS/shell.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/TUTORIALS/chatbot.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/TUTORIALS/context.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/TUTORIALS/data_query.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/docs/source/TUTORIALS/video_tutorials.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/environment.yml +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/examples/contracts.ipynb +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/examples/primitives.ipynb +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/icon_converter.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/installer.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/legacy/notebooks/Basics.ipynb +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/legacy/notebooks/ChatBot.ipynb +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/legacy/notebooks/Conversation.ipynb +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/legacy/notebooks/Indexer.ipynb +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/legacy/notebooks/News.ipynb +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/legacy/notebooks/Queries.ipynb +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/legacy/notebooks/TTS_Persona.ipynb +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/legacy/notebooks/examples/Lean engine.png +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/legacy/notebooks/examples/a_star.txt +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/legacy/notebooks/examples/abstract.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/legacy/notebooks/examples/audio.mp3 +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/legacy/notebooks/examples/dbpedia_samples.jsonl +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/legacy/notebooks/examples/dbpedia_samples_prepared_train.jsonl +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/legacy/notebooks/examples/dbpedia_samples_prepared_valid.jsonl +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/legacy/notebooks/examples/demo.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/legacy/notebooks/examples/demo_strategy.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/legacy/notebooks/examples/docs.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/legacy/notebooks/examples/einsteins_puzzle.txt +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/legacy/notebooks/examples/file.json +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/legacy/notebooks/examples/lean.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/legacy/notebooks/examples/news.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/legacy/notebooks/examples/paper.pdf +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/legacy/notebooks/examples/paper.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/legacy/notebooks/examples/sql.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/public/eai.svg +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/pytest.ini +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/ruff.toml +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/setup.cfg +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/setup.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/TERMS_OF_SERVICE.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/__init__.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/__init__.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/drawing/engine_bfl.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/drawing/engine_gpt_image.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/embedding/engine_llama_cpp.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/execute/engine_python.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/files/engine_io.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/imagecaptioning/engine_blip2.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/imagecaptioning/engine_llavacpp_client.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/index/engine_pinecone.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/index/engine_qdrant.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/index/engine_vectordb.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/lean/engine_lean4.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/neurosymbolic/engine_anthropic_claudeX_chat.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/neurosymbolic/engine_anthropic_claudeX_reasoning.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/neurosymbolic/engine_cerebras.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/neurosymbolic/engine_deepseekX_reasoning.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/neurosymbolic/engine_groq.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/neurosymbolic/engine_huggingface.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/neurosymbolic/engine_llama_cpp.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/neurosymbolic/engine_openai_gptX_chat.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/neurosymbolic/engine_openai_gptX_reasoning.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/neurosymbolic/engine_openai_responses.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/ocr/engine_apilayer.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/output/engine_stdout.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/scrape/engine_requests.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/search/__init__.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/search/engine_firecrawl.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/search/engine_openai.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/search/engine_parallel.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/search/engine_perplexity.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/search/engine_serpapi.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/speech_to_text/engine_local_whisper.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/symbolic/engine_wolframalpha.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/text_to_speech/engine_openai.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/text_vision/engine_clip.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/engines/userinput/engine_console.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/mixin/anthropic.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/mixin/cerebras.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/mixin/deepseek.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/mixin/google.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/mixin/groq.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/mixin/openai.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/backend/settings.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/chat.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/constraints.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/context.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/core.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/core_ext.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/endpoints/__init__py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/endpoints/api.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/exceptions.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/.DS_Store +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/__init__.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/api_builder.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/arxiv_pdf_parser.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/bibtex_parser.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/conversation.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/document.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/file_merger.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/graph.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/html_style_template.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/interfaces/__init__.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/interfaces/blip_2.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/interfaces/clip.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/interfaces/console.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/interfaces/dall_e.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/interfaces/file.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/interfaces/firecrawl.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/interfaces/flux.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/interfaces/gpt_image.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/interfaces/input.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/interfaces/llava.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/interfaces/local_search.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/interfaces/naive_scrape.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/interfaces/naive_vectordb.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/interfaces/ocr.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/interfaces/openai_search.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/interfaces/parallel.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/interfaces/perplexity.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/interfaces/pinecone.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/interfaces/python.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/interfaces/serpapi.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/interfaces/terminal.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/interfaces/tts.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/interfaces/whisper.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/interfaces/wolframalpha.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/metrics/__init__.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/metrics/similarity.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/os_command.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/packages/__init__.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/packages/symdev.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/packages/sympkg.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/packages/symrun.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/repo_cloner.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/seo_query_optimizer.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/solver.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/summarizer.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/taypan_interpreter.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/extended/vectordb.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/formatter/__init__.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/formatter/emoji.pytxt +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/formatter/formatter.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/formatter/regex.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/functional.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/imports.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/memory.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/menu/__init__.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/menu/screen.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/misc/__init__.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/misc/console.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/misc/loader.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/models/__init__.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/models/base.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/models/errors.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/ops/__init__.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/ops/measures.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/post_processors.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/pre_processors.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/processor.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/prompts.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/server/__init__.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/server/huggingface_server.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/server/llama_cpp_server.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/server/qdrant_server.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/shell.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/strategy.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/symbol.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/symsh.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symai/utils.py +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symbolicai.egg-info/dependency_links.txt +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symbolicai.egg-info/entry_points.txt +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/symbolicai.egg-info/top_level.txt +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/tests/README.md +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/tests/data/audio.mp3 +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/tests/data/pg1727.txt +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/tests/data/symmetry_breaking.pdf +0 -0
- {symbolicai-1.5.0 → symbolicai-1.6.0}/trusted_repos.yml +0 -0
|
@@ -53,7 +53,7 @@ CLI entrypoints (after install): `symchat`, `symsh`, `symconfig`, `symserver`.
|
|
|
53
53
|
|
|
54
54
|
## Configuration & Secrets
|
|
55
55
|
- Config precedence: `./symai.config.json`, `{venv}/.symai/symai.config.json`, then `~/.symai/symai.config.json`.
|
|
56
|
-
- Common keys: `NEUROSYMBOLIC_ENGINE_MODEL`, `NEUROSYMBOLIC_ENGINE_API_KEY`, `SYMAI_WARNINGS=0
|
|
56
|
+
- Common keys: `NEUROSYMBOLIC_ENGINE_MODEL`, `NEUROSYMBOLIC_ENGINE_API_KEY`, `SYMAI_WARNINGS=0`.
|
|
57
57
|
- Inspect active config with `symconfig`.
|
|
58
58
|
- Never commit API keys, tokens, or generated artifacts (`dist/`, caches, logs).
|
|
59
59
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: symbolicai
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.6.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
|
|
@@ -88,10 +88,6 @@ Requires-Dist: llvmlite>=0.45.1
|
|
|
88
88
|
Requires-Dist: cerebras-cloud-sdk>=1.59.0
|
|
89
89
|
Provides-Extra: bitsandbytes
|
|
90
90
|
Requires-Dist: bitsandbytes>=0.43.1; extra == "bitsandbytes"
|
|
91
|
-
Provides-Extra: blip2
|
|
92
|
-
Requires-Dist: decord>=0.6.0; extra == "blip2"
|
|
93
|
-
Requires-Dist: salesforce-lavis>=1.0.0; extra == "blip2"
|
|
94
|
-
Requires-Dist: opencv-python-headless>=4.5.5.64; extra == "blip2"
|
|
95
91
|
Provides-Extra: hf
|
|
96
92
|
Requires-Dist: transformers>=4.45.2; extra == "hf"
|
|
97
93
|
Requires-Dist: accelerate>=0.33.0; extra == "hf"
|
|
@@ -425,15 +421,12 @@ Example of a configuration file with all engines enabled:
|
|
|
425
421
|
"VISION_ENGINE_MODEL": "openai/clip-vit-base-patch32",
|
|
426
422
|
"OCR_ENGINE_API_KEY": "<APILAYER_API_KEY>",
|
|
427
423
|
"SPEECH_TO_TEXT_ENGINE_MODEL": "turbo",
|
|
428
|
-
"SPEECH_TO_TEXT_API_KEY": ""
|
|
429
|
-
"SUPPORT_COMMUNITY": true
|
|
424
|
+
"SPEECH_TO_TEXT_API_KEY": ""
|
|
430
425
|
}
|
|
431
426
|
```
|
|
432
427
|
|
|
433
428
|
With these steps completed, you should be ready to start using SymbolicAI in your projects.
|
|
434
429
|
|
|
435
|
-
> ❗️**NOTE**❗️Our framework allows you to support us train models for local usage by enabling the data collection feature. On application startup we show the terms of services and you can activate or disable this community feature. We do not share or sell your data to 3rd parties and only use the data for research purposes and to improve your user experience. To change this setting open the `symai.config.json` and turn it on/off by setting the `SUPPORT_COMMUNITY` property to `True/False` via the config file or the respective environment variable.
|
|
436
|
-
|
|
437
430
|
> ❗️**NOTE**❗️By default, the user warnings are enabled. To disable them, export `SYMAI_WARNINGS=0` in your environment variables.
|
|
438
431
|
|
|
439
432
|
### Running tests
|
|
@@ -282,15 +282,12 @@ Example of a configuration file with all engines enabled:
|
|
|
282
282
|
"VISION_ENGINE_MODEL": "openai/clip-vit-base-patch32",
|
|
283
283
|
"OCR_ENGINE_API_KEY": "<APILAYER_API_KEY>",
|
|
284
284
|
"SPEECH_TO_TEXT_ENGINE_MODEL": "turbo",
|
|
285
|
-
"SPEECH_TO_TEXT_API_KEY": ""
|
|
286
|
-
"SUPPORT_COMMUNITY": true
|
|
285
|
+
"SPEECH_TO_TEXT_API_KEY": ""
|
|
287
286
|
}
|
|
288
287
|
```
|
|
289
288
|
|
|
290
289
|
With these steps completed, you should be ready to start using SymbolicAI in your projects.
|
|
291
290
|
|
|
292
|
-
> ❗️**NOTE**❗️Our framework allows you to support us train models for local usage by enabling the data collection feature. On application startup we show the terms of services and you can activate or disable this community feature. We do not share or sell your data to 3rd parties and only use the data for research purposes and to improve your user experience. To change this setting open the `symai.config.json` and turn it on/off by setting the `SUPPORT_COMMUNITY` property to `True/False` via the config file or the respective environment variable.
|
|
293
|
-
|
|
294
291
|
> ❗️**NOTE**❗️By default, the user warnings are enabled. To disable them, export `SYMAI_WARNINGS=0` in your environment variables.
|
|
295
292
|
|
|
296
293
|
### Running tests
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# Drawing Engine
|
|
2
2
|
|
|
3
|
-
We now expose
|
|
3
|
+
We now expose three distinct high-level drawing interfaces:
|
|
4
4
|
|
|
5
5
|
1. **`gpt_image`** – a unified wrapper around OpenAI’s Images API (DALL·E 2/3 and `gpt-image-*`).
|
|
6
6
|
2. **`flux`** – Black Forest Labs’ Flux text-to-image models via api.us1.bfl.ai.
|
|
7
|
+
3. **`nanobanana`** – Google Gemini image generation models via `google-genai`.
|
|
7
8
|
|
|
8
9
|
Both return a list of local PNG file paths.
|
|
9
10
|
|
|
@@ -153,3 +154,44 @@ Under the hood Flux uses:
|
|
|
153
154
|
- GET `https://api.us1.bfl.ai/v1/get_result?id={request_id}`
|
|
154
155
|
|
|
155
156
|
and writes out local PNG file(s).
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## 3. Google “nanobanana” (Gemini Image) Interface
|
|
161
|
+
|
|
162
|
+
Use `Interface("nanobanana")` to generate images with Gemini image models (via the `google-genai` SDK).
|
|
163
|
+
This interface currently supports **create-only** generation.
|
|
164
|
+
|
|
165
|
+
Supported models (as of this release):
|
|
166
|
+
- `gemini-2.5-flash-image`
|
|
167
|
+
- `gemini-3-pro-image-preview`
|
|
168
|
+
|
|
169
|
+
```python
|
|
170
|
+
from symai.interfaces import Interface
|
|
171
|
+
|
|
172
|
+
nanobanana = Interface("nanobanana")
|
|
173
|
+
|
|
174
|
+
paths = nanobanana(
|
|
175
|
+
"a fluffy cat with a cowboy hat",
|
|
176
|
+
operation="create", # currently only 'create' is implemented
|
|
177
|
+
model="gemini-2.5-flash-image",
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
print(paths[0]) # → /tmp/tmpabcd.png
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Supported Parameters
|
|
184
|
+
|
|
185
|
+
- `prompt` (str)
|
|
186
|
+
- `operation` (`"create"`)
|
|
187
|
+
- `model` (str, default from `SYMAI_CONFIG["DRAWING_ENGINE_MODEL"]`)
|
|
188
|
+
- `response_modalities` (list[str], default `["IMAGE"]`)
|
|
189
|
+
- `config` (optional): a `google.genai.types.GenerateContentConfig` instance
|
|
190
|
+
- `except_remedy` (callable)
|
|
191
|
+
|
|
192
|
+
### Configuration
|
|
193
|
+
|
|
194
|
+
Set these keys in `symai.config.json` (or via your preferred config location):
|
|
195
|
+
|
|
196
|
+
- `DRAWING_ENGINE_API_KEY`: your Gemini API key
|
|
197
|
+
- `DRAWING_ENGINE_MODEL`: one of the supported Gemini image model names, e.g. `gemini-2.5-flash-image`
|
|
@@ -8,6 +8,7 @@ Depending on which backend you configure (OpenAI/GPT, Claude, Gemini, Deepseek,
|
|
|
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
10
|
* Cerebras engine requires a special format for the `NEUROSYMBOLIC_ENGINE_MODEL` key: `cerebras:model_id`. E.g., `cerebras:gpt-oss-120b`.
|
|
11
|
+
* OpenRouter engine requires a special format for the `NEUROSYMBOLIC_ENGINE_MODEL` key: `openrouter:model_id`. E.g., `openrouter:moonshotai/kimi-k2.5`.
|
|
11
12
|
* OpenAI Responses API engine requires the `responses:` prefix: `responses:model_id`. E.g., `responses:gpt-4.1`, `responses:o3-mini`. This uses OpenAI's newer `/v1/responses` endpoint instead of `/v1/chat/completions`.
|
|
12
13
|
* Token‐truncation and streaming are handled automatically but may vary in behavior by engine.
|
|
13
14
|
|
|
@@ -209,6 +210,23 @@ print(metadata["thinking"])
|
|
|
209
210
|
|
|
210
211
|
For OpenAI Responses API with reasoning models (e.g., `o3-mini`, `o3`, `o4-mini`, `gpt-5`, `gpt-5.1`), the thinking trace is extracted from the reasoning summary in the response output.
|
|
211
212
|
|
|
213
|
+
### OpenRouter
|
|
214
|
+
|
|
215
|
+
```python
|
|
216
|
+
from symai import Symbol
|
|
217
|
+
|
|
218
|
+
# openrouter:moonshotai/kimi-k2.5
|
|
219
|
+
res, metadata = Symbol("Topic: Disneyland") \
|
|
220
|
+
.query(
|
|
221
|
+
"Write a dystopic take on the topic.",
|
|
222
|
+
return_metadata=True
|
|
223
|
+
)
|
|
224
|
+
print(res)
|
|
225
|
+
print(metadata.get("thinking", "No thinking trace available"))
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
OpenRouter backends provide access to multiple model providers through a unified API gateway. The engine automatically handles model routing and supports provider-specific features when available. Token counting is not implemented for OpenRouter models, similar to Groq and Cerebras engines.
|
|
229
|
+
|
|
212
230
|
---
|
|
213
231
|
|
|
214
232
|
## JSON‐Only Responses
|
|
@@ -264,7 +282,13 @@ print(Symbol(string).tokens)
|
|
|
264
282
|
### Tracking Usage and Estimating Costs with `MetadataTracker`
|
|
265
283
|
|
|
266
284
|
For more detailed tracking of API calls, token usage, and estimating costs, you can use the `MetadataTracker` in conjunction with `RuntimeInfo`. This is particularly useful for monitoring multiple calls within a specific code block.
|
|
267
|
-
> ❗️**NOTE
|
|
285
|
+
> ❗️**NOTE**❗️`MetadataTracker` collects raw per-call metadata for any `Engine`, but **token usage extraction** (i.e. `tracker.usage` → `RuntimeInfo`) is currently implemented for:
|
|
286
|
+
>
|
|
287
|
+
> - **OpenAI**: `GPTXChatEngine`, `GPTXReasoningEngine`, `OpenAIResponsesEngine`, `GPTXSearchEngine` (eg. `gpt-5-chat-latest`)
|
|
288
|
+
> - **Claude (Anthropic)**: `ClaudeXChatEngine`, `ClaudeXReasoningEngine` (eg. `claude-sonnet-4-5`)
|
|
289
|
+
> - **Gemini (Google)**: `GeminiXReasoningEngine` (e.g. `gemini-2.5-pro`, `gemini-2.5-flash`)
|
|
290
|
+
>
|
|
291
|
+
> For other engines, `tracker.metadata` will still contain raw outputs, but `tracker.usage` may be empty or partial.
|
|
268
292
|
|
|
269
293
|
`MetadataTracker` collects metadata from engine calls made within its context. `RuntimeInfo` then processes this raw metadata to provide a summary of token counts, number of API calls, elapsed time, and an estimated cost if pricing information is provided.
|
|
270
294
|
|
|
@@ -144,15 +144,12 @@ Example of a configuration file with all engines enabled:
|
|
|
144
144
|
"VISION_ENGINE_MODEL": "openai/clip-vit-base-patch32",
|
|
145
145
|
"OCR_ENGINE_API_KEY": "<APILAYER_API_KEY>",
|
|
146
146
|
"SPEECH_TO_TEXT_ENGINE_MODEL": "turbo",
|
|
147
|
-
"SPEECH_TO_TEXT_API_KEY": ""
|
|
148
|
-
"SUPPORT_COMMUNITY": true
|
|
147
|
+
"SPEECH_TO_TEXT_API_KEY": ""
|
|
149
148
|
}
|
|
150
149
|
```
|
|
151
150
|
|
|
152
151
|
With these steps completed, you should be ready to start using SymbolicAI in your projects.
|
|
153
152
|
|
|
154
|
-
> ❗️**NOTE**❗️Our framework allows you to support us train models for local usage by enabling the data collection feature. On application startup we show the terms of services and you can activate or disable this community feature. We do not share or sell your data to 3rd parties and only use the data for research purposes and to improve your user experience. To change this setting open the `symai.config.json` and turn it on/off by setting the `SUPPORT_COMMUNITY` property to `True/False` via the config file or the respective environment variable.
|
|
155
|
-
|
|
156
153
|
> ❗️**NOTE**❗️By default, the user warnings are enabled. To disable them, export `SYMAI_WARNINGS=0` in your environment variables.
|
|
157
154
|
|
|
158
155
|
### Running tests
|
|
@@ -72,7 +72,6 @@ dependencies = [
|
|
|
72
72
|
|
|
73
73
|
[project.optional-dependencies]
|
|
74
74
|
bitsandbytes = ["bitsandbytes>=0.43.1"] # handle separately because of Apple Silicon
|
|
75
|
-
blip2 = ["decord>=0.6.0", "salesforce-lavis>=1.0.0", "opencv-python-headless>=4.5.5.64"]
|
|
76
75
|
hf = ["transformers>=4.45.2", "accelerate>=0.33.0", "peft>=0.13.1", "datasets>=3.0.1", "trl>=0.11.3"]
|
|
77
76
|
scrape = ["beautifulsoup4>=4.12.3", "trafilatura>=2.0.0", "pdfminer.six", "playwright>=1.45.0", "parallel-web>=0.3.3"]
|
|
78
77
|
llama_cpp = ["llama-cpp-python[server]>=0.3.7"] # handle separately since this dependency may not compile and require special maintenance
|
|
@@ -11,8 +11,6 @@ from rich.table import Table
|
|
|
11
11
|
from rich.tree import Tree
|
|
12
12
|
|
|
13
13
|
from .backend import settings
|
|
14
|
-
from .menu.screen import show_intro_menu
|
|
15
|
-
from .misc.console import ConsoleStyle
|
|
16
14
|
from .utils import UserMessage
|
|
17
15
|
|
|
18
16
|
# do not remove - hides the libraries' debug messages
|
|
@@ -33,7 +31,7 @@ os.environ["TOKENIZERS_PARALLELISM"] = "false"
|
|
|
33
31
|
# Create singleton instance
|
|
34
32
|
config_manager = settings.SymAIConfig()
|
|
35
33
|
|
|
36
|
-
SYMAI_VERSION = "1.
|
|
34
|
+
SYMAI_VERSION = "1.6.0"
|
|
37
35
|
__version__ = SYMAI_VERSION
|
|
38
36
|
__root_dir__ = config_manager.config_dir
|
|
39
37
|
|
|
@@ -87,20 +85,6 @@ def _start_symai():
|
|
|
87
85
|
# Load and manage configurations
|
|
88
86
|
symai_config = config_manager.load_config("symai.config.json")
|
|
89
87
|
|
|
90
|
-
# MIGRATE THE ENVIRONMENT VARIABLES
|
|
91
|
-
# *==========================================================================================================*
|
|
92
|
-
if "COLLECTION_URI" not in symai_config:
|
|
93
|
-
updates = {
|
|
94
|
-
"COLLECTION_URI": "mongodb+srv://User:vt3epocXitd6WlQ6@extensityai.c1ajxxy.mongodb.net/?retryWrites=true&w=majority",
|
|
95
|
-
"COLLECTION_DB": "ExtensityAI",
|
|
96
|
-
"COLLECTION_STORAGE": "SymbolicAI",
|
|
97
|
-
"SUPPORT_COMMUNITY": False,
|
|
98
|
-
}
|
|
99
|
-
config_manager.migrate_config("symai.config.json", updates)
|
|
100
|
-
with ConsoleStyle("info") as console:
|
|
101
|
-
msg = "Currently you are sharing your user experience with us by uploading the data to our research server, and thereby helping us improve future models and the overall SymbolicAI experience. We thank you very much for supporting the research community! If you wish to disable the data collection option go to your .symai config situated in your home directory or set the environment variable `SUPPORT_COMMUNITY` to `False`."
|
|
102
|
-
console.print(msg)
|
|
103
|
-
|
|
104
88
|
# POST-MIGRATION CHECKS
|
|
105
89
|
# *==============================================================================================================*
|
|
106
90
|
if "TEXT_TO_SPEECH_ENGINE_API_KEY" not in symai_config:
|
|
@@ -114,11 +98,6 @@ def _start_symai():
|
|
|
114
98
|
symsh_config = config_manager.load_config("symsh.config.json")
|
|
115
99
|
symserver_config = config_manager.load_config("symserver.config.json")
|
|
116
100
|
|
|
117
|
-
# MIGRATE THE SHELL SPLASH SCREEN CONFIGURATION
|
|
118
|
-
# *==============================================================================================================*
|
|
119
|
-
if "show-splash-screen" not in symsh_config:
|
|
120
|
-
config_manager.migrate_config("symsh.config.json", {"show-splash-screen": True})
|
|
121
|
-
|
|
122
101
|
# CHECK IF THE USER HAS A NEUROSYMBOLIC API KEY
|
|
123
102
|
# *==============================================================================================================*
|
|
124
103
|
if not (
|
|
@@ -130,7 +109,6 @@ def _start_symai():
|
|
|
130
109
|
):
|
|
131
110
|
# Try to fallback to the global (home) config if environment is not home
|
|
132
111
|
if config_manager.config_dir != config_manager._home_config_dir:
|
|
133
|
-
show_intro_menu()
|
|
134
112
|
UserMessage(
|
|
135
113
|
f"You didn't configure your environment ({config_manager.config_dir})! Falling back to the global ({config_manager._home_config_dir}) configuration if it exists."
|
|
136
114
|
)
|
|
@@ -345,57 +323,29 @@ def display_config():
|
|
|
345
323
|
|
|
346
324
|
|
|
347
325
|
def setup_wizard(_symai_config_path_):
|
|
348
|
-
show_intro_menu()
|
|
349
|
-
|
|
350
|
-
_nesy_engine_api_key = ""
|
|
351
|
-
_nesy_engine_model = ""
|
|
352
|
-
_symbolic_engine_api_key = ""
|
|
353
|
-
_symbolic_engine_model = ""
|
|
354
|
-
_embedding_engine_api_key = ""
|
|
355
|
-
_embedding_model = ""
|
|
356
|
-
_drawing_engine_api_key = ""
|
|
357
|
-
_drawing_engine_model = ""
|
|
358
|
-
_vision_engine_model = ""
|
|
359
|
-
_search_engine_api_key = ""
|
|
360
|
-
_search_engine_model = ""
|
|
361
|
-
_ocr_engine_api_key = ""
|
|
362
|
-
_speech_to_text_engine_model = ""
|
|
363
|
-
_speech_to_text_api_key = ""
|
|
364
|
-
_text_to_speech_engine_api_key = ""
|
|
365
|
-
_text_to_speech_engine_model = ""
|
|
366
|
-
_text_to_speech_engine_voice = ""
|
|
367
|
-
_indexing_engine_api_key = ""
|
|
368
|
-
_indexing_engine_environment = ""
|
|
369
|
-
_caption_engine_environment = ""
|
|
370
|
-
_support_comminity = False
|
|
371
|
-
|
|
372
326
|
config_manager.save_config(
|
|
373
327
|
_symai_config_path_,
|
|
374
328
|
{
|
|
375
|
-
"NEUROSYMBOLIC_ENGINE_API_KEY":
|
|
376
|
-
"NEUROSYMBOLIC_ENGINE_MODEL":
|
|
377
|
-
"SYMBOLIC_ENGINE_API_KEY":
|
|
378
|
-
"SYMBOLIC_ENGINE":
|
|
379
|
-
"EMBEDDING_ENGINE_API_KEY":
|
|
380
|
-
"EMBEDDING_ENGINE_MODEL":
|
|
381
|
-
"DRAWING_ENGINE_API_KEY":
|
|
382
|
-
"DRAWING_ENGINE_MODEL":
|
|
383
|
-
"VISION_ENGINE_MODEL":
|
|
384
|
-
"SEARCH_ENGINE_API_KEY":
|
|
385
|
-
"SEARCH_ENGINE_MODEL":
|
|
386
|
-
"OCR_ENGINE_API_KEY":
|
|
387
|
-
"SPEECH_TO_TEXT_ENGINE_MODEL":
|
|
388
|
-
"SPEECH_TO_TEXT_API_KEY":
|
|
389
|
-
"TEXT_TO_SPEECH_ENGINE_API_KEY":
|
|
390
|
-
"TEXT_TO_SPEECH_ENGINE_MODEL":
|
|
391
|
-
"TEXT_TO_SPEECH_ENGINE_VOICE":
|
|
392
|
-
"INDEXING_ENGINE_API_KEY":
|
|
393
|
-
"INDEXING_ENGINE_ENVIRONMENT":
|
|
394
|
-
"CAPTION_ENGINE_MODEL":
|
|
395
|
-
"COLLECTION_URI": "mongodb+srv://User:vt3epocXitd6WlQ6@extensityai.c1ajxxy.mongodb.net/?retryWrites=true&w=majority",
|
|
396
|
-
"COLLECTION_DB": "ExtensityAI",
|
|
397
|
-
"COLLECTION_STORAGE": "SymbolicAI",
|
|
398
|
-
"SUPPORT_COMMUNITY": _support_comminity,
|
|
329
|
+
"NEUROSYMBOLIC_ENGINE_API_KEY": "",
|
|
330
|
+
"NEUROSYMBOLIC_ENGINE_MODEL": "",
|
|
331
|
+
"SYMBOLIC_ENGINE_API_KEY": "",
|
|
332
|
+
"SYMBOLIC_ENGINE": "",
|
|
333
|
+
"EMBEDDING_ENGINE_API_KEY": "",
|
|
334
|
+
"EMBEDDING_ENGINE_MODEL": "",
|
|
335
|
+
"DRAWING_ENGINE_API_KEY": "",
|
|
336
|
+
"DRAWING_ENGINE_MODEL": "",
|
|
337
|
+
"VISION_ENGINE_MODEL": "",
|
|
338
|
+
"SEARCH_ENGINE_API_KEY": "",
|
|
339
|
+
"SEARCH_ENGINE_MODEL": "",
|
|
340
|
+
"OCR_ENGINE_API_KEY": "",
|
|
341
|
+
"SPEECH_TO_TEXT_ENGINE_MODEL": "",
|
|
342
|
+
"SPEECH_TO_TEXT_API_KEY": "",
|
|
343
|
+
"TEXT_TO_SPEECH_ENGINE_API_KEY": "",
|
|
344
|
+
"TEXT_TO_SPEECH_ENGINE_MODEL": "",
|
|
345
|
+
"TEXT_TO_SPEECH_ENGINE_VOICE": "",
|
|
346
|
+
"INDEXING_ENGINE_API_KEY": "",
|
|
347
|
+
"INDEXING_ENGINE_ENVIRONMENT": "",
|
|
348
|
+
"CAPTION_ENGINE_MODEL": "",
|
|
399
349
|
},
|
|
400
350
|
)
|
|
401
351
|
|
|
@@ -3,21 +3,11 @@ import time
|
|
|
3
3
|
from abc import ABC, abstractmethod
|
|
4
4
|
from typing import Any
|
|
5
5
|
|
|
6
|
-
from ..collect import CollectionRepository, rec_serialize
|
|
7
6
|
from ..utils import UserMessage
|
|
8
7
|
from .settings import HOME_PATH
|
|
9
8
|
|
|
10
9
|
ENGINE_UNREGISTERED = "<UNREGISTERED/>"
|
|
11
10
|
|
|
12
|
-
COLLECTION_LOGGING_ENGINES = {
|
|
13
|
-
"GPTXChatEngine",
|
|
14
|
-
"GPTXCompletionEngine",
|
|
15
|
-
"SerpApiEngine",
|
|
16
|
-
"WolframAlphaEngine",
|
|
17
|
-
"SeleniumEngine",
|
|
18
|
-
"OCREngine",
|
|
19
|
-
}
|
|
20
|
-
|
|
21
11
|
|
|
22
12
|
class Engine(ABC):
|
|
23
13
|
def __init__(self) -> None:
|
|
@@ -26,8 +16,6 @@ class Engine(ABC):
|
|
|
26
16
|
self.logging = False
|
|
27
17
|
self.log_level = logging.DEBUG
|
|
28
18
|
self.time_clock = False
|
|
29
|
-
self.collection = CollectionRepository()
|
|
30
|
-
self.collection.connect()
|
|
31
19
|
# create formatter
|
|
32
20
|
__root_dir__ = HOME_PATH
|
|
33
21
|
__root_dir__.mkdir(parents=True, exist_ok=True)
|
|
@@ -66,9 +54,6 @@ class Engine(ABC):
|
|
|
66
54
|
if self.logging:
|
|
67
55
|
self.logger.log(self.log_level, log)
|
|
68
56
|
|
|
69
|
-
if str(self) in COLLECTION_LOGGING_ENGINES:
|
|
70
|
-
self._record_collection_entry(argument, metadata, req_time)
|
|
71
|
-
|
|
72
57
|
self._trigger_output_handlers(argument, res, metadata)
|
|
73
58
|
return res, metadata
|
|
74
59
|
|
|
@@ -92,17 +77,6 @@ class Engine(ABC):
|
|
|
92
77
|
if argument_handler:
|
|
93
78
|
argument_handler((result, metadata))
|
|
94
79
|
|
|
95
|
-
def _record_collection_entry(self, argument: Any, metadata: dict, req_time: float) -> None:
|
|
96
|
-
self.collection.add(
|
|
97
|
-
forward={"args": rec_serialize(argument.args), "kwds": rec_serialize(argument.kwargs)},
|
|
98
|
-
engine=str(self),
|
|
99
|
-
metadata={
|
|
100
|
-
"time": req_time,
|
|
101
|
-
"data": rec_serialize(metadata),
|
|
102
|
-
"argument": rec_serialize(argument),
|
|
103
|
-
},
|
|
104
|
-
)
|
|
105
|
-
|
|
106
80
|
def id(self) -> str:
|
|
107
81
|
return ENGINE_UNREGISTERED
|
|
108
82
|
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import base64
|
|
2
|
+
import logging
|
|
3
|
+
import mimetypes
|
|
4
|
+
import tempfile
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
from google import genai
|
|
8
|
+
from google.genai import types
|
|
9
|
+
|
|
10
|
+
from ....symbol import Result
|
|
11
|
+
from ....utils import UserMessage
|
|
12
|
+
from ...base import Engine
|
|
13
|
+
from ...settings import SYMAI_CONFIG
|
|
14
|
+
|
|
15
|
+
logging.getLogger("google.genai").setLevel(logging.ERROR)
|
|
16
|
+
logging.getLogger("google_genai").propagate = False
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class GeminiImageResult(Result):
|
|
20
|
+
def __init__(self, value, **kwargs):
|
|
21
|
+
super().__init__(value, **kwargs)
|
|
22
|
+
paths = []
|
|
23
|
+
for candidate in getattr(value, "candidates", []) or []:
|
|
24
|
+
content = getattr(candidate, "content", None)
|
|
25
|
+
parts = getattr(content, "parts", []) if content else []
|
|
26
|
+
for part in parts:
|
|
27
|
+
inline_data = getattr(part, "inline_data", None)
|
|
28
|
+
if inline_data is None:
|
|
29
|
+
continue
|
|
30
|
+
mime_type = getattr(inline_data, "mime_type", None) or "image/png"
|
|
31
|
+
data = getattr(inline_data, "data", None)
|
|
32
|
+
if data is None:
|
|
33
|
+
continue
|
|
34
|
+
if isinstance(data, str):
|
|
35
|
+
data = base64.b64decode(data)
|
|
36
|
+
suffix = mimetypes.guess_extension(mime_type) or ".png"
|
|
37
|
+
with tempfile.NamedTemporaryFile(suffix=suffix, delete=False) as tmp_file:
|
|
38
|
+
path = tmp_file.name
|
|
39
|
+
with Path(path).open("wb") as f:
|
|
40
|
+
f.write(data)
|
|
41
|
+
paths.append(path)
|
|
42
|
+
if not paths:
|
|
43
|
+
UserMessage("Gemini image generation returned no images.", raise_with=ValueError)
|
|
44
|
+
self._value = paths
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class GeminiImageEngine(Engine):
|
|
48
|
+
def __init__(self, api_key: str | None = None, model: str | None = None):
|
|
49
|
+
super().__init__()
|
|
50
|
+
self.config = SYMAI_CONFIG
|
|
51
|
+
self.api_key = self.config.get("DRAWING_ENGINE_API_KEY") if api_key is None else api_key
|
|
52
|
+
self.model = self.config.get("DRAWING_ENGINE_MODEL") if model is None else model
|
|
53
|
+
self.name = self.__class__.__name__
|
|
54
|
+
self.client = genai.Client(api_key=self.api_key)
|
|
55
|
+
|
|
56
|
+
def id(self) -> str:
|
|
57
|
+
cfg_model = self.config.get("DRAWING_ENGINE_MODEL")
|
|
58
|
+
if cfg_model and cfg_model.startswith(("gemini-2.5-flash-image", "gemini-3-pro-image-preview")):
|
|
59
|
+
return "drawing"
|
|
60
|
+
return super().id()
|
|
61
|
+
|
|
62
|
+
def command(self, *args, **kwargs):
|
|
63
|
+
super().command(*args, **kwargs)
|
|
64
|
+
if "DRAWING_ENGINE_API_KEY" in kwargs:
|
|
65
|
+
self.api_key = kwargs["DRAWING_ENGINE_API_KEY"]
|
|
66
|
+
self.client = genai.Client(api_key=self.api_key)
|
|
67
|
+
if "DRAWING_ENGINE_MODEL" in kwargs:
|
|
68
|
+
self.model = kwargs["DRAWING_ENGINE_MODEL"]
|
|
69
|
+
|
|
70
|
+
def prepare(self, argument):
|
|
71
|
+
argument.prop.prepared_input = str(argument.prop.processed_input)
|
|
72
|
+
|
|
73
|
+
def forward(self, argument):
|
|
74
|
+
prompt = argument.prop.prepared_input
|
|
75
|
+
kwargs = argument.kwargs
|
|
76
|
+
model = kwargs.get("model", self.model)
|
|
77
|
+
operation = kwargs.get("operation")
|
|
78
|
+
|
|
79
|
+
if operation != "create":
|
|
80
|
+
UserMessage(f"Unknown operation: {operation}", raise_with=ValueError)
|
|
81
|
+
|
|
82
|
+
response_modalities = kwargs.get("response_modalities", ["IMAGE"])
|
|
83
|
+
config = kwargs.get("config")
|
|
84
|
+
if config is None:
|
|
85
|
+
config = types.GenerateContentConfig(response_modalities=response_modalities)
|
|
86
|
+
|
|
87
|
+
except_remedy = kwargs.get("except_remedy", None)
|
|
88
|
+
try:
|
|
89
|
+
res = self.client.models.generate_content(
|
|
90
|
+
model=model,
|
|
91
|
+
contents=prompt,
|
|
92
|
+
config=config,
|
|
93
|
+
)
|
|
94
|
+
except Exception as e:
|
|
95
|
+
if except_remedy is None:
|
|
96
|
+
raise
|
|
97
|
+
res = except_remedy(self, e, None, argument)
|
|
98
|
+
|
|
99
|
+
metadata = {}
|
|
100
|
+
result = GeminiImageResult(res)
|
|
101
|
+
return [result], metadata
|
|
@@ -20,25 +20,28 @@ class EmbeddingEngine(Engine, OpenAIMixin):
|
|
|
20
20
|
logger = logging.getLogger("openai")
|
|
21
21
|
logger.setLevel(logging.WARNING)
|
|
22
22
|
self.config = SYMAI_CONFIG
|
|
23
|
+
self._api_key = api_key or self.config.get("EMBEDDING_ENGINE_API_KEY")
|
|
24
|
+
self._model = model or self.config.get("EMBEDDING_ENGINE_MODEL")
|
|
23
25
|
if self.id() != "embedding":
|
|
24
26
|
return # do not initialize if not embedding; avoids conflict with llama.cpp check in EngineRepository.register_from_package
|
|
25
|
-
|
|
26
|
-
self.
|
|
27
|
+
# Use openai client instance (required for openai 1.0+)
|
|
28
|
+
self._client = openai.OpenAI(api_key=self._api_key)
|
|
29
|
+
self.model = self._model
|
|
27
30
|
self.max_tokens = self.api_max_context_tokens()
|
|
28
31
|
self.embedding_dim = self.api_embedding_dims()
|
|
29
32
|
self.name = self.__class__.__name__
|
|
30
33
|
|
|
31
34
|
def id(self) -> str:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
].startswith("text-embedding"):
|
|
35
|
+
# Check stored params (from constructor or config)
|
|
36
|
+
if self._api_key and self._model and self._model.startswith("text-embedding"):
|
|
35
37
|
return "embedding"
|
|
36
38
|
return super().id() # default to unregistered
|
|
37
39
|
|
|
38
40
|
def command(self, *args, **kwargs):
|
|
39
41
|
super().command(*args, **kwargs)
|
|
40
42
|
if "EMBEDDING_ENGINE_API_KEY" in kwargs:
|
|
41
|
-
|
|
43
|
+
self._api_key = kwargs["EMBEDDING_ENGINE_API_KEY"]
|
|
44
|
+
self._client = openai.OpenAI(api_key=self._api_key)
|
|
42
45
|
if "EMBEDDING_ENGINE_MODEL" in kwargs:
|
|
43
46
|
self.model = kwargs["EMBEDDING_ENGINE_MODEL"]
|
|
44
47
|
|
|
@@ -52,11 +55,11 @@ class EmbeddingEngine(Engine, OpenAIMixin):
|
|
|
52
55
|
new_dim = kwargs.get("new_dim")
|
|
53
56
|
|
|
54
57
|
try:
|
|
55
|
-
res =
|
|
58
|
+
res = self._client.embeddings.create(model=self.model, input=inp)
|
|
56
59
|
except Exception as e:
|
|
57
60
|
if except_remedy is None:
|
|
58
61
|
raise e
|
|
59
|
-
callback =
|
|
62
|
+
callback = self._client.embeddings.create
|
|
60
63
|
res = except_remedy(e, inp, callback, self, *args, **kwargs)
|
|
61
64
|
|
|
62
65
|
if new_dim:
|
|
@@ -12,6 +12,8 @@ from ...mixin import (
|
|
|
12
12
|
OPENAI_CHAT_MODELS,
|
|
13
13
|
OPENAI_REASONING_MODELS,
|
|
14
14
|
OPENAI_RESPONSES_MODELS,
|
|
15
|
+
OPENROUTER_CHAT_MODELS,
|
|
16
|
+
OPENROUTER_REASONING_MODELS,
|
|
15
17
|
)
|
|
16
18
|
from .engine_anthropic_claudeX_chat import ClaudeXChatEngine
|
|
17
19
|
from .engine_anthropic_claudeX_reasoning import ClaudeXReasoningEngine
|
|
@@ -19,6 +21,7 @@ from .engine_cerebras import CerebrasEngine
|
|
|
19
21
|
from .engine_deepseekX_reasoning import DeepSeekXReasoningEngine
|
|
20
22
|
from .engine_google_geminiX_reasoning import GeminiXReasoningEngine
|
|
21
23
|
from .engine_groq import GroqEngine
|
|
24
|
+
from .engine_openrouter import OpenRouterEngine
|
|
22
25
|
from .engine_openai_gptX_chat import GPTXChatEngine
|
|
23
26
|
from .engine_openai_gptX_reasoning import GPTXReasoningEngine
|
|
24
27
|
from .engine_openai_responses import OpenAIResponsesEngine
|
|
@@ -36,6 +39,8 @@ ENGINE_MAPPING = {
|
|
|
36
39
|
**dict.fromkeys(OPENAI_RESPONSES_MODELS, OpenAIResponsesEngine),
|
|
37
40
|
**dict.fromkeys(GROQ_CHAT_MODELS, GroqEngine),
|
|
38
41
|
**dict.fromkeys(GROQ_REASONING_MODELS, GroqEngine),
|
|
42
|
+
**dict.fromkeys(OPENROUTER_CHAT_MODELS, OpenRouterEngine),
|
|
43
|
+
**dict.fromkeys(OPENROUTER_REASONING_MODELS, OpenRouterEngine),
|
|
39
44
|
}
|
|
40
45
|
|
|
41
46
|
__all__ = [
|
|
@@ -53,6 +58,8 @@ __all__ = [
|
|
|
53
58
|
"OPENAI_CHAT_MODELS",
|
|
54
59
|
"OPENAI_REASONING_MODELS",
|
|
55
60
|
"OPENAI_RESPONSES_MODELS",
|
|
61
|
+
"OPENROUTER_CHAT_MODELS",
|
|
62
|
+
"OPENROUTER_REASONING_MODELS",
|
|
56
63
|
"ClaudeXChatEngine",
|
|
57
64
|
"ClaudeXReasoningEngine",
|
|
58
65
|
"DeepSeekXReasoningEngine",
|
|
@@ -60,5 +67,6 @@ __all__ = [
|
|
|
60
67
|
"GPTXReasoningEngine",
|
|
61
68
|
"GeminiXReasoningEngine",
|
|
62
69
|
"GroqEngine",
|
|
70
|
+
"OpenRouterEngine",
|
|
63
71
|
"OpenAIResponsesEngine",
|
|
64
72
|
]
|
|
@@ -580,12 +580,25 @@ class GeminiXReasoningEngine(Engine, GoogleMixin):
|
|
|
580
580
|
def _prepare_request_payload(self, argument):
|
|
581
581
|
kwargs = argument.kwargs
|
|
582
582
|
|
|
583
|
+
stop_sequences = kwargs.get("stop")
|
|
584
|
+
if stop_sequences:
|
|
585
|
+
if isinstance(stop_sequences, str):
|
|
586
|
+
stop_sequences = [stop_sequences]
|
|
587
|
+
elif not isinstance(stop_sequences, list):
|
|
588
|
+
stop_sequences = None
|
|
589
|
+
else:
|
|
590
|
+
stop_sequences = None
|
|
591
|
+
if isinstance(stop_sequences, list):
|
|
592
|
+
stop_sequences = [seq for seq in stop_sequences if seq]
|
|
593
|
+
if not stop_sequences:
|
|
594
|
+
stop_sequences = None
|
|
595
|
+
|
|
583
596
|
payload = {
|
|
584
597
|
"max_output_tokens": kwargs.get("max_tokens", self.max_response_tokens),
|
|
585
598
|
"temperature": kwargs.get("temperature", 1.0),
|
|
586
599
|
"top_p": kwargs.get("top_p", 0.95),
|
|
587
600
|
"top_k": kwargs.get("top_k", 40),
|
|
588
|
-
"stop_sequences":
|
|
601
|
+
"stop_sequences": stop_sequences,
|
|
589
602
|
"stream": kwargs.get("stream", False),
|
|
590
603
|
}
|
|
591
604
|
|