llms-py 3.0.11__tar.gz → 3.0.13__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.
- {llms_py-3.0.11 → llms_py-3.0.13}/PKG-INFO +2 -2
- {llms_py-3.0.11 → llms_py-3.0.13}/README.md +1 -1
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/providers/google.py +55 -4
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/tools/ui/index.mjs +17 -5
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/main.py +9 -3
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/ai.mjs +1 -1
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/modules/chat/ChatBody.mjs +2 -2
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/modules/chat/index.mjs +1 -1
- {llms_py-3.0.11 → llms_py-3.0.13}/llms_py.egg-info/PKG-INFO +2 -2
- {llms_py-3.0.11 → llms_py-3.0.13}/llms_py.egg-info/SOURCES.txt +2 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/pyproject.toml +1 -1
- {llms_py-3.0.11 → llms_py-3.0.13}/setup.py +1 -1
- llms_py-3.0.13/tests/test_core_tools_direct.py +38 -0
- llms_py-3.0.13/tests/test_gemini_tool_calling.py +101 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/tests/test_provider_config.py +4 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/LICENSE +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/MANIFEST.in +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/__init__.py +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/__main__.py +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/db.py +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/analytics/ui/index.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/app/README.md +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/app/__init__.py +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/app/db.py +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/app/ui/Recents.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/app/ui/index.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/app/ui/threadStore.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/CALCULATOR.md +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/__init__.py +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/codemirror/addon/edit/closebrackets.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/codemirror/addon/edit/closetag.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/codemirror/addon/edit/continuelist.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/codemirror/addon/edit/matchbrackets.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/codemirror/addon/edit/matchtags.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/codemirror/addon/edit/trailingspace.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/codemirror/addon/selection/active-line.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/codemirror/addon/selection/mark-selection.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/codemirror/addon/selection/selection-pointer.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/codemirror/codemirror.css +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/codemirror/codemirror.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/codemirror/doc/docs.css +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/codemirror/doc/source_sans.woff +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/codemirror/mode/clike/clike.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/codemirror/mode/javascript/index.html +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/codemirror/mode/javascript/javascript.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/codemirror/mode/javascript/typescript.html +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/codemirror/mode/python/python.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/codemirror/theme/dracula.css +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/codemirror/theme/mocha.css +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/index.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/gallery/README.md +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/gallery/__init__.py +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/gallery/db.py +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/gallery/ui/index.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/README.md +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/__init__.py +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/README.md +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/contrib/auto-render.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/contrib/auto-render.min.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/contrib/auto-render.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/contrib/copy-tex.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/contrib/copy-tex.min.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/contrib/copy-tex.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/contrib/mathtex-script-type.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/contrib/mathtex-script-type.min.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/contrib/mathtex-script-type.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/contrib/mhchem.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/contrib/mhchem.min.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/contrib/mhchem.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/contrib/render-a11y-string.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/contrib/render-a11y-string.min.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/contrib/render-a11y-string.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_AMS-Regular.ttf +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_AMS-Regular.woff +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Main-Bold.ttf +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Main-Bold.woff +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Main-Bold.woff2 +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Main-Italic.ttf +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Main-Italic.woff +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Main-Italic.woff2 +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Main-Regular.ttf +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Main-Regular.woff +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Main-Regular.woff2 +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Math-Italic.ttf +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Math-Italic.woff +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Math-Italic.woff2 +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Script-Regular.ttf +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Script-Regular.woff +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Script-Regular.woff2 +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Size1-Regular.ttf +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Size1-Regular.woff +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Size2-Regular.ttf +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Size2-Regular.woff +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Size3-Regular.ttf +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Size3-Regular.woff +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Size4-Regular.ttf +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Size4-Regular.woff +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/index.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/katex-swap.css +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/katex-swap.min.css +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/katex.css +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/katex.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/katex.min.css +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/katex.min.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/katex.min.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/katex.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/providers/__init__.py +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/providers/anthropic.py +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/providers/cerebras.py +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/providers/chutes.py +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/providers/nvidia.py +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/providers/openai.py +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/providers/openrouter.py +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/providers/zai.py +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/system_prompts/README.md +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/system_prompts/__init__.py +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/system_prompts/ui/index.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/system_prompts/ui/prompts.json +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/tools/__init__.py +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/index.html +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/llms.json +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/providers-extra.json +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/providers.json +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/App.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/app.css +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/ctx.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/fav.svg +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/index.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/lib/chart.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/lib/charts.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/lib/color.js +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/lib/highlight.min.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/lib/idb.min.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/lib/marked.min.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/lib/servicestack-client.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/lib/servicestack-vue.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/lib/vue-router.min.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/lib/vue.min.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/lib/vue.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/markdown.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/modules/chat/SettingsDialog.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/modules/icons.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/modules/layout.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/modules/model-selector.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/tailwind.input.css +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/typography.css +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms/ui/utils.mjs +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms_py.egg-info/dependency_links.txt +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms_py.egg-info/entry_points.txt +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms_py.egg-info/not-zip-safe +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms_py.egg-info/requires.txt +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/llms_py.egg-info/top_level.txt +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/requirements.txt +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/setup.cfg +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/tests/test_async.py +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/tests/test_config.py +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/tests/test_extensions.py +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/tests/test_gemini_upload.py +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/tests/test_integration.py +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/tests/test_interleaved_thinking.py +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/tests/test_provider_checks.py +0 -0
- {llms_py-3.0.11 → llms_py-3.0.13}/tests/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: llms-py
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.13
|
|
4
4
|
Summary: A lightweight CLI tool and OpenAI-compatible server for querying multiple Large Language Model (LLM) providers
|
|
5
5
|
Home-page: https://github.com/ServiceStack/llms
|
|
6
6
|
Author: ServiceStack
|
|
@@ -44,6 +44,6 @@ Lightweight CLI, API and ChatGPT-like alternative to Open WebUI for accessing mu
|
|
|
44
44
|
|
|
45
45
|
[llmspy.org](https://llmspy.org)
|
|
46
46
|
|
|
47
|
-
[](https://llmspy.org)
|
|
47
|
+
[](https://llmspy.org)
|
|
48
48
|
|
|
49
49
|
GitHub: [llmspy.org](https://github.com/ServiceStack/llmspy.org)
|
|
@@ -4,6 +4,6 @@ Lightweight CLI, API and ChatGPT-like alternative to Open WebUI for accessing mu
|
|
|
4
4
|
|
|
5
5
|
[llmspy.org](https://llmspy.org)
|
|
6
6
|
|
|
7
|
-
[](https://llmspy.org)
|
|
7
|
+
[](https://llmspy.org)
|
|
8
8
|
|
|
9
9
|
GitHub: [llmspy.org](https://github.com/ServiceStack/llmspy.org)
|
|
@@ -63,6 +63,50 @@ def install_google(ctx):
|
|
|
63
63
|
to[k] = v
|
|
64
64
|
return to
|
|
65
65
|
|
|
66
|
+
def sanitize_parameters(params):
|
|
67
|
+
"""Sanitize tool parameters for Google provider."""
|
|
68
|
+
|
|
69
|
+
if not isinstance(params, dict):
|
|
70
|
+
return params
|
|
71
|
+
|
|
72
|
+
# Create a copy to avoid modifying original tool definition
|
|
73
|
+
p = params.copy()
|
|
74
|
+
|
|
75
|
+
# Remove forbidden fields
|
|
76
|
+
for forbidden in ["$schema", "additionalProperties"]:
|
|
77
|
+
if forbidden in p:
|
|
78
|
+
del p[forbidden]
|
|
79
|
+
|
|
80
|
+
# Recursively sanitize known nesting fields
|
|
81
|
+
# 1. Properties (dict of schemas)
|
|
82
|
+
if "properties" in p:
|
|
83
|
+
for k, v in p["properties"].items():
|
|
84
|
+
p["properties"][k] = sanitize_parameters(v)
|
|
85
|
+
|
|
86
|
+
# 2. Items (schema or list of schemas)
|
|
87
|
+
if "items" in p:
|
|
88
|
+
if isinstance(p["items"], list):
|
|
89
|
+
p["items"] = [sanitize_parameters(i) for i in p["items"]]
|
|
90
|
+
else:
|
|
91
|
+
p["items"] = sanitize_parameters(p["items"])
|
|
92
|
+
|
|
93
|
+
# 3. Combinators (list of schemas)
|
|
94
|
+
for combinator in ["allOf", "anyOf", "oneOf"]:
|
|
95
|
+
if combinator in p:
|
|
96
|
+
p[combinator] = [sanitize_parameters(i) for i in p[combinator]]
|
|
97
|
+
|
|
98
|
+
# 4. Not (schema)
|
|
99
|
+
if "not" in p:
|
|
100
|
+
p["not"] = sanitize_parameters(p["not"])
|
|
101
|
+
|
|
102
|
+
# 5. Definitions (dict of schemas)
|
|
103
|
+
for def_key in ["definitions", "$defs"]:
|
|
104
|
+
if def_key in p:
|
|
105
|
+
for k, v in p[def_key].items():
|
|
106
|
+
p[def_key][k] = sanitize_parameters(v)
|
|
107
|
+
|
|
108
|
+
return p
|
|
109
|
+
|
|
66
110
|
class GoogleProvider(OpenAiCompatible):
|
|
67
111
|
sdk = "@ai-sdk/google"
|
|
68
112
|
|
|
@@ -112,11 +156,12 @@ def install_google(ctx):
|
|
|
112
156
|
for tool in chat["tools"]:
|
|
113
157
|
if tool["type"] == "function":
|
|
114
158
|
f = tool["function"]
|
|
159
|
+
|
|
115
160
|
function_declarations.append(
|
|
116
161
|
{
|
|
117
162
|
"name": f["name"],
|
|
118
163
|
"description": f.get("description"),
|
|
119
|
-
"parameters": f.get("parameters"),
|
|
164
|
+
"parameters": sanitize_parameters(f.get("parameters")),
|
|
120
165
|
}
|
|
121
166
|
)
|
|
122
167
|
elif tool["type"] == "file_search":
|
|
@@ -183,13 +228,19 @@ def install_google(ctx):
|
|
|
183
228
|
if name:
|
|
184
229
|
# content is the string response
|
|
185
230
|
# Some implementations pass the content directly.
|
|
186
|
-
# Google docs say: response: { "
|
|
187
|
-
|
|
231
|
+
# Google docs say: response: { "key": "value" }
|
|
232
|
+
try:
|
|
233
|
+
response_data = json.loads(message["content"])
|
|
234
|
+
if not isinstance(response_data, dict):
|
|
235
|
+
response_data = {"content": message["content"]}
|
|
236
|
+
except Exception:
|
|
237
|
+
response_data = {"content": message["content"]}
|
|
238
|
+
|
|
188
239
|
parts.append(
|
|
189
240
|
{
|
|
190
241
|
"functionResponse": {
|
|
191
242
|
"name": name,
|
|
192
|
-
"response":
|
|
243
|
+
"response": response_data,
|
|
193
244
|
}
|
|
194
245
|
}
|
|
195
246
|
)
|
|
@@ -18,7 +18,7 @@ const ToolResult = {
|
|
|
18
18
|
preview
|
|
19
19
|
</span>
|
|
20
20
|
</div>
|
|
21
|
-
<div class="not-prose
|
|
21
|
+
<div class="not-prose py-2">
|
|
22
22
|
<pre v-if="ext.prefs.toolFormat !== 'preview'" class="tool-output">{{ origResult }}</pre>
|
|
23
23
|
<div v-else>
|
|
24
24
|
<ViewTypes v-if="Array.isArray(result)" :results="result" />
|
|
@@ -191,7 +191,7 @@ const Tools = {
|
|
|
191
191
|
</div>
|
|
192
192
|
|
|
193
193
|
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4">
|
|
194
|
-
<div v-for="tool in filteredTools" :key="tool.function.name"
|
|
194
|
+
<div v-for="tool in filteredTools" :key="tool.function.name" :id="'tool-' + tool.function.name"
|
|
195
195
|
class="bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 overflow-hidden flex flex-col">
|
|
196
196
|
|
|
197
197
|
<div class="p-4 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800/50 flex justify-between items-center">
|
|
@@ -262,7 +262,6 @@ const Tools = {
|
|
|
262
262
|
const ctx = inject('ctx')
|
|
263
263
|
|
|
264
264
|
// Execution State
|
|
265
|
-
const executingTool = ref(null)
|
|
266
265
|
const execForm = ref({})
|
|
267
266
|
const execResult = ref(null)
|
|
268
267
|
const execError = ref(null)
|
|
@@ -270,6 +269,12 @@ const Tools = {
|
|
|
270
269
|
const refForm = ref()
|
|
271
270
|
const refTop = ref()
|
|
272
271
|
|
|
272
|
+
const executingTool = computed(() => {
|
|
273
|
+
const tool = ext.prefs.selectedTool
|
|
274
|
+
if (!tool) return null
|
|
275
|
+
return ctx.state.tool.definitions.find(x => x.function.name === tool)
|
|
276
|
+
})
|
|
277
|
+
|
|
273
278
|
// UI State
|
|
274
279
|
const expandedDescriptions = ref({})
|
|
275
280
|
|
|
@@ -284,7 +289,7 @@ const Tools = {
|
|
|
284
289
|
})
|
|
285
290
|
|
|
286
291
|
function startExec(tool) {
|
|
287
|
-
|
|
292
|
+
ext.setPrefs({ selectedTool: tool.function.name })
|
|
288
293
|
execForm.value = {}
|
|
289
294
|
execResult.value = null
|
|
290
295
|
execError.value = null
|
|
@@ -309,7 +314,7 @@ const Tools = {
|
|
|
309
314
|
}
|
|
310
315
|
|
|
311
316
|
function closeExec() {
|
|
312
|
-
|
|
317
|
+
ext.setPrefs({ selectedTool: null })
|
|
313
318
|
execForm.value = {}
|
|
314
319
|
execResult.value = null
|
|
315
320
|
execError.value = null
|
|
@@ -588,9 +593,16 @@ function useTools(ctx) {
|
|
|
588
593
|
Object.assign(toolPageHeaders, components)
|
|
589
594
|
}
|
|
590
595
|
|
|
596
|
+
function selectTool({ group, tool }) {
|
|
597
|
+
ext.setPrefs({ selectedGroup: group, selectedTool: tool })
|
|
598
|
+
}
|
|
599
|
+
|
|
591
600
|
return {
|
|
592
601
|
toolPageHeaders,
|
|
593
602
|
setToolPageHeaders,
|
|
603
|
+
selectTool,
|
|
604
|
+
get selectedGroup() { return ext.prefs.selectedGroup },
|
|
605
|
+
get selectedTool() { return ext.prefs.selectedTool },
|
|
594
606
|
}
|
|
595
607
|
}
|
|
596
608
|
|
|
@@ -43,7 +43,7 @@ try:
|
|
|
43
43
|
except ImportError:
|
|
44
44
|
HAS_PIL = False
|
|
45
45
|
|
|
46
|
-
VERSION = "3.0.
|
|
46
|
+
VERSION = "3.0.13"
|
|
47
47
|
_ROOT = None
|
|
48
48
|
DEBUG = os.getenv("DEBUG") == "1"
|
|
49
49
|
MOCK = os.getenv("MOCK") == "1"
|
|
@@ -1513,6 +1513,7 @@ def g_tool_result(result, function_name: Optional[str] = None, function_args: Op
|
|
|
1513
1513
|
content = []
|
|
1514
1514
|
resources = []
|
|
1515
1515
|
args = function_args or {}
|
|
1516
|
+
_dbg(f"{function_name} tool result type: {type(result)}")
|
|
1516
1517
|
if isinstance(result, dict):
|
|
1517
1518
|
text, res = tool_result_part(result, function_name, args)
|
|
1518
1519
|
if text:
|
|
@@ -1555,7 +1556,7 @@ def group_resources(resources: list):
|
|
|
1555
1556
|
{"images": [{"type": "image_url", "image_url": {"url": "/image.jpg"}}] }
|
|
1556
1557
|
"""
|
|
1557
1558
|
grouped = {}
|
|
1558
|
-
for res in resources:
|
|
1559
|
+
for res in resources or []:
|
|
1559
1560
|
type = res.get("type")
|
|
1560
1561
|
if not type:
|
|
1561
1562
|
continue
|
|
@@ -1628,10 +1629,15 @@ async def g_chat_completion(chat, context=None):
|
|
|
1628
1629
|
tool_history = []
|
|
1629
1630
|
final_response = None
|
|
1630
1631
|
|
|
1631
|
-
for
|
|
1632
|
+
for request_count in range(max_iterations):
|
|
1632
1633
|
if should_cancel_thread(context):
|
|
1633
1634
|
return
|
|
1634
1635
|
|
|
1636
|
+
if DEBUG:
|
|
1637
|
+
messages = current_chat.get("messages", [])
|
|
1638
|
+
last_message = messages[-1] if messages else None
|
|
1639
|
+
_dbg(f"Provider {provider_name}, request {request_count}:\n{json.dumps(last_message, indent=2)}")
|
|
1640
|
+
|
|
1635
1641
|
response = await provider.chat(current_chat, context=context)
|
|
1636
1642
|
|
|
1637
1643
|
if should_cancel_thread(context):
|
|
@@ -56,7 +56,7 @@ function embedHtml(html) {
|
|
|
56
56
|
export const TypeText = {
|
|
57
57
|
template: `
|
|
58
58
|
<div v-if="text.type === 'text'">
|
|
59
|
-
<div v-html="html"></div>
|
|
59
|
+
<div v-html="html?.trim()" class="whitespace-pre-wrap"></div>
|
|
60
60
|
</div>
|
|
61
61
|
`,
|
|
62
62
|
props: {
|
|
@@ -72,7 +72,7 @@ export const TypeText = {
|
|
|
72
72
|
return ctx.fmt.markdown(props.text.text)
|
|
73
73
|
} catch (e) {
|
|
74
74
|
console.error('TypeText: markdown', e)
|
|
75
|
-
return `<div
|
|
75
|
+
return `<div>${props.text.text}</div>`
|
|
76
76
|
}
|
|
77
77
|
})
|
|
78
78
|
return { html }
|
|
@@ -950,7 +950,7 @@ export default {
|
|
|
950
950
|
ctx.setLeftIcons({
|
|
951
951
|
chat: {
|
|
952
952
|
component: {
|
|
953
|
-
template: `<svg @click="$ctx.togglePath('/')" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="currentColor" d="M8 2.19c3.13 0 5.68 2.25 5.68 5s-2.55 5-5.68 5a5.7 5.7 0 0 1-1.89-.29l-.75-.26l-.56.56a14 14 0 0 1-2 1.55a.13.13 0 0 1-.07 0v-.06a6.58 6.58 0 0 0 .15-4.29a5.25 5.25 0 0 1-.55-2.16c0-2.77 2.55-5 5.68-5M8 .94c-3.83 0-6.93 2.81-6.93 6.27a6.4 6.4 0 0 0 .64 2.64a5.53 5.53 0 0 1-.18 3.48a1.32 1.32 0 0 0 2 1.5a15 15 0 0 0 2.16-1.71a6.8 6.8 0 0 0 2.31.36c3.83 0 6.93-2.81 6.93-6.27S11.83.94 8 .94"/><ellipse cx="5.2" cy="7.7" fill="currentColor" rx=".8" ry=".75"/><ellipse cx="8" cy="7.7" fill="currentColor" rx=".8" ry=".75"/><ellipse cx="10.8" cy="7.7" fill="currentColor" rx=".8" ry=".75"/></svg>`,
|
|
953
|
+
template: `<svg @click="$ctx.togglePath($ctx.layout.path?.startsWith('/c/') ? $ctx.layout.path : '/')" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="currentColor" d="M8 2.19c3.13 0 5.68 2.25 5.68 5s-2.55 5-5.68 5a5.7 5.7 0 0 1-1.89-.29l-.75-.26l-.56.56a14 14 0 0 1-2 1.55a.13.13 0 0 1-.07 0v-.06a6.58 6.58 0 0 0 .15-4.29a5.25 5.25 0 0 1-.55-2.16c0-2.77 2.55-5 5.68-5M8 .94c-3.83 0-6.93 2.81-6.93 6.27a6.4 6.4 0 0 0 .64 2.64a5.53 5.53 0 0 1-.18 3.48a1.32 1.32 0 0 0 2 1.5a15 15 0 0 0 2.16-1.71a6.8 6.8 0 0 0 2.31.36c3.83 0 6.93-2.81 6.93-6.27S11.83.94 8 .94"/><ellipse cx="5.2" cy="7.7" fill="currentColor" rx=".8" ry=".75"/><ellipse cx="8" cy="7.7" fill="currentColor" rx=".8" ry=".75"/><ellipse cx="10.8" cy="7.7" fill="currentColor" rx=".8" ry=".75"/></svg>`,
|
|
954
954
|
},
|
|
955
955
|
isActive({ path }) {
|
|
956
956
|
return path === '/' || path.startsWith('/c/')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: llms-py
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.13
|
|
4
4
|
Summary: A lightweight CLI tool and OpenAI-compatible server for querying multiple Large Language Model (LLM) providers
|
|
5
5
|
Home-page: https://github.com/ServiceStack/llms
|
|
6
6
|
Author: ServiceStack
|
|
@@ -44,6 +44,6 @@ Lightweight CLI, API and ChatGPT-like alternative to Open WebUI for accessing mu
|
|
|
44
44
|
|
|
45
45
|
[llmspy.org](https://llmspy.org)
|
|
46
46
|
|
|
47
|
-
[](https://llmspy.org)
|
|
47
|
+
[](https://llmspy.org)
|
|
48
48
|
|
|
49
49
|
GitHub: [llmspy.org](https://github.com/ServiceStack/llmspy.org)
|
|
@@ -184,7 +184,9 @@ llms_py.egg-info/requires.txt
|
|
|
184
184
|
llms_py.egg-info/top_level.txt
|
|
185
185
|
tests/test_async.py
|
|
186
186
|
tests/test_config.py
|
|
187
|
+
tests/test_core_tools_direct.py
|
|
187
188
|
tests/test_extensions.py
|
|
189
|
+
tests/test_gemini_tool_calling.py
|
|
188
190
|
tests/test_gemini_upload.py
|
|
189
191
|
tests/test_integration.py
|
|
190
192
|
tests/test_interleaved_thinking.py
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "llms-py"
|
|
7
|
-
version = "3.0.
|
|
7
|
+
version = "3.0.13"
|
|
8
8
|
description = "A lightweight CLI tool and OpenAI-compatible server for querying multiple Large Language Model (LLM) providers"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "BSD-3-Clause"
|
|
@@ -15,7 +15,7 @@ with open(os.path.join(this_directory, "requirements.txt"), encoding="utf-8") as
|
|
|
15
15
|
|
|
16
16
|
setup(
|
|
17
17
|
name="llms-py",
|
|
18
|
-
version="3.0.
|
|
18
|
+
version="3.0.13",
|
|
19
19
|
author="ServiceStack",
|
|
20
20
|
author_email="team@servicestack.net",
|
|
21
21
|
description="A lightweight CLI tool and OpenAI-compatible server for querying multiple Large Language Model (LLM) providers",
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import sys
|
|
3
|
+
import unittest
|
|
4
|
+
from unittest.mock import MagicMock
|
|
5
|
+
|
|
6
|
+
# Add project root to path
|
|
7
|
+
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
|
8
|
+
|
|
9
|
+
import llms.extensions.core_tools as core_tools
|
|
10
|
+
|
|
11
|
+
# Mock g_ctx
|
|
12
|
+
core_tools.g_ctx = MagicMock()
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class TestCoreToolsDirect(unittest.TestCase):
|
|
16
|
+
def test_calc(self):
|
|
17
|
+
print("Running tests...")
|
|
18
|
+
|
|
19
|
+
# Simple list comprehension
|
|
20
|
+
res = core_tools.calc("sum([x * 2 for x in [1, 2, 3]])")
|
|
21
|
+
print(f"sum([x * 2 for x in [1, 2, 3]]) = {res}")
|
|
22
|
+
assert res == 12
|
|
23
|
+
|
|
24
|
+
# List comprehension with condition
|
|
25
|
+
res = core_tools.calc("sum([x for x in [1, 2, 3, 4] if x > 2])")
|
|
26
|
+
print(f"sum([x for x in [1, 2, 3, 4] if x > 2]) = {res}")
|
|
27
|
+
assert res == 7
|
|
28
|
+
|
|
29
|
+
# Range support (I added range support too)
|
|
30
|
+
res = core_tools.calc("sum([x for x in range(5)])")
|
|
31
|
+
print(f"sum([x for x in range(5)]) = {res}")
|
|
32
|
+
assert res == 10
|
|
33
|
+
|
|
34
|
+
print("All tests passed!")
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
if __name__ == "__main__":
|
|
38
|
+
unittest.main()
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Unit tests for utility functions in llms.main module.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
import inspect
|
|
7
|
+
import json
|
|
8
|
+
import os
|
|
9
|
+
import sys
|
|
10
|
+
import unittest
|
|
11
|
+
|
|
12
|
+
# from dotenv import load_dotenv
|
|
13
|
+
|
|
14
|
+
# Add parent directory to path to import llms module
|
|
15
|
+
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
|
16
|
+
|
|
17
|
+
from llms.main import (
|
|
18
|
+
cli,
|
|
19
|
+
get_app,
|
|
20
|
+
load_config,
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
# Load environment variables from .env file
|
|
24
|
+
# load_dotenv(os.path.join(os.path.dirname(__file__), "..", ".env"))
|
|
25
|
+
|
|
26
|
+
config_path = os.path.join(os.path.dirname(__file__), "..", "llms", "llms.json")
|
|
27
|
+
with open(config_path) as f:
|
|
28
|
+
config = json.load(f)
|
|
29
|
+
providers_path = os.path.join(os.path.dirname(__file__), "..", "llms", "providers.json")
|
|
30
|
+
with open(providers_path) as f:
|
|
31
|
+
providers = json.load(f)
|
|
32
|
+
|
|
33
|
+
g_app = None
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class TestGeminiToolCalling(unittest.IsolatedAsyncioTestCase):
|
|
37
|
+
"""Test Gemini Tool Calling."""
|
|
38
|
+
|
|
39
|
+
def setUp(self):
|
|
40
|
+
load_config(
|
|
41
|
+
config, providers, debug=True, verbose=True, disable_extensions=["duckduckgo", "fast_mcp", "gemini", "xmas"]
|
|
42
|
+
)
|
|
43
|
+
cli("ls minimax")
|
|
44
|
+
global g_app
|
|
45
|
+
g_app = get_app()
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def tearDownClass(cls):
|
|
49
|
+
g_app.shutdown()
|
|
50
|
+
|
|
51
|
+
async def test_gemini_tool_calling(self):
|
|
52
|
+
provider = g_app.get_providers()["google"]
|
|
53
|
+
chat = {
|
|
54
|
+
"model": "Gemini Flash-Lite Latest",
|
|
55
|
+
"messages": [
|
|
56
|
+
{"role": "user", "content": "Calculate 12 * 34 + 56"},
|
|
57
|
+
],
|
|
58
|
+
}
|
|
59
|
+
response = await provider.chat(chat)
|
|
60
|
+
print("GEMINI RESPONSE:")
|
|
61
|
+
print(json.dumps(response, indent=2))
|
|
62
|
+
print("GEMINI RESULT:")
|
|
63
|
+
content = response["choices"][0]["message"]["content"]
|
|
64
|
+
print(content)
|
|
65
|
+
self.assertIn("464", content)
|
|
66
|
+
|
|
67
|
+
async def test_gemini_multi_step_tool_calling(self):
|
|
68
|
+
# provider = g_app.get_providers()["google"]
|
|
69
|
+
filename = "test_multi_step.txt"
|
|
70
|
+
content_to_write = "Multi-step test content"
|
|
71
|
+
|
|
72
|
+
# Ensure cleanup
|
|
73
|
+
if os.path.exists(filename):
|
|
74
|
+
os.remove(filename)
|
|
75
|
+
|
|
76
|
+
chat = {
|
|
77
|
+
"model": "Gemini Flash-Lite Latest",
|
|
78
|
+
"messages": [
|
|
79
|
+
{
|
|
80
|
+
"role": "user",
|
|
81
|
+
"content": f"Create a file named '{filename}' with the content '{content_to_write}', and then read it back to me.",
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
response = await g_app.chat_completion(chat)
|
|
87
|
+
|
|
88
|
+
last_message = response["choices"][0]["message"]
|
|
89
|
+
print(f"GEMINI RESULT (Multi-step):\n{json.dumps(last_message, indent=2)}")
|
|
90
|
+
|
|
91
|
+
# Verify file exists and content
|
|
92
|
+
with open(filename) as f:
|
|
93
|
+
self.assertEqual(f.read(), content_to_write)
|
|
94
|
+
|
|
95
|
+
# Cleanup
|
|
96
|
+
if os.path.exists(filename):
|
|
97
|
+
os.remove(filename)
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
if __name__ == "__main__":
|
|
101
|
+
unittest.main()
|
|
@@ -229,3 +229,7 @@ class TestProviderConfiguration(unittest.TestCase):
|
|
|
229
229
|
provider = create_provider(create_provider_kwargs(config["providers"]["openrouter"], providers["openrouter"]))
|
|
230
230
|
self.assertEqual(provider.__class__.__name__, "OpenAiCompatible")
|
|
231
231
|
self.assertEqual(len(provider.models), 96)
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
if __name__ == "__main__":
|
|
235
|
+
unittest.main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/codemirror/addon/edit/closetag.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/codemirror/addon/edit/matchtags.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/codemirror/doc/source_sans.woff
RENAMED
|
File without changes
|
{llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/codemirror/mode/clike/clike.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/codemirror/mode/python/python.js
RENAMED
|
File without changes
|
{llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/core_tools/ui/codemirror/theme/dracula.css
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/contrib/mathtex-script-type.min.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/contrib/render-a11y-string.min.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Bold.woff
RENAMED
|
File without changes
|
{llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Bold.woff2
RENAMED
|
File without changes
|
{llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Regular.ttf
RENAMED
|
File without changes
|
{llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Regular.woff
RENAMED
|
File without changes
|
{llms_py-3.0.11 → llms_py-3.0.13}/llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Regular.woff2
RENAMED
|
File without changes
|