llmling 0.0.1__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.
Files changed (87) hide show
  1. llmling-0.0.1/.copier-answers.yml +21 -0
  2. llmling-0.0.1/.github/FUNDING.yml +3 -0
  3. llmling-0.0.1/.github/copilot-instructions.md +19 -0
  4. llmling-0.0.1/.github/dependabot.yml +9 -0
  5. llmling-0.0.1/.github/workflows/build.yml +88 -0
  6. llmling-0.0.1/.github/workflows/documentation.yml +57 -0
  7. llmling-0.0.1/.gitignore +30 -0
  8. llmling-0.0.1/.logfire/.gitignore +1 -0
  9. llmling-0.0.1/.logfire/logfire_credentials.json +6 -0
  10. llmling-0.0.1/.pre-commit-config.yaml +48 -0
  11. llmling-0.0.1/LICENSE +22 -0
  12. llmling-0.0.1/PKG-INFO +146 -0
  13. llmling-0.0.1/README.md +90 -0
  14. llmling-0.0.1/docs/.empty +0 -0
  15. llmling-0.0.1/duties.py +60 -0
  16. llmling-0.0.1/mkdocs.yml +92 -0
  17. llmling-0.0.1/overrides/_dummy.txt +1 -0
  18. llmling-0.0.1/pyproject.toml +262 -0
  19. llmling-0.0.1/src/llmling/__init__.py +115 -0
  20. llmling-0.0.1/src/llmling/client.py +548 -0
  21. llmling-0.0.1/src/llmling/config/__init__.py +32 -0
  22. llmling-0.0.1/src/llmling/config/loading.py +119 -0
  23. llmling-0.0.1/src/llmling/config/manager.py +145 -0
  24. llmling-0.0.1/src/llmling/config/models.py +284 -0
  25. llmling-0.0.1/src/llmling/config/validation.py +192 -0
  26. llmling-0.0.1/src/llmling/context/__init__.py +32 -0
  27. llmling-0.0.1/src/llmling/context/base.py +55 -0
  28. llmling-0.0.1/src/llmling/context/loaders/__init__.py +15 -0
  29. llmling-0.0.1/src/llmling/context/loaders/callable.py +61 -0
  30. llmling-0.0.1/src/llmling/context/loaders/cli.py +109 -0
  31. llmling-0.0.1/src/llmling/context/loaders/path.py +65 -0
  32. llmling-0.0.1/src/llmling/context/loaders/source.py +66 -0
  33. llmling-0.0.1/src/llmling/context/loaders/text.py +54 -0
  34. llmling-0.0.1/src/llmling/context/models.py +36 -0
  35. llmling-0.0.1/src/llmling/context/registry.py +53 -0
  36. llmling-0.0.1/src/llmling/core/__init__.py +0 -0
  37. llmling-0.0.1/src/llmling/core/exceptions.py +43 -0
  38. llmling-0.0.1/src/llmling/core/log.py +59 -0
  39. llmling-0.0.1/src/llmling/core/typedefs.py +31 -0
  40. llmling-0.0.1/src/llmling/core/utils.py +36 -0
  41. llmling-0.0.1/src/llmling/llm/__init__.py +0 -0
  42. llmling-0.0.1/src/llmling/llm/base.py +160 -0
  43. llmling-0.0.1/src/llmling/llm/providers/__init__.py +0 -0
  44. llmling-0.0.1/src/llmling/llm/providers/litellm.py +286 -0
  45. llmling-0.0.1/src/llmling/llm/registry.py +77 -0
  46. llmling-0.0.1/src/llmling/processors/__init__.py +87 -0
  47. llmling-0.0.1/src/llmling/processors/base.py +200 -0
  48. llmling-0.0.1/src/llmling/processors/implementations/__init__.py +0 -0
  49. llmling-0.0.1/src/llmling/processors/implementations/function.py +92 -0
  50. llmling-0.0.1/src/llmling/processors/implementations/template.py +58 -0
  51. llmling-0.0.1/src/llmling/processors/registry.py +381 -0
  52. llmling-0.0.1/src/llmling/py.typed +0 -0
  53. llmling-0.0.1/src/llmling/resources/system_tools.yml +21 -0
  54. llmling-0.0.1/src/llmling/resources/test.yml +178 -0
  55. llmling-0.0.1/src/llmling/resources/web_research.yml +28 -0
  56. llmling-0.0.1/src/llmling/task/__init__.py +71 -0
  57. llmling-0.0.1/src/llmling/task/concurrent.py +63 -0
  58. llmling-0.0.1/src/llmling/task/executor.py +308 -0
  59. llmling-0.0.1/src/llmling/task/manager.py +182 -0
  60. llmling-0.0.1/src/llmling/task/models.py +44 -0
  61. llmling-0.0.1/src/llmling/testing/__init__.py +4 -0
  62. llmling-0.0.1/src/llmling/testing/processors.py +40 -0
  63. llmling-0.0.1/src/llmling/testing/tools.py +38 -0
  64. llmling-0.0.1/src/llmling/testtest.py +112 -0
  65. llmling-0.0.1/src/llmling/tools/__init__.py +14 -0
  66. llmling-0.0.1/src/llmling/tools/actions.py +37 -0
  67. llmling-0.0.1/src/llmling/tools/base.py +197 -0
  68. llmling-0.0.1/src/llmling/tools/browser.py +159 -0
  69. llmling-0.0.1/src/llmling/tools/code.py +64 -0
  70. llmling-0.0.1/src/llmling/tools/exceptions.py +21 -0
  71. llmling-0.0.1/src/llmling/utils/__init__.py +1 -0
  72. llmling-0.0.1/src/llmling/utils/calling.py +74 -0
  73. llmling-0.0.1/src/llmling/utils/importing.py +69 -0
  74. llmling-0.0.1/tests/__init__.py +3 -0
  75. llmling-0.0.1/tests/conftest.py +1 -0
  76. llmling-0.0.1/tests/helpers.py +35 -0
  77. llmling-0.0.1/tests/test_client.py +338 -0
  78. llmling-0.0.1/tests/test_concurrent.py +228 -0
  79. llmling-0.0.1/tests/test_config.py +244 -0
  80. llmling-0.0.1/tests/test_config_manager.py +125 -0
  81. llmling-0.0.1/tests/test_context.py +312 -0
  82. llmling-0.0.1/tests/test_llm.py +372 -0
  83. llmling-0.0.1/tests/test_processors.py +379 -0
  84. llmling-0.0.1/tests/test_task_manager.py +109 -0
  85. llmling-0.0.1/tests/test_taskexecutor.py +448 -0
  86. llmling-0.0.1/tests/test_tool_integration.py +215 -0
  87. llmling-0.0.1/tests/test_tools.py +201 -0
@@ -0,0 +1,21 @@
1
+ # Changes here will be overwritten by Copier
2
+ _commit: v1.6.4
3
+ _src_path: .\copier-phil65\
4
+ author_email: philipptemminghoff@googlemail.com
5
+ author_fullname: Philipp Temminghoff
6
+ author_username: phil65
7
+ copyright_date: '2024'
8
+ copyright_holder: Philipp Temminghoff
9
+ copyright_holder_email: philipptemminghoff@googlemail.com
10
+ libraries_use_pydantic: true
11
+ libraries_use_qt: false
12
+ project_description: LLM simplified.
13
+ project_name: LLMling
14
+ python_minimum_version: '3.12'
15
+ python_package_command_line_name: llmling
16
+ python_package_distribution_name: llmling
17
+ python_package_import_name: llmling
18
+ repository_name: llmling
19
+ repository_namespace: phil65
20
+ repository_provider: github.com
21
+
@@ -0,0 +1,3 @@
1
+ github: phil65
2
+ custom:
3
+ - https://www.paypal.me/phil65
@@ -0,0 +1,19 @@
1
+ ## Code style
2
+
3
+ You can assume Python 3.12.
4
+ Use newest language features if possible
5
+ Consider using pattern matching, walrus operators and other new syntax features.
6
+ Adhere to pep8.
7
+
8
+ ## Tests
9
+
10
+ Tests are written using PyTest. Dont put tests into a class.
11
+
12
+ ## DocStrings
13
+
14
+ DocStrings are written in google-style.
15
+ Dont add the types to the "Args" section.
16
+ Only add a Return section if a value is returned and the meaning of the returned value
17
+ is not obvious.
18
+ You can use markdown admonitions with python-markdown syntax if neccessary (!!! info, !!! note, !!! warning).
19
+ You can use markdown tables and markdown lists if neccessary.
@@ -0,0 +1,9 @@
1
+ # Set update schedule for GitHub Actions
2
+
3
+ version: 2
4
+ updates:
5
+ - package-ecosystem: "github-actions"
6
+ directory: "/"
7
+ schedule:
8
+ # Check for updates to GitHub Actions every week
9
+ interval: "weekly"
@@ -0,0 +1,88 @@
1
+ name: Build
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ test:
7
+ runs-on: ${{ matrix.os }}
8
+ continue-on-error: ${{ matrix.python_version == '3.14' }}
9
+ strategy:
10
+ matrix:
11
+ python_version: ["3.12", "3.13", "3.14"]
12
+ os: ["ubuntu-latest", "macos-latest", "windows-latest"]
13
+ steps:
14
+ - name: Check out repository
15
+ uses: actions/checkout@v4
16
+
17
+ - name: Set up Python ${{ matrix.python_version }}
18
+ uses: actions/setup-python@v5
19
+ with:
20
+ python-version: ${{ matrix.python_version }}
21
+ allow-prereleases: true
22
+
23
+ - name: Install uv
24
+ uses: astral-sh/setup-uv@v3
25
+ with:
26
+ enable-cache: true
27
+ cache-dependency-glob: pyproject.toml
28
+ cache-suffix: py${{ matrix.python_version }}
29
+
30
+ - name: Install dependencies (uv sync)
31
+ run: uv sync --all-extras --no-group docs
32
+
33
+ - name: Check for code issues (ruff check)
34
+ uses: astral-sh/ruff-action@v1
35
+
36
+ - name: Check code format (ruff format)
37
+ uses: astral-sh/ruff-action@v1
38
+ with:
39
+ args: "format --check"
40
+
41
+ - name: Static type checking (MyPy)
42
+ run: uv run --no-group docs mypy src/llmling/
43
+
44
+ - name: Run tests
45
+ run: uv run --no-group docs pytest --cov-report=xml --cov=src/llmling/ --cov-report=term-missing
46
+
47
+ - name: Upload test results to Codecov
48
+ uses: codecov/codecov-action@v5
49
+ with:
50
+ fail_ci_if_error: false
51
+ verbose: true
52
+
53
+ release:
54
+ runs-on: ubuntu-latest
55
+ needs: test
56
+ if: startsWith(github.ref, 'refs/tags/')
57
+ permissions:
58
+ # this permission is mandatory for trusted publishing
59
+ id-token: write
60
+ contents: write
61
+ steps:
62
+ - name: Check out repository
63
+ uses: actions/checkout@v4
64
+
65
+ - name: Set up Python
66
+ uses: actions/setup-python@v5
67
+ with:
68
+ python-version: "3.12"
69
+
70
+ - name: Install uv
71
+ uses: astral-sh/setup-uv@v3
72
+ with:
73
+ enable-cache: true
74
+ cache-dependency-glob: pyproject.toml
75
+ cache-suffix: py${{ matrix.python_version }}
76
+
77
+ - name: Build package
78
+ run: uv build
79
+
80
+ - name: Publish package distributions to PyPI
81
+ uses: pypa/gh-action-pypi-publish@release/v1
82
+
83
+ - name: Release package on GitHub
84
+ uses: ncipollo/release-action@v1
85
+ with:
86
+ body: ${{ github.event.head_commit.message }}
87
+ artifacts: dist/*.whl,dist/*.tar.gz
88
+ token: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,57 @@
1
+ name: Build documentation
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9
+ permissions:
10
+ contents: read
11
+ pages: write
12
+ id-token: write
13
+
14
+ # Allow one concurrent deployment
15
+ concurrency:
16
+ group: "pages"
17
+ cancel-in-progress: true
18
+
19
+ # Default to bash
20
+ defaults:
21
+ run:
22
+ shell: bash
23
+
24
+ jobs:
25
+ build:
26
+ runs-on: ubuntu-latest
27
+
28
+ steps:
29
+ - uses: actions/checkout@v4
30
+ with:
31
+ fetch-depth: 0
32
+ - name: Set up Python
33
+ uses: actions/setup-python@v5
34
+ with:
35
+ python-version: "3.12"
36
+ - name: Install uv
37
+ uses: astral-sh/setup-uv@v3
38
+ - name: Install dependencies
39
+ run: |
40
+ uv sync --all-extras
41
+ - name: Build
42
+ run: uv run mknodes build
43
+ - name: Upload artifact
44
+ uses: actions/upload-pages-artifact@v3
45
+ with:
46
+ path: ./site
47
+
48
+ deploy:
49
+ environment:
50
+ name: github-pages
51
+ url: ${{ steps.deployment.outputs.page_url }}
52
+ runs-on: ubuntu-latest
53
+ needs: build
54
+ steps:
55
+ - name: Deploy to GitHub Pages
56
+ id: deployment
57
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,30 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ # Distribution / packaging
5
+ *.sublime-workspace
6
+ # Unit test / coverage reports
7
+ .coverage
8
+ coverage.xml
9
+ .cache
10
+ .hatch
11
+ .pytest_cache/
12
+ junit.xml
13
+ # Jupyter Notebook
14
+ .ipynb_checkpoints
15
+ # pyenv
16
+ .python-version
17
+ # dotenv
18
+ .env
19
+ # virtualenv
20
+ .venv
21
+ # mkdocs documentation
22
+ /site
23
+ # mypy
24
+ .mypy_cache/
25
+ # .vscode
26
+ .vscode/
27
+ # OS files
28
+ .DS_Store
29
+ # uv
30
+ uv.lock
@@ -0,0 +1 @@
1
+ *
@@ -0,0 +1,6 @@
1
+ {
2
+ "token": "RHQ1xVrGxhtMt7j7YfYScZjppwpC64tfVdjVbLFt4x3L",
3
+ "project_name": "llmling",
4
+ "project_url": "https://logfire.pydantic.dev/phil65/llmling",
5
+ "logfire_api_url": "https://logfire-api.pydantic.dev"
6
+ }
@@ -0,0 +1,48 @@
1
+ default_language_version:
2
+ python: python3.12
3
+ default_stages: [pre-commit]
4
+ repos:
5
+ - repo: local
6
+ hooks:
7
+ - id: pytest-check
8
+ name: pytest-check
9
+ entry: uv run pytest
10
+ language: system
11
+ # stages: [push]
12
+ types: [python]
13
+ pass_filenames: false
14
+ always_run: true
15
+
16
+ - repo: https://github.com/pre-commit/pre-commit-hooks
17
+ # https://pre-commit.com/hooks.html
18
+ rev: v5.0.0
19
+ hooks:
20
+ - id: check-added-large-files
21
+ - id: check-case-conflict
22
+ - id: check-merge-conflict
23
+ - id: check-toml
24
+ - id: check-json
25
+ - id: check-xml
26
+ - id: check-yaml
27
+ args: [--allow-multiple-documents, --unsafe]
28
+ - id: debug-statements
29
+ - id: detect-private-key
30
+
31
+ - repo: https://github.com/pre-commit/mirrors-mypy
32
+ rev: v1.13.0
33
+ hooks:
34
+ - id: mypy
35
+ additional_dependencies: [orjson, pydantic]
36
+
37
+ - repo: https://github.com/charliermarsh/ruff-pre-commit
38
+ rev: v0.7.2
39
+ hooks:
40
+ - id: ruff
41
+ - id: ruff-format
42
+
43
+ - repo: https://github.com/commitizen-tools/commitizen
44
+ rev: v3.30.0
45
+ hooks:
46
+ - id: commitizen
47
+ stages: [commit-msg]
48
+ additional_dependencies: [typing-extensions]
llmling-0.0.1/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024, Philipp Temminghoff
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
llmling-0.0.1/PKG-INFO ADDED
@@ -0,0 +1,146 @@
1
+ Metadata-Version: 2.3
2
+ Name: llmling
3
+ Version: 0.0.1
4
+ Summary: LLM simplified.
5
+ Project-URL: Documentation, https://phil65.github.io/llmling/
6
+ Project-URL: Source, https://github.com/phil65/llmling
7
+ Project-URL: Issues, https://github.com/phil65/llmling/issues
8
+ Project-URL: Discussions, https://github.com/phil65/llmling/discussions
9
+ Project-URL: Code coverage, https://app.codecov.io/gh/phil65/llmling
10
+ Author-email: Philipp Temminghoff <philipptemminghoff@googlemail.com>
11
+ License: MIT License
12
+
13
+ Copyright (c) 2024, Philipp Temminghoff
14
+
15
+ Permission is hereby granted, free of charge, to any person obtaining a copy
16
+ of this software and associated documentation files (the "Software"), to deal
17
+ in the Software without restriction, including without limitation the rights
18
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19
+ copies of the Software, and to permit persons to whom the Software is
20
+ furnished to do so, subject to the following conditions:
21
+
22
+ The above copyright notice and this permission notice shall be included in all
23
+ copies or substantial portions of the Software.
24
+
25
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
+ SOFTWARE.
32
+
33
+ Classifier: Development Status :: 4 - Beta
34
+ Classifier: Intended Audience :: Developers
35
+ Classifier: Operating System :: OS Independent
36
+ Classifier: Programming Language :: Python :: 3
37
+ Classifier: Programming Language :: Python :: 3 :: Only
38
+ Classifier: Programming Language :: Python :: 3.12
39
+ Classifier: Programming Language :: Python :: 3.13
40
+ Classifier: Programming Language :: Python :: 3.14
41
+ Classifier: Topic :: Documentation
42
+ Classifier: Topic :: Software Development
43
+ Classifier: Topic :: Utilities
44
+ Classifier: Typing :: Typed
45
+ Requires-Python: >=3.12
46
+ Requires-Dist: fsspec[github,http]
47
+ Requires-Dist: jinja2>=3.1.4
48
+ Requires-Dist: litellm>=1.52.9
49
+ Requires-Dist: logfire>=2.3.0
50
+ Requires-Dist: playwright>=1.48.0
51
+ Requires-Dist: py2openai
52
+ Requires-Dist: pydantic
53
+ Requires-Dist: universal-pathlib>=0.2.5
54
+ Requires-Dist: yamling>=1.5.0
55
+ Description-Content-Type: text/markdown
56
+
57
+ # LLMling
58
+
59
+ [![PyPI License](https://img.shields.io/pypi/l/llmling.svg)](https://pypi.org/project/llmling/)
60
+ [![Package status](https://img.shields.io/pypi/status/llmling.svg)](https://pypi.org/project/llmling/)
61
+ [![Daily downloads](https://img.shields.io/pypi/dd/llmling.svg)](https://pypi.org/project/llmling/)
62
+ [![Weekly downloads](https://img.shields.io/pypi/dw/llmling.svg)](https://pypi.org/project/llmling/)
63
+ [![Monthly downloads](https://img.shields.io/pypi/dm/llmling.svg)](https://pypi.org/project/llmling/)
64
+ [![Distribution format](https://img.shields.io/pypi/format/llmling.svg)](https://pypi.org/project/llmling/)
65
+ [![Wheel availability](https://img.shields.io/pypi/wheel/llmling.svg)](https://pypi.org/project/llmling/)
66
+ [![Python version](https://img.shields.io/pypi/pyversions/llmling.svg)](https://pypi.org/project/llmling/)
67
+ [![Implementation](https://img.shields.io/pypi/implementation/llmling.svg)](https://pypi.org/project/llmling/)
68
+ [![Releases](https://img.shields.io/github/downloads/phil65/llmling/total.svg)](https://github.com/phil65/llmling/releases)
69
+ [![Github Contributors](https://img.shields.io/github/contributors/phil65/llmling)](https://github.com/phil65/llmling/graphs/contributors)
70
+ [![Github Discussions](https://img.shields.io/github/discussions/phil65/llmling)](https://github.com/phil65/llmling/discussions)
71
+ [![Github Forks](https://img.shields.io/github/forks/phil65/llmling)](https://github.com/phil65/llmling/forks)
72
+ [![Github Issues](https://img.shields.io/github/issues/phil65/llmling)](https://github.com/phil65/llmling/issues)
73
+ [![Github Issues](https://img.shields.io/github/issues-pr/phil65/llmling)](https://github.com/phil65/llmling/pulls)
74
+ [![Github Watchers](https://img.shields.io/github/watchers/phil65/llmling)](https://github.com/phil65/llmling/watchers)
75
+ [![Github Stars](https://img.shields.io/github/stars/phil65/llmling)](https://github.com/phil65/llmling/stars)
76
+ [![Github Repository size](https://img.shields.io/github/repo-size/phil65/llmling)](https://github.com/phil65/llmling)
77
+ [![Github last commit](https://img.shields.io/github/last-commit/phil65/llmling)](https://github.com/phil65/llmling/commits)
78
+ [![Github release date](https://img.shields.io/github/release-date/phil65/llmling)](https://github.com/phil65/llmling/releases)
79
+ [![Github language count](https://img.shields.io/github/languages/count/phil65/llmling)](https://github.com/phil65/llmling)
80
+ [![Github commits this week](https://img.shields.io/github/commit-activity/w/phil65/llmling)](https://github.com/phil65/llmling)
81
+ [![Github commits this month](https://img.shields.io/github/commit-activity/m/phil65/llmling)](https://github.com/phil65/llmling)
82
+ [![Github commits this year](https://img.shields.io/github/commit-activity/y/phil65/llmling)](https://github.com/phil65/llmling)
83
+ [![Package status](https://codecov.io/gh/phil65/llmling/branch/main/graph/badge.svg)](https://codecov.io/gh/phil65/llmling/)
84
+ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
85
+ [![PyUp](https://pyup.io/repos/github/phil65/llmling/shield.svg)](https://pyup.io/repos/github/phil65/llmling/)
86
+
87
+ [Read the documentation!](https://phil65.github.io/llmling/)
88
+
89
+
90
+ ```yaml
91
+ # Root level: Config
92
+ version: "1.0"
93
+ global_settings: # GlobalSettings
94
+ timeout: 30
95
+ max_retries: 3
96
+ temperature: 0.7
97
+
98
+ context_processors: # dict[str, ProcessorConfig]
99
+ processor1:
100
+ type: function
101
+ import_path: "utils.clean_text"
102
+ processor2:
103
+ type: template
104
+ template: "{{ content }}\n---"
105
+
106
+ llm_providers: # dict[str, LLMProvider]
107
+ gpt4:
108
+ model: openai/gpt-4
109
+ temperature: 0.7
110
+
111
+ provider_groups: # dict[str, list[str]]
112
+ fast_models:
113
+ - gpt4
114
+ - claude2
115
+
116
+ contexts: # dict[str, Context(PathContext | TextContext | CLIContext)]
117
+ guidelines:
118
+ type: path # PathContext
119
+ path: "./guide.md"
120
+ description: "Guide"
121
+ processors: # list[ProcessingStep]
122
+ - name: processor1
123
+ keyword_args: {key: "value"}
124
+
125
+ prompt:
126
+ type: text # TextContext
127
+ content: "System prompt"
128
+ description: "Basic prompt"
129
+
130
+ git_diff:
131
+ type: cli # CLIContext
132
+ command: "git diff"
133
+ description: "Changes"
134
+
135
+ context_groups: # dict[str, list[str]]
136
+ review_contexts:
137
+ - guidelines
138
+ - prompt
139
+
140
+ task_templates: # dict[str, TaskTemplate]
141
+ code_review:
142
+ provider: gpt4 # provider or group name
143
+ context: review_contexts # context or group name
144
+ settings: # TaskSettings
145
+ temperature: 0.5
146
+ ```
@@ -0,0 +1,90 @@
1
+ # LLMling
2
+
3
+ [![PyPI License](https://img.shields.io/pypi/l/llmling.svg)](https://pypi.org/project/llmling/)
4
+ [![Package status](https://img.shields.io/pypi/status/llmling.svg)](https://pypi.org/project/llmling/)
5
+ [![Daily downloads](https://img.shields.io/pypi/dd/llmling.svg)](https://pypi.org/project/llmling/)
6
+ [![Weekly downloads](https://img.shields.io/pypi/dw/llmling.svg)](https://pypi.org/project/llmling/)
7
+ [![Monthly downloads](https://img.shields.io/pypi/dm/llmling.svg)](https://pypi.org/project/llmling/)
8
+ [![Distribution format](https://img.shields.io/pypi/format/llmling.svg)](https://pypi.org/project/llmling/)
9
+ [![Wheel availability](https://img.shields.io/pypi/wheel/llmling.svg)](https://pypi.org/project/llmling/)
10
+ [![Python version](https://img.shields.io/pypi/pyversions/llmling.svg)](https://pypi.org/project/llmling/)
11
+ [![Implementation](https://img.shields.io/pypi/implementation/llmling.svg)](https://pypi.org/project/llmling/)
12
+ [![Releases](https://img.shields.io/github/downloads/phil65/llmling/total.svg)](https://github.com/phil65/llmling/releases)
13
+ [![Github Contributors](https://img.shields.io/github/contributors/phil65/llmling)](https://github.com/phil65/llmling/graphs/contributors)
14
+ [![Github Discussions](https://img.shields.io/github/discussions/phil65/llmling)](https://github.com/phil65/llmling/discussions)
15
+ [![Github Forks](https://img.shields.io/github/forks/phil65/llmling)](https://github.com/phil65/llmling/forks)
16
+ [![Github Issues](https://img.shields.io/github/issues/phil65/llmling)](https://github.com/phil65/llmling/issues)
17
+ [![Github Issues](https://img.shields.io/github/issues-pr/phil65/llmling)](https://github.com/phil65/llmling/pulls)
18
+ [![Github Watchers](https://img.shields.io/github/watchers/phil65/llmling)](https://github.com/phil65/llmling/watchers)
19
+ [![Github Stars](https://img.shields.io/github/stars/phil65/llmling)](https://github.com/phil65/llmling/stars)
20
+ [![Github Repository size](https://img.shields.io/github/repo-size/phil65/llmling)](https://github.com/phil65/llmling)
21
+ [![Github last commit](https://img.shields.io/github/last-commit/phil65/llmling)](https://github.com/phil65/llmling/commits)
22
+ [![Github release date](https://img.shields.io/github/release-date/phil65/llmling)](https://github.com/phil65/llmling/releases)
23
+ [![Github language count](https://img.shields.io/github/languages/count/phil65/llmling)](https://github.com/phil65/llmling)
24
+ [![Github commits this week](https://img.shields.io/github/commit-activity/w/phil65/llmling)](https://github.com/phil65/llmling)
25
+ [![Github commits this month](https://img.shields.io/github/commit-activity/m/phil65/llmling)](https://github.com/phil65/llmling)
26
+ [![Github commits this year](https://img.shields.io/github/commit-activity/y/phil65/llmling)](https://github.com/phil65/llmling)
27
+ [![Package status](https://codecov.io/gh/phil65/llmling/branch/main/graph/badge.svg)](https://codecov.io/gh/phil65/llmling/)
28
+ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
29
+ [![PyUp](https://pyup.io/repos/github/phil65/llmling/shield.svg)](https://pyup.io/repos/github/phil65/llmling/)
30
+
31
+ [Read the documentation!](https://phil65.github.io/llmling/)
32
+
33
+
34
+ ```yaml
35
+ # Root level: Config
36
+ version: "1.0"
37
+ global_settings: # GlobalSettings
38
+ timeout: 30
39
+ max_retries: 3
40
+ temperature: 0.7
41
+
42
+ context_processors: # dict[str, ProcessorConfig]
43
+ processor1:
44
+ type: function
45
+ import_path: "utils.clean_text"
46
+ processor2:
47
+ type: template
48
+ template: "{{ content }}\n---"
49
+
50
+ llm_providers: # dict[str, LLMProvider]
51
+ gpt4:
52
+ model: openai/gpt-4
53
+ temperature: 0.7
54
+
55
+ provider_groups: # dict[str, list[str]]
56
+ fast_models:
57
+ - gpt4
58
+ - claude2
59
+
60
+ contexts: # dict[str, Context(PathContext | TextContext | CLIContext)]
61
+ guidelines:
62
+ type: path # PathContext
63
+ path: "./guide.md"
64
+ description: "Guide"
65
+ processors: # list[ProcessingStep]
66
+ - name: processor1
67
+ keyword_args: {key: "value"}
68
+
69
+ prompt:
70
+ type: text # TextContext
71
+ content: "System prompt"
72
+ description: "Basic prompt"
73
+
74
+ git_diff:
75
+ type: cli # CLIContext
76
+ command: "git diff"
77
+ description: "Changes"
78
+
79
+ context_groups: # dict[str, list[str]]
80
+ review_contexts:
81
+ - guidelines
82
+ - prompt
83
+
84
+ task_templates: # dict[str, TaskTemplate]
85
+ code_review:
86
+ provider: gpt4 # provider or group name
87
+ context: review_contexts # context or group name
88
+ settings: # TaskSettings
89
+ temperature: 0.5
90
+ ```
File without changes
@@ -0,0 +1,60 @@
1
+ from __future__ import annotations
2
+
3
+ from duty import duty
4
+
5
+
6
+ @duty(capture=False)
7
+ def build(ctx, *args: str):
8
+ """Build a MkNodes page."""
9
+ args_str = " " + " ".join(args) if args else ""
10
+ ctx.run(f"uv run mknodes build{args_str}")
11
+
12
+
13
+ @duty(capture=False)
14
+ def serve(ctx, *args: str):
15
+ """Serve a MkNodes page."""
16
+ args_str = " " + " ".join(args) if args else ""
17
+ ctx.run(f"uv run mknodes serve{args_str}")
18
+
19
+
20
+ @duty(capture=False)
21
+ def test(ctx, *args: str):
22
+ """Serve a MkNodes page."""
23
+ args_str = " " + " ".join(args) if args else ""
24
+ ctx.run(f"uv run pytest{args_str}")
25
+
26
+
27
+ @duty(capture=False)
28
+ def clean(ctx):
29
+ """Clean all files from the Git directory except checked-in files."""
30
+ ctx.run("git clean -dfX")
31
+
32
+
33
+ @duty(capture=False)
34
+ def update(ctx):
35
+ """Update all environment packages using pip directly."""
36
+ ctx.run("uv lock --upgrade")
37
+ ctx.run("uv sync --all-extras")
38
+
39
+
40
+ @duty(capture=False)
41
+ def lint(ctx):
42
+ """Lint the code and fix issues if possible."""
43
+ ctx.run("uv run ruff check --fix --unsafe-fixes .")
44
+ ctx.run("uv run ruff format .")
45
+ ctx.run("uv run mypy src/llmling/")
46
+
47
+
48
+ @duty(capture=False)
49
+ def lint_check(ctx):
50
+ """Lint the code."""
51
+ ctx.run("uv run ruff check .")
52
+ ctx.run("uv run ruff format --check .")
53
+ ctx.run("uv run mypy src/llmling/")
54
+
55
+
56
+ @duty(capture=False)
57
+ def version(ctx, *args: str):
58
+ """Bump package version."""
59
+ args_str = " " + " ".join(args) if args else ""
60
+ ctx.run(f"hatch version{args_str}")