symbolicai 1.1.1__tar.gz → 1.2.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.1.1 → symbolicai-1.2.0}/PKG-INFO +1 -1
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/ENGINES/indexing_engine.md +30 -15
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/ENGINES/neurosymbolic_engine.md +38 -3
- {symbolicai-1.1.1 → symbolicai-1.2.0}/ruff.toml +5 -7
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/__init__.py +1 -1
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/index/engine_qdrant.py +135 -11
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/neurosymbolic/__init__.py +5 -0
- symbolicai-1.2.0/symai/backend/engines/neurosymbolic/engine_openai_responses.py +429 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/search/engine_parallel.py +34 -3
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/mixin/__init__.py +2 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/mixin/anthropic.py +5 -2
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/mixin/openai.py +8 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/components.py +15 -1
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/server/qdrant_server.py +65 -22
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/utils.py +19 -4
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symbolicai.egg-info/PKG-INFO +1 -1
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symbolicai.egg-info/SOURCES.txt +1 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/.gitbook.yaml +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/.github/FUNDING.yml +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/.gitignore +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/.symai/symsh.config.json +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/CITATION.cff +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/Dockerfile +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/LICENSE +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/MANIFEST.in +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/README.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/app.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/images/banner.png +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/images/cat.jpg +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/images/cat.png +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/images/contract_flow.png +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/images/img1.png +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/images/img10.png +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/images/img2.png +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/images/img3.png +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/images/img4.png +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/images/img5.png +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/images/img6.png +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/images/img7.png +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/images/img8.png +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/images/img9.png +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/images/preview.gif +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/images/screen1.jpeg +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/images/symai_logo.png +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/images/symsh.png +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/images/vid1.png +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/images/vid2.png +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/images/vid3.png +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/images/vid4.png +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/images/vid5.png +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/images/vid6.png +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/results/news.html +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/results/news.png +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/assets/results/news_prev.png +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/bin/install.ps1 +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/bin/install.sh +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/build.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docker-compose.yml +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/ENGINES/clip_engine.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/ENGINES/custom_engine.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/ENGINES/drawing_engine.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/ENGINES/file_engine.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/ENGINES/local_engine.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/ENGINES/ocr_engine.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/ENGINES/scrape_engine.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/ENGINES/search_engine.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/ENGINES/speech_to_text_engine.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/ENGINES/symbolic_engine.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/FEATURES/contracts.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/FEATURES/error_handling.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/FEATURES/expressions.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/FEATURES/import.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/FEATURES/operations.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/FEATURES/primitives.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/INSTALLATION.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/INTRODUCTION.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/QUICKSTART.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/SUMMARY.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/TOOLS/chatbot.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/TOOLS/packages.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/TOOLS/shell.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/TUTORIALS/chatbot.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/TUTORIALS/context.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/TUTORIALS/data_query.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/docs/source/TUTORIALS/video_tutorials.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/environment.yml +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/examples/contracts.ipynb +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/examples/primitives.ipynb +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/icon_converter.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/installer.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/legacy/notebooks/Basics.ipynb +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/legacy/notebooks/ChatBot.ipynb +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/legacy/notebooks/Conversation.ipynb +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/legacy/notebooks/Indexer.ipynb +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/legacy/notebooks/News.ipynb +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/legacy/notebooks/Queries.ipynb +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/legacy/notebooks/TTS_Persona.ipynb +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/legacy/notebooks/examples/Lean engine.png +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/legacy/notebooks/examples/a_star.txt +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/legacy/notebooks/examples/abstract.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/legacy/notebooks/examples/audio.mp3 +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/legacy/notebooks/examples/dbpedia_samples.jsonl +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/legacy/notebooks/examples/dbpedia_samples_prepared_train.jsonl +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/legacy/notebooks/examples/dbpedia_samples_prepared_valid.jsonl +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/legacy/notebooks/examples/demo.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/legacy/notebooks/examples/demo_strategy.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/legacy/notebooks/examples/docs.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/legacy/notebooks/examples/einsteins_puzzle.txt +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/legacy/notebooks/examples/file.json +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/legacy/notebooks/examples/lean.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/legacy/notebooks/examples/news.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/legacy/notebooks/examples/paper.pdf +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/legacy/notebooks/examples/paper.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/legacy/notebooks/examples/sql.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/public/eai.svg +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/pyproject.toml +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/pytest.ini +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/setup.cfg +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/setup.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/TERMS_OF_SERVICE.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/__init__.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/base.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/__init__.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/drawing/engine_bfl.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/drawing/engine_gpt_image.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/embedding/engine_llama_cpp.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/embedding/engine_openai.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/execute/engine_python.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/files/engine_io.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/imagecaptioning/engine_blip2.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/imagecaptioning/engine_llavacpp_client.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/index/engine_pinecone.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/index/engine_vectordb.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/lean/engine_lean4.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/neurosymbolic/engine_anthropic_claudeX_chat.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/neurosymbolic/engine_anthropic_claudeX_reasoning.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/neurosymbolic/engine_cerebras.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/neurosymbolic/engine_deepseekX_reasoning.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/neurosymbolic/engine_google_geminiX_reasoning.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/neurosymbolic/engine_groq.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/neurosymbolic/engine_huggingface.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/neurosymbolic/engine_llama_cpp.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/neurosymbolic/engine_openai_gptX_chat.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/neurosymbolic/engine_openai_gptX_reasoning.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/ocr/engine_apilayer.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/output/engine_stdout.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/scrape/engine_requests.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/search/engine_openai.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/search/engine_perplexity.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/search/engine_serpapi.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/speech_to_text/engine_local_whisper.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/symbolic/engine_wolframalpha.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/text_to_speech/engine_openai.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/text_vision/engine_clip.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/engines/userinput/engine_console.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/mixin/cerebras.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/mixin/deepseek.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/mixin/google.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/mixin/groq.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/backend/settings.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/chat.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/collect/__init__.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/collect/dynamic.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/collect/pipeline.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/collect/stats.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/constraints.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/context.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/core.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/core_ext.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/endpoints/__init__py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/endpoints/api.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/exceptions.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/.DS_Store +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/__init__.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/api_builder.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/arxiv_pdf_parser.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/bibtex_parser.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/conversation.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/document.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/file_merger.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/graph.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/html_style_template.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/interfaces/__init__.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/interfaces/blip_2.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/interfaces/clip.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/interfaces/console.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/interfaces/dall_e.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/interfaces/file.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/interfaces/flux.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/interfaces/gpt_image.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/interfaces/input.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/interfaces/llava.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/interfaces/naive_scrape.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/interfaces/naive_vectordb.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/interfaces/ocr.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/interfaces/openai_search.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/interfaces/parallel.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/interfaces/perplexity.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/interfaces/pinecone.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/interfaces/python.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/interfaces/serpapi.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/interfaces/terminal.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/interfaces/tts.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/interfaces/whisper.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/interfaces/wolframalpha.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/metrics/__init__.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/metrics/similarity.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/os_command.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/packages/__init__.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/packages/symdev.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/packages/sympkg.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/packages/symrun.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/repo_cloner.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/seo_query_optimizer.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/solver.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/summarizer.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/taypan_interpreter.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/extended/vectordb.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/formatter/__init__.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/formatter/emoji.pytxt +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/formatter/formatter.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/formatter/regex.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/functional.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/imports.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/interfaces.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/memory.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/menu/__init__.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/menu/screen.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/misc/__init__.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/misc/console.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/misc/loader.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/models/__init__.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/models/base.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/models/errors.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/ops/__init__.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/ops/measures.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/ops/primitives.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/post_processors.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/pre_processors.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/processor.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/prompts.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/server/__init__.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/server/huggingface_server.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/server/llama_cpp_server.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/shell.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/shellsv.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/strategy.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/symbol.py +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symai/symsh.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symbolicai.egg-info/dependency_links.txt +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symbolicai.egg-info/entry_points.txt +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symbolicai.egg-info/requires.txt +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/symbolicai.egg-info/top_level.txt +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/tests/README.md +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/tests/data/audio.mp3 +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/tests/data/pg1727.txt +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/trusted_repos.yml +0 -0
- {symbolicai-1.1.1 → symbolicai-1.2.0}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: symbolicai
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.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
|
|
@@ -58,24 +58,12 @@ os.environ["INDEXING_ENGINE_API_KEY"] = "your-api-key"
|
|
|
58
58
|
|
|
59
59
|
### Basic Usage
|
|
60
60
|
|
|
61
|
-
The Qdrant engine
|
|
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:
|
|
61
|
+
The Qdrant engine is used directly via the `QdrantIndexEngine` class:
|
|
76
62
|
|
|
77
63
|
```python
|
|
64
|
+
import asyncio
|
|
78
65
|
from symai.backend.engines.index.engine_qdrant import QdrantIndexEngine
|
|
66
|
+
from symai import Symbol
|
|
79
67
|
|
|
80
68
|
# Initialize engine
|
|
81
69
|
engine = QdrantIndexEngine(
|
|
@@ -86,6 +74,33 @@ engine = QdrantIndexEngine(
|
|
|
86
74
|
index_top_k=5, # default top-k for searches
|
|
87
75
|
index_metric="Cosine" # Cosine, Dot, or Euclidean
|
|
88
76
|
)
|
|
77
|
+
|
|
78
|
+
async def basic_usage():
|
|
79
|
+
# Create a collection
|
|
80
|
+
await engine.create_collection("my_collection", vector_size=1536)
|
|
81
|
+
|
|
82
|
+
# Add documents using chunk_and_upsert
|
|
83
|
+
num_chunks = await engine.chunk_and_upsert(
|
|
84
|
+
collection_name="my_collection",
|
|
85
|
+
text="Hello world, this is a test document.",
|
|
86
|
+
metadata={"source": "example"}
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
# Search for similar documents
|
|
90
|
+
query = Symbol("Hello")
|
|
91
|
+
query_embedding = query.embedding
|
|
92
|
+
results = await engine.search(
|
|
93
|
+
collection_name="my_collection",
|
|
94
|
+
query_vector=query_embedding,
|
|
95
|
+
limit=5
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
# Print results
|
|
99
|
+
for result in results:
|
|
100
|
+
print(f"Score: {result.score}")
|
|
101
|
+
print(f"Text: {result.payload.get('text', '')}")
|
|
102
|
+
|
|
103
|
+
asyncio.run(basic_usage())
|
|
89
104
|
```
|
|
90
105
|
|
|
91
106
|
### Collection Management
|
|
@@ -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
|
+
* 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`.
|
|
11
12
|
* Token‐truncation and streaming are handled automatically but may vary in behavior by engine.
|
|
12
13
|
|
|
13
14
|
> ❗️**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.
|
|
@@ -97,9 +98,9 @@ assert blocks[0].name == "get_stock_price"
|
|
|
97
98
|
|
|
98
99
|
---
|
|
99
100
|
|
|
100
|
-
## Thinking Trace (Claude, Gemini, Deepseek, Groq
|
|
101
|
+
## Thinking Trace (Claude, Gemini, Deepseek, Groq, OpenAI Responses)
|
|
101
102
|
|
|
102
|
-
Some engines (Anthropic's Claude, Google's Gemini, Deepseek) can return an internal **thinking trace** that shows how they arrived at an answer. To get it, you must:
|
|
103
|
+
Some engines (Anthropic's Claude, Google's Gemini, Deepseek, OpenAI Responses API with reasoning models) can return an internal **thinking trace** that shows how they arrived at an answer. To get it, you must:
|
|
103
104
|
|
|
104
105
|
1. Pass `return_metadata=True`.
|
|
105
106
|
2. Pass a `thinking=` configuration if required.
|
|
@@ -190,6 +191,24 @@ print(metadata["thinking"])
|
|
|
190
191
|
|
|
191
192
|
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
193
|
|
|
194
|
+
### OpenAI Responses API (reasoning models)
|
|
195
|
+
|
|
196
|
+
```python
|
|
197
|
+
from symai import Symbol
|
|
198
|
+
|
|
199
|
+
# responses:o3-mini or responses:gpt-5
|
|
200
|
+
res, metadata = Symbol("Topic: Disneyland") \
|
|
201
|
+
.query(
|
|
202
|
+
"Write a dystopic take on the topic.",
|
|
203
|
+
return_metadata=True,
|
|
204
|
+
reasoning={"effort": "medium"} # optional: low, medium, or high
|
|
205
|
+
)
|
|
206
|
+
print(res)
|
|
207
|
+
print(metadata["thinking"])
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
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
|
+
|
|
193
212
|
---
|
|
194
213
|
|
|
195
214
|
## JSON‐Only Responses
|
|
@@ -305,7 +324,8 @@ aggregated_usage = RuntimeInfo(
|
|
|
305
324
|
cached_tokens=0,
|
|
306
325
|
total_calls=0,
|
|
307
326
|
total_tokens=0,
|
|
308
|
-
cost_estimate=0
|
|
327
|
+
cost_estimate=0,
|
|
328
|
+
extras={}
|
|
309
329
|
)
|
|
310
330
|
for (engine_name, model_id), engine_data in usage_per_engine.items():
|
|
311
331
|
pricing_key = (engine_name, model_id)
|
|
@@ -320,6 +340,21 @@ print(aggregated_usage)
|
|
|
320
340
|
|
|
321
341
|
This approach provides a robust way to monitor and control costs associated with LLM API usage, especially when making multiple calls. Remember to update the `pricing` dictionary with the current rates for the models you are using. The `estimate_cost` function can also be customized to reflect complex pricing schemes (e.g., different rates for different models, image tokens, etc.).
|
|
322
342
|
|
|
343
|
+
#### The `extras` Field
|
|
344
|
+
|
|
345
|
+
`RuntimeInfo` includes an `extras` dictionary for engine-specific usage metrics that don't fit the standard token fields. For example, when using `ParallelEngine`, the tracker captures additional usage items like `sku_search` (number of search operations) and `sku_extract_excerpts` (number of excerpt extractions):
|
|
346
|
+
|
|
347
|
+
```python
|
|
348
|
+
# After tracking parallel search operations:
|
|
349
|
+
usage_per_engine = RuntimeInfo.from_tracker(tracker, 0)
|
|
350
|
+
for (engine_name, model_id), engine_data in usage_per_engine.items():
|
|
351
|
+
if engine_name == "ParallelEngine":
|
|
352
|
+
print(f"Search calls: {engine_data.extras.get('sku_search', 0)}")
|
|
353
|
+
print(f"Excerpt extractions: {engine_data.extras.get('sku_extract_excerpts', 0)}")
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
When aggregating `RuntimeInfo` objects with `+`, numeric values in `extras` are summed, while non-numeric values are overwritten.
|
|
357
|
+
|
|
323
358
|
---
|
|
324
359
|
|
|
325
360
|
## Preview Mode
|
|
@@ -45,10 +45,11 @@ select = [
|
|
|
45
45
|
"RUF","T10","T20"
|
|
46
46
|
]
|
|
47
47
|
ignore = [
|
|
48
|
-
"B028",
|
|
49
|
-
"PLW0603",
|
|
50
|
-
"G004", #
|
|
51
|
-
"A002", #
|
|
48
|
+
"B028", # no explicit stacklevel; enable if you rely on warnings for users
|
|
49
|
+
"PLW0603", # global statement discouraged; often noisy in legacy code
|
|
50
|
+
"G004", # logging-f-string
|
|
51
|
+
"A002", # argument-shadowing-builtin
|
|
52
|
+
"C901", # better to handle this manually case by case
|
|
52
53
|
]
|
|
53
54
|
|
|
54
55
|
# Allow fix for all enabled rules (when `--fix`) is provided.
|
|
@@ -58,9 +59,6 @@ unfixable = []
|
|
|
58
59
|
# Allow unused variables when underscore-prefixed.
|
|
59
60
|
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
|
60
61
|
|
|
61
|
-
[lint.mccabe]
|
|
62
|
-
max-complexity = 10
|
|
63
|
-
|
|
64
62
|
[format]
|
|
65
63
|
quote-style = "double"
|
|
66
64
|
indent-style = "space"
|
|
@@ -22,7 +22,9 @@ try:
|
|
|
22
22
|
from qdrant_client.http.models import (
|
|
23
23
|
Distance,
|
|
24
24
|
Filter,
|
|
25
|
+
NamedVector,
|
|
25
26
|
PointStruct,
|
|
27
|
+
Query,
|
|
26
28
|
ScoredPoint,
|
|
27
29
|
VectorParams,
|
|
28
30
|
)
|
|
@@ -33,6 +35,8 @@ except ImportError:
|
|
|
33
35
|
VectorParams = None
|
|
34
36
|
PointStruct = None
|
|
35
37
|
Filter = None
|
|
38
|
+
Query = None
|
|
39
|
+
NamedVector = None
|
|
36
40
|
ScoredPoint = None
|
|
37
41
|
|
|
38
42
|
try:
|
|
@@ -322,6 +326,50 @@ class QdrantIndexEngine(Engine):
|
|
|
322
326
|
# Reinitialize client to refresh collection list
|
|
323
327
|
self._init_client()
|
|
324
328
|
|
|
329
|
+
def _build_query_filter(self, raw_filter: Any) -> Filter | None:
|
|
330
|
+
"""Normalize various filter representations into a Qdrant Filter.
|
|
331
|
+
|
|
332
|
+
Supports:
|
|
333
|
+
- None: returns None
|
|
334
|
+
- Existing Filter instance: returned as-is
|
|
335
|
+
- Dict[str, Any]: converted to equality-based Filter over payload keys
|
|
336
|
+
|
|
337
|
+
The dict form is intentionally simple and maps directly to `payload.<key>`
|
|
338
|
+
equality conditions, which covers the majority of RAG use cases while
|
|
339
|
+
remaining easy to serialize and pass through higher-level APIs.
|
|
340
|
+
"""
|
|
341
|
+
if raw_filter is None or Filter is None:
|
|
342
|
+
return None
|
|
343
|
+
|
|
344
|
+
# Already a Filter instance → use directly
|
|
345
|
+
if isinstance(raw_filter, Filter):
|
|
346
|
+
return raw_filter
|
|
347
|
+
|
|
348
|
+
# Simple dict → build equality-based must filter
|
|
349
|
+
if isinstance(raw_filter, dict):
|
|
350
|
+
if models is None:
|
|
351
|
+
UserMessage(
|
|
352
|
+
"Qdrant filter models are not available. "
|
|
353
|
+
"Please install `qdrant-client` to use filtering.",
|
|
354
|
+
raise_with=ImportError,
|
|
355
|
+
)
|
|
356
|
+
|
|
357
|
+
conditions = []
|
|
358
|
+
for key, value in raw_filter.items():
|
|
359
|
+
# We keep semantics simple and robust: every entry is treated as an
|
|
360
|
+
# equality condition on the payload key (logical AND across keys).
|
|
361
|
+
conditions.append(
|
|
362
|
+
models.FieldCondition(
|
|
363
|
+
key=key,
|
|
364
|
+
match=models.MatchValue(value=value),
|
|
365
|
+
)
|
|
366
|
+
)
|
|
367
|
+
|
|
368
|
+
return Filter(must=conditions) if conditions else None
|
|
369
|
+
|
|
370
|
+
# Fallback: pass through other representations (e.g. already-built Filter-like)
|
|
371
|
+
return raw_filter
|
|
372
|
+
|
|
325
373
|
def _prepare_points_for_upsert(
|
|
326
374
|
self,
|
|
327
375
|
embeddings: list | np.ndarray | Any,
|
|
@@ -338,7 +386,7 @@ class QdrantIndexEngine(Engine):
|
|
|
338
386
|
embeddings = [embeddings]
|
|
339
387
|
|
|
340
388
|
for i, vec in enumerate(embeddings):
|
|
341
|
-
point_id = ids[i] if ids and i < len(ids) else i
|
|
389
|
+
point_id = self._normalize_point_id(ids[i]) if ids and i < len(ids) else i
|
|
342
390
|
payload = payloads[i] if payloads and i < len(payloads) else {}
|
|
343
391
|
points.append(
|
|
344
392
|
PointStruct(id=point_id, vector=self._normalize_vector(vec), payload=payload)
|
|
@@ -349,6 +397,14 @@ class QdrantIndexEngine(Engine):
|
|
|
349
397
|
def forward(self, argument):
|
|
350
398
|
kwargs = argument.kwargs
|
|
351
399
|
embedding = argument.prop.prepared_input
|
|
400
|
+
if embedding is None:
|
|
401
|
+
embedding = getattr(argument.prop, "prompt", None)
|
|
402
|
+
if embedding is None:
|
|
403
|
+
msg = (
|
|
404
|
+
"Qdrant forward() requires an embedding vector. "
|
|
405
|
+
"Provide it via prepared_input or prompt before calling forward()."
|
|
406
|
+
)
|
|
407
|
+
raise ValueError(msg)
|
|
352
408
|
query = argument.prop.ori_query
|
|
353
409
|
operation = argument.prop.operation
|
|
354
410
|
collection_name = argument.prop.index_name if argument.prop.index_name else self.index_name
|
|
@@ -369,8 +425,20 @@ class QdrantIndexEngine(Engine):
|
|
|
369
425
|
# Ensure collection exists - fail fast if it doesn't
|
|
370
426
|
self._ensure_collection_exists(collection_name)
|
|
371
427
|
index_top_k = kwargs.get("index_top_k", self.index_top_k)
|
|
372
|
-
#
|
|
373
|
-
|
|
428
|
+
# Optional search parameters
|
|
429
|
+
score_threshold = kwargs.get("score_threshold")
|
|
430
|
+
# Accept both `query_filter` and `filter` for convenience
|
|
431
|
+
raw_filter = kwargs.get("query_filter", kwargs.get("filter"))
|
|
432
|
+
query_filter = self._build_query_filter(raw_filter)
|
|
433
|
+
|
|
434
|
+
# Use shared search helper that already handles retries and normalization
|
|
435
|
+
rsp = self._search_sync(
|
|
436
|
+
collection_name=collection_name,
|
|
437
|
+
query_vector=embedding,
|
|
438
|
+
limit=index_top_k,
|
|
439
|
+
score_threshold=score_threshold,
|
|
440
|
+
query_filter=query_filter,
|
|
441
|
+
)
|
|
374
442
|
elif operation == "add":
|
|
375
443
|
# Create collection if it doesn't exist (only for write operations)
|
|
376
444
|
self._create_collection_sync(collection_name, collection_dims, self.index_metric)
|
|
@@ -446,14 +514,19 @@ class QdrantIndexEngine(Engine):
|
|
|
446
514
|
)
|
|
447
515
|
def _func():
|
|
448
516
|
query_vector_normalized = self._normalize_vector(query_vector)
|
|
449
|
-
|
|
517
|
+
# For single vector collections, pass vector directly to query parameter
|
|
518
|
+
# For named vector collections, use Query(near_vector=NamedVector(name="vector_name", vector=...))
|
|
519
|
+
# query_points API uses query_filter (not filter) for filtering
|
|
520
|
+
response = self.client.query_points(
|
|
450
521
|
collection_name=collection_name,
|
|
451
|
-
|
|
522
|
+
query=query_vector_normalized,
|
|
452
523
|
limit=top_k,
|
|
453
524
|
with_payload=True,
|
|
454
525
|
with_vectors=self.index_values,
|
|
455
526
|
**kwargs,
|
|
456
527
|
)
|
|
528
|
+
# query_points returns QueryResponse with .points attribute, extract it
|
|
529
|
+
return response.points
|
|
457
530
|
|
|
458
531
|
return _func()
|
|
459
532
|
|
|
@@ -563,16 +636,67 @@ class QdrantIndexEngine(Engine):
|
|
|
563
636
|
for name, vec in vector_config.items()
|
|
564
637
|
}
|
|
565
638
|
}
|
|
566
|
-
|
|
639
|
+
# Qdrant 1.16.1+ compatibility: vectors_count and indexed_vectors_count may not exist
|
|
640
|
+
# Use points_count as the primary count, and try to get vectors_count if available
|
|
641
|
+
result = {
|
|
567
642
|
"name": collection_name,
|
|
568
|
-
"vectors_count": collection_info.vectors_count,
|
|
569
|
-
"indexed_vectors_count": collection_info.indexed_vectors_count,
|
|
570
643
|
"points_count": collection_info.points_count,
|
|
571
644
|
"config": {"params": {"vectors": vectors_info}},
|
|
572
645
|
}
|
|
573
646
|
|
|
647
|
+
# Try to get vectors_count if available (for older Qdrant versions)
|
|
648
|
+
if hasattr(collection_info, "vectors_count"):
|
|
649
|
+
result["vectors_count"] = collection_info.vectors_count
|
|
650
|
+
else:
|
|
651
|
+
# In Qdrant 1.16.1+, vectors_count is not available, use points_count as approximation
|
|
652
|
+
result["vectors_count"] = collection_info.points_count
|
|
653
|
+
|
|
654
|
+
# Try to get indexed_vectors_count if available
|
|
655
|
+
if hasattr(collection_info, "indexed_vectors_count"):
|
|
656
|
+
result["indexed_vectors_count"] = collection_info.indexed_vectors_count
|
|
657
|
+
else:
|
|
658
|
+
# In Qdrant 1.16.1+, indexed_vectors_count may not be available
|
|
659
|
+
result["indexed_vectors_count"] = collection_info.points_count
|
|
660
|
+
|
|
661
|
+
return result
|
|
662
|
+
|
|
574
663
|
# ==================== Point Operations ====================
|
|
575
664
|
|
|
665
|
+
def _normalize_point_id(self, point_id: Any) -> int | uuid.UUID:
|
|
666
|
+
"""Normalize point ID to integer or UUID for Qdrant 1.16.1+ compatibility.
|
|
667
|
+
|
|
668
|
+
Qdrant 1.16.1+ requires point IDs to be either unsigned integers or UUIDs.
|
|
669
|
+
This function converts string IDs (like 'vec-1') to integers or UUIDs.
|
|
670
|
+
"""
|
|
671
|
+
# If already int or UUID, return as-is
|
|
672
|
+
if isinstance(point_id, (int, uuid.UUID)):
|
|
673
|
+
return point_id
|
|
674
|
+
|
|
675
|
+
# If string, try to convert
|
|
676
|
+
if isinstance(point_id, str):
|
|
677
|
+
# Try to parse as integer first
|
|
678
|
+
try:
|
|
679
|
+
# Handle string IDs like "vec-1" by extracting the number
|
|
680
|
+
if point_id.startswith("vec-"):
|
|
681
|
+
num_str = point_id.split("-", 1)[-1]
|
|
682
|
+
return int(num_str)
|
|
683
|
+
# Try direct integer conversion
|
|
684
|
+
return int(point_id)
|
|
685
|
+
except (ValueError, AttributeError):
|
|
686
|
+
# If not a valid integer, try UUID
|
|
687
|
+
try:
|
|
688
|
+
return uuid.UUID(point_id)
|
|
689
|
+
except (ValueError, AttributeError):
|
|
690
|
+
# Fallback: generate UUID from string hash
|
|
691
|
+
return uuid.uuid5(uuid.NAMESPACE_DNS, point_id)
|
|
692
|
+
|
|
693
|
+
# For other types, try to convert to int
|
|
694
|
+
try:
|
|
695
|
+
return int(point_id)
|
|
696
|
+
except (ValueError, TypeError):
|
|
697
|
+
# Last resort: generate UUID from string representation
|
|
698
|
+
return uuid.uuid5(uuid.NAMESPACE_DNS, str(point_id))
|
|
699
|
+
|
|
576
700
|
def _upsert_points_sync(
|
|
577
701
|
self,
|
|
578
702
|
collection_name: str,
|
|
@@ -589,17 +713,17 @@ class QdrantIndexEngine(Engine):
|
|
|
589
713
|
if isinstance(points[0], dict):
|
|
590
714
|
points = [
|
|
591
715
|
PointStruct(
|
|
592
|
-
id=point["id"],
|
|
716
|
+
id=self._normalize_point_id(point["id"]),
|
|
593
717
|
vector=self._normalize_vector(point["vector"]),
|
|
594
718
|
payload=point.get("payload", {}),
|
|
595
719
|
)
|
|
596
720
|
for point in points
|
|
597
721
|
]
|
|
598
722
|
else:
|
|
599
|
-
# Normalize vectors in existing PointStruct objects
|
|
723
|
+
# Normalize vectors and IDs in existing PointStruct objects
|
|
600
724
|
points = [
|
|
601
725
|
PointStruct(
|
|
602
|
-
id=point.id,
|
|
726
|
+
id=self._normalize_point_id(point.id),
|
|
603
727
|
vector=self._normalize_vector(point.vector),
|
|
604
728
|
payload=point.payload,
|
|
605
729
|
)
|
|
@@ -11,6 +11,7 @@ from ...mixin import (
|
|
|
11
11
|
GROQ_REASONING_MODELS,
|
|
12
12
|
OPENAI_CHAT_MODELS,
|
|
13
13
|
OPENAI_REASONING_MODELS,
|
|
14
|
+
OPENAI_RESPONSES_MODELS,
|
|
14
15
|
)
|
|
15
16
|
from .engine_anthropic_claudeX_chat import ClaudeXChatEngine
|
|
16
17
|
from .engine_anthropic_claudeX_reasoning import ClaudeXReasoningEngine
|
|
@@ -20,6 +21,7 @@ from .engine_google_geminiX_reasoning import GeminiXReasoningEngine
|
|
|
20
21
|
from .engine_groq import GroqEngine
|
|
21
22
|
from .engine_openai_gptX_chat import GPTXChatEngine
|
|
22
23
|
from .engine_openai_gptX_reasoning import GPTXReasoningEngine
|
|
24
|
+
from .engine_openai_responses import OpenAIResponsesEngine
|
|
23
25
|
|
|
24
26
|
# create the mapping
|
|
25
27
|
ENGINE_MAPPING = {
|
|
@@ -31,6 +33,7 @@ ENGINE_MAPPING = {
|
|
|
31
33
|
**dict.fromkeys(GOOGLE_REASONING_MODELS, GeminiXReasoningEngine),
|
|
32
34
|
**dict.fromkeys(OPENAI_CHAT_MODELS, GPTXChatEngine),
|
|
33
35
|
**dict.fromkeys(OPENAI_REASONING_MODELS, GPTXReasoningEngine),
|
|
36
|
+
**dict.fromkeys(OPENAI_RESPONSES_MODELS, OpenAIResponsesEngine),
|
|
34
37
|
**dict.fromkeys(GROQ_CHAT_MODELS, GroqEngine),
|
|
35
38
|
**dict.fromkeys(GROQ_REASONING_MODELS, GroqEngine),
|
|
36
39
|
}
|
|
@@ -49,6 +52,7 @@ __all__ = [
|
|
|
49
52
|
"GROQ_REASONING_MODELS",
|
|
50
53
|
"OPENAI_CHAT_MODELS",
|
|
51
54
|
"OPENAI_REASONING_MODELS",
|
|
55
|
+
"OPENAI_RESPONSES_MODELS",
|
|
52
56
|
"ClaudeXChatEngine",
|
|
53
57
|
"ClaudeXReasoningEngine",
|
|
54
58
|
"DeepSeekXReasoningEngine",
|
|
@@ -56,4 +60,5 @@ __all__ = [
|
|
|
56
60
|
"GPTXReasoningEngine",
|
|
57
61
|
"GeminiXReasoningEngine",
|
|
58
62
|
"GroqEngine",
|
|
63
|
+
"OpenAIResponsesEngine",
|
|
59
64
|
]
|