llms-py 3.0.12__tar.gz → 3.0.14__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.12 → llms_py-3.0.14}/PKG-INFO +1 -1
- llms_py-3.0.14/llms/extensions/computer_use/__init__.py +27 -0
- llms_py-3.0.14/llms/extensions/computer_use/base.py +80 -0
- llms_py-3.0.14/llms/extensions/computer_use/bash.py +185 -0
- llms_py-3.0.14/llms/extensions/computer_use/computer.py +523 -0
- llms_py-3.0.14/llms/extensions/computer_use/edit.py +303 -0
- llms_py-3.0.14/llms/extensions/computer_use/platform.py +461 -0
- llms_py-3.0.14/llms/extensions/computer_use/run.py +37 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/providers/anthropic.py +22 -3
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/tools/ui/index.mjs +17 -5
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/main.py +84 -9
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/ai.mjs +1 -1
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/app.css +25 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/modules/chat/ChatBody.mjs +29 -11
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/modules/chat/index.mjs +1 -1
- {llms_py-3.0.12 → llms_py-3.0.14}/llms_py.egg-info/PKG-INFO +1 -1
- {llms_py-3.0.12 → llms_py-3.0.14}/llms_py.egg-info/SOURCES.txt +7 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/pyproject.toml +1 -1
- {llms_py-3.0.12 → llms_py-3.0.14}/setup.py +1 -1
- {llms_py-3.0.12 → llms_py-3.0.14}/LICENSE +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/MANIFEST.in +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/README.md +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/__init__.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/__main__.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/db.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/analytics/ui/index.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/app/README.md +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/app/__init__.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/app/db.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/app/ui/Recents.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/app/ui/index.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/app/ui/threadStore.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/core_tools/CALCULATOR.md +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/core_tools/__init__.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/core_tools/ui/codemirror/addon/edit/closebrackets.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/core_tools/ui/codemirror/addon/edit/closetag.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/core_tools/ui/codemirror/addon/edit/continuelist.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/core_tools/ui/codemirror/addon/edit/matchbrackets.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/core_tools/ui/codemirror/addon/edit/matchtags.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/core_tools/ui/codemirror/addon/edit/trailingspace.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/core_tools/ui/codemirror/addon/selection/active-line.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/core_tools/ui/codemirror/addon/selection/mark-selection.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/core_tools/ui/codemirror/addon/selection/selection-pointer.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/core_tools/ui/codemirror/codemirror.css +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/core_tools/ui/codemirror/codemirror.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/core_tools/ui/codemirror/doc/docs.css +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/core_tools/ui/codemirror/doc/source_sans.woff +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/core_tools/ui/codemirror/mode/clike/clike.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/core_tools/ui/codemirror/mode/javascript/index.html +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/core_tools/ui/codemirror/mode/javascript/javascript.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/core_tools/ui/codemirror/mode/javascript/typescript.html +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/core_tools/ui/codemirror/mode/python/python.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/core_tools/ui/codemirror/theme/dracula.css +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/core_tools/ui/codemirror/theme/mocha.css +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/core_tools/ui/index.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/gallery/README.md +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/gallery/__init__.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/gallery/db.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/gallery/ui/index.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/README.md +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/__init__.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/README.md +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/contrib/auto-render.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/contrib/auto-render.min.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/contrib/auto-render.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/contrib/copy-tex.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/contrib/copy-tex.min.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/contrib/copy-tex.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/contrib/mathtex-script-type.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/contrib/mathtex-script-type.min.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/contrib/mathtex-script-type.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/contrib/mhchem.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/contrib/mhchem.min.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/contrib/mhchem.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/contrib/render-a11y-string.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/contrib/render-a11y-string.min.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/contrib/render-a11y-string.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_AMS-Regular.ttf +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_AMS-Regular.woff +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Main-Bold.ttf +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Main-Bold.woff +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Main-Bold.woff2 +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Main-Italic.ttf +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Main-Italic.woff +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Main-Italic.woff2 +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Main-Regular.ttf +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Main-Regular.woff +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Main-Regular.woff2 +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Math-Italic.ttf +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Math-Italic.woff +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Math-Italic.woff2 +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Script-Regular.ttf +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Script-Regular.woff +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Script-Regular.woff2 +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Size1-Regular.ttf +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Size1-Regular.woff +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Size2-Regular.ttf +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Size2-Regular.woff +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Size3-Regular.ttf +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Size3-Regular.woff +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Size4-Regular.ttf +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Size4-Regular.woff +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/index.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/katex-swap.css +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/katex-swap.min.css +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/katex.css +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/katex.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/katex.min.css +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/katex.min.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/katex.min.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/katex/ui/katex.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/providers/__init__.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/providers/cerebras.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/providers/chutes.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/providers/google.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/providers/nvidia.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/providers/openai.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/providers/openrouter.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/providers/zai.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/system_prompts/README.md +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/system_prompts/__init__.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/system_prompts/ui/index.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/system_prompts/ui/prompts.json +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/extensions/tools/__init__.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/index.html +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/llms.json +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/providers-extra.json +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/providers.json +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/App.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/ctx.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/fav.svg +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/index.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/lib/chart.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/lib/charts.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/lib/color.js +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/lib/highlight.min.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/lib/idb.min.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/lib/marked.min.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/lib/servicestack-client.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/lib/servicestack-vue.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/lib/vue-router.min.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/lib/vue.min.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/lib/vue.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/markdown.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/modules/chat/SettingsDialog.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/modules/icons.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/modules/layout.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/modules/model-selector.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/tailwind.input.css +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/typography.css +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms/ui/utils.mjs +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms_py.egg-info/dependency_links.txt +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms_py.egg-info/entry_points.txt +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms_py.egg-info/not-zip-safe +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms_py.egg-info/requires.txt +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/llms_py.egg-info/top_level.txt +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/requirements.txt +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/setup.cfg +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/tests/test_async.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/tests/test_config.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/tests/test_core_tools_direct.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/tests/test_extensions.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/tests/test_gemini_tool_calling.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/tests/test_gemini_upload.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/tests/test_integration.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/tests/test_interleaved_thinking.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/tests/test_provider_checks.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/tests/test_provider_config.py +0 -0
- {llms_py-3.0.12 → llms_py-3.0.14}/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.14
|
|
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
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Anthropic's Computer Use Tools
|
|
3
|
+
https://github.com/anthropics/claude-quickstarts/tree/main/computer-use-demo
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
import os
|
|
7
|
+
|
|
8
|
+
from .bash import open, run_bash
|
|
9
|
+
from .computer import computer
|
|
10
|
+
from .edit import edit
|
|
11
|
+
from .platform import get_display_num, get_screen_resolution
|
|
12
|
+
|
|
13
|
+
width, height = get_screen_resolution()
|
|
14
|
+
# set enviroment variables
|
|
15
|
+
os.environ["WIDTH"] = str(width)
|
|
16
|
+
os.environ["HEIGHT"] = str(height)
|
|
17
|
+
os.environ["DISPLAY_NUM"] = str(get_display_num())
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def install(ctx):
|
|
21
|
+
ctx.register_tool(run_bash, group="computer_use")
|
|
22
|
+
ctx.register_tool(open, group="computer_use")
|
|
23
|
+
ctx.register_tool(edit, group="computer_use")
|
|
24
|
+
ctx.register_tool(computer, group="computer_use")
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
__install__ = install
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
from abc import ABCMeta, abstractmethod
|
|
2
|
+
from dataclasses import dataclass, fields, replace
|
|
3
|
+
from typing import Any
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class BaseTool(metaclass=ABCMeta):
|
|
7
|
+
"""Abstract base class"""
|
|
8
|
+
|
|
9
|
+
@abstractmethod
|
|
10
|
+
def __call__(self, **kwargs) -> Any:
|
|
11
|
+
"""Executes the tool with the given arguments."""
|
|
12
|
+
...
|
|
13
|
+
|
|
14
|
+
@abstractmethod
|
|
15
|
+
def to_params(
|
|
16
|
+
self,
|
|
17
|
+
) -> Any:
|
|
18
|
+
raise NotImplementedError
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@dataclass(kw_only=True, frozen=True)
|
|
22
|
+
class ToolResult:
|
|
23
|
+
"""Represents the result of a tool execution."""
|
|
24
|
+
|
|
25
|
+
output: str | None = None
|
|
26
|
+
error: str | None = None
|
|
27
|
+
base64_image: str | None = None
|
|
28
|
+
system: str | None = None
|
|
29
|
+
|
|
30
|
+
def __bool__(self):
|
|
31
|
+
return any(getattr(self, field.name) for field in fields(self))
|
|
32
|
+
|
|
33
|
+
def __add__(self, other: "ToolResult"):
|
|
34
|
+
def combine_fields(field: str | None, other_field: str | None, concatenate: bool = True):
|
|
35
|
+
if field and other_field:
|
|
36
|
+
if concatenate:
|
|
37
|
+
return field + other_field
|
|
38
|
+
raise ValueError("Cannot combine tool results")
|
|
39
|
+
return field or other_field
|
|
40
|
+
|
|
41
|
+
return ToolResult(
|
|
42
|
+
output=combine_fields(self.output, other.output),
|
|
43
|
+
error=combine_fields(self.error, other.error),
|
|
44
|
+
base64_image=combine_fields(self.base64_image, other.base64_image, False),
|
|
45
|
+
system=combine_fields(self.system, other.system),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
def replace(self, **kwargs):
|
|
49
|
+
"""Returns a new ToolResult with the given fields replaced."""
|
|
50
|
+
return replace(self, **kwargs)
|
|
51
|
+
|
|
52
|
+
def to_tool_results(self) -> list[dict[str, Any]]:
|
|
53
|
+
text = ""
|
|
54
|
+
if self.output:
|
|
55
|
+
text += f"{self.output}\n"
|
|
56
|
+
if self.error:
|
|
57
|
+
text += f"stderr: {self.error}\n"
|
|
58
|
+
if self.system:
|
|
59
|
+
text += f"system: {self.system}\n"
|
|
60
|
+
ret = []
|
|
61
|
+
if text:
|
|
62
|
+
ret.append({"type": "text", "text": text})
|
|
63
|
+
if self.base64_image:
|
|
64
|
+
ret.append({"type": "image", "format": "png", "data": self.base64_image})
|
|
65
|
+
return ret
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class CLIResult(ToolResult):
|
|
69
|
+
"""A ToolResult that can be rendered as a CLI output."""
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class ToolFailure(ToolResult):
|
|
73
|
+
"""A ToolResult that represents a failure."""
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
class ToolError(Exception):
|
|
77
|
+
"""Raised when a tool encounters an error."""
|
|
78
|
+
|
|
79
|
+
def __init__(self, message):
|
|
80
|
+
self.message = message
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
import os
|
|
3
|
+
import sys
|
|
4
|
+
from typing import Annotated, Any, Literal
|
|
5
|
+
|
|
6
|
+
from .base import BaseTool, CLIResult, ToolError, ToolResult
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class _BashSession:
|
|
10
|
+
"""A session of a bash shell."""
|
|
11
|
+
|
|
12
|
+
_started: bool
|
|
13
|
+
_process: asyncio.subprocess.Process
|
|
14
|
+
|
|
15
|
+
command: str = "/bin/bash"
|
|
16
|
+
_output_delay: float = 0.2 # seconds
|
|
17
|
+
_timeout: float = 120.0 # seconds
|
|
18
|
+
_sentinel: str = "<<exit>>"
|
|
19
|
+
|
|
20
|
+
def __init__(self):
|
|
21
|
+
self._started = False
|
|
22
|
+
self._timed_out = False
|
|
23
|
+
|
|
24
|
+
async def start(self):
|
|
25
|
+
if self._started:
|
|
26
|
+
return
|
|
27
|
+
|
|
28
|
+
self._process = await asyncio.create_subprocess_shell(
|
|
29
|
+
self.command,
|
|
30
|
+
preexec_fn=os.setsid,
|
|
31
|
+
shell=True,
|
|
32
|
+
bufsize=0,
|
|
33
|
+
stdin=asyncio.subprocess.PIPE,
|
|
34
|
+
stdout=asyncio.subprocess.PIPE,
|
|
35
|
+
stderr=asyncio.subprocess.PIPE,
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
self._started = True
|
|
39
|
+
|
|
40
|
+
def stop(self):
|
|
41
|
+
"""Terminate the bash shell."""
|
|
42
|
+
if not self._started:
|
|
43
|
+
raise ToolError("Session has not started.")
|
|
44
|
+
if self._process.returncode is not None:
|
|
45
|
+
return
|
|
46
|
+
self._process.terminate()
|
|
47
|
+
|
|
48
|
+
async def run(self, command: str):
|
|
49
|
+
"""Execute a command in the bash shell."""
|
|
50
|
+
if not self._started:
|
|
51
|
+
raise ToolError("Session has not started.")
|
|
52
|
+
if self._process.returncode is not None:
|
|
53
|
+
return ToolResult(
|
|
54
|
+
system="tool must be restarted",
|
|
55
|
+
error=f"bash has exited with returncode {self._process.returncode}",
|
|
56
|
+
)
|
|
57
|
+
if self._timed_out:
|
|
58
|
+
raise ToolError(
|
|
59
|
+
f"timed out: bash has not returned in {self._timeout} seconds and must be restarted",
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
# we know these are not None because we created the process with PIPEs
|
|
63
|
+
assert self._process.stdin
|
|
64
|
+
assert self._process.stdout
|
|
65
|
+
assert self._process.stderr
|
|
66
|
+
|
|
67
|
+
# send command to the process
|
|
68
|
+
self._process.stdin.write(command.encode() + f"; echo '{self._sentinel}'\n".encode())
|
|
69
|
+
await self._process.stdin.drain()
|
|
70
|
+
|
|
71
|
+
# read output from the process, until the sentinel is found
|
|
72
|
+
try:
|
|
73
|
+
async with asyncio.timeout(self._timeout):
|
|
74
|
+
while True:
|
|
75
|
+
await asyncio.sleep(self._output_delay)
|
|
76
|
+
# if we read directly from stdout/stderr, it will wait forever for
|
|
77
|
+
# EOF. use the StreamReader buffer directly instead.
|
|
78
|
+
output = self._process.stdout._buffer.decode() # pyright: ignore[reportAttributeAccessIssue]
|
|
79
|
+
if self._sentinel in output:
|
|
80
|
+
# strip the sentinel and break
|
|
81
|
+
output = output[: output.index(self._sentinel)]
|
|
82
|
+
break
|
|
83
|
+
except asyncio.TimeoutError:
|
|
84
|
+
self._timed_out = True
|
|
85
|
+
raise ToolError(
|
|
86
|
+
f"timed out: bash has not returned in {self._timeout} seconds and must be restarted",
|
|
87
|
+
) from None
|
|
88
|
+
|
|
89
|
+
if output.endswith("\n"):
|
|
90
|
+
output = output[:-1]
|
|
91
|
+
|
|
92
|
+
error = self._process.stderr._buffer.decode() # pyright: ignore[reportAttributeAccessIssue]
|
|
93
|
+
if error.endswith("\n"):
|
|
94
|
+
error = error[:-1]
|
|
95
|
+
|
|
96
|
+
# clear the buffers so that the next output can be read correctly
|
|
97
|
+
self._process.stdout._buffer.clear() # pyright: ignore[reportAttributeAccessIssue]
|
|
98
|
+
self._process.stderr._buffer.clear() # pyright: ignore[reportAttributeAccessIssue]
|
|
99
|
+
|
|
100
|
+
return CLIResult(output=output, error=error)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
class BashTool20250124(BaseTool):
|
|
104
|
+
"""
|
|
105
|
+
A tool that allows the agent to run bash commands.
|
|
106
|
+
The tool parameters are defined by Anthropic and are not editable.
|
|
107
|
+
"""
|
|
108
|
+
|
|
109
|
+
_session: _BashSession | None
|
|
110
|
+
|
|
111
|
+
api_type: Literal["bash_20250124"] = "bash_20250124"
|
|
112
|
+
name: Literal["bash"] = "bash"
|
|
113
|
+
|
|
114
|
+
def __init__(self):
|
|
115
|
+
self._session = None
|
|
116
|
+
super().__init__()
|
|
117
|
+
|
|
118
|
+
def to_params(self) -> Any:
|
|
119
|
+
return {
|
|
120
|
+
"type": self.api_type,
|
|
121
|
+
"name": self.name,
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
async def __call__(self, command: str | None = None, restart: bool = False, **kwargs):
|
|
125
|
+
if restart:
|
|
126
|
+
if self._session:
|
|
127
|
+
self._session.stop()
|
|
128
|
+
self._session = _BashSession()
|
|
129
|
+
await self._session.start()
|
|
130
|
+
|
|
131
|
+
return ToolResult(system="tool has been restarted.")
|
|
132
|
+
|
|
133
|
+
if self._session is None:
|
|
134
|
+
self._session = _BashSession()
|
|
135
|
+
await self._session.start()
|
|
136
|
+
|
|
137
|
+
if command is not None:
|
|
138
|
+
return await self._session.run(command)
|
|
139
|
+
|
|
140
|
+
raise ToolError("no command provided.")
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
class BashTool20241022(BashTool20250124):
|
|
144
|
+
api_type: Literal["bash_20250124"] = "bash_20250124" # pyright: ignore[reportIncompatibleVariableOverride]
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
g_tool = None
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
async def run_bash(
|
|
151
|
+
command: Annotated[str | None, "Command to run"],
|
|
152
|
+
restart: Annotated[bool, "Restart the bash session"] = False,
|
|
153
|
+
) -> list[dict[str, Any]]:
|
|
154
|
+
"""
|
|
155
|
+
A tool that allows the agent to run bash commands.
|
|
156
|
+
"""
|
|
157
|
+
global g_tool
|
|
158
|
+
if g_tool is None:
|
|
159
|
+
g_tool = BashTool20241022()
|
|
160
|
+
|
|
161
|
+
result = await g_tool(command, restart)
|
|
162
|
+
if isinstance(result, Exception):
|
|
163
|
+
raise result
|
|
164
|
+
else:
|
|
165
|
+
return result.to_tool_results()
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
async def open(target: Annotated[str, "URL or file path to open"]) -> list[dict[str, Any]]:
|
|
169
|
+
"""
|
|
170
|
+
Open a URL or file using the appropriate system opener, uses `xdg-open` on Linux, `open` on macOS, and `start` on Windows.
|
|
171
|
+
"""
|
|
172
|
+
target = target.strip()
|
|
173
|
+
if not target:
|
|
174
|
+
raise ValueError("No target specified")
|
|
175
|
+
|
|
176
|
+
platform = sys.platform
|
|
177
|
+
|
|
178
|
+
if platform == "darwin":
|
|
179
|
+
cmd = ["open", target]
|
|
180
|
+
elif platform == "win32":
|
|
181
|
+
cmd = ["cmd", "/c", "start", "", target]
|
|
182
|
+
else: # Linux and other Unix-like
|
|
183
|
+
cmd = ["xdg-open", target]
|
|
184
|
+
|
|
185
|
+
return await run_bash(" ".join(cmd))
|