smolagents-withruntime 0.1.0__py3-none-any.whl
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.
- smolagents_withruntime/__init__.py +153 -0
- smolagents_withruntime/py.typed +0 -0
- smolagents_withruntime-0.1.0.dist-info/METADATA +79 -0
- smolagents_withruntime-0.1.0.dist-info/RECORD +7 -0
- smolagents_withruntime-0.1.0.dist-info/WHEEL +4 -0
- smolagents_withruntime-0.1.0.dist-info/entry_points.txt +2 -0
- smolagents_withruntime-0.1.0.dist-info/licenses/LICENSE +55 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"""Runtime Cloud sandboxes as a smolagents code executor.
|
|
2
|
+
|
|
3
|
+
``RuntimeExecutor`` runs the Python a ``CodeAgent`` writes in a Runtime Cloud
|
|
4
|
+
sandbox, a Firecracker microVM with its own kernel, through the sandbox's
|
|
5
|
+
stateful interpreter: variables, imports and files persist between steps, as
|
|
6
|
+
in E2B's or Modal's executor::
|
|
7
|
+
|
|
8
|
+
from smolagents import CodeAgent, InferenceClientModel
|
|
9
|
+
from smolagents_withruntime import RuntimeExecutor
|
|
10
|
+
|
|
11
|
+
agent = CodeAgent(tools=[], model=InferenceClientModel(), executor=RuntimeExecutor())
|
|
12
|
+
agent.run("What is the 20th Fibonacci number?")
|
|
13
|
+
agent.cleanup() # stops the sandbox
|
|
14
|
+
|
|
15
|
+
The package also registers ``runtime`` in the ``smolagents.executors`` entry
|
|
16
|
+
point group, so a smolagents release that loads executors from it accepts
|
|
17
|
+
``executor_type="runtime"``. The key comes from RUNTIME_API_KEY or the
|
|
18
|
+
machine's ``npx withruntime login``.
|
|
19
|
+
"""
|
|
20
|
+
from __future__ import annotations
|
|
21
|
+
|
|
22
|
+
import base64
|
|
23
|
+
import json
|
|
24
|
+
from io import BytesIO
|
|
25
|
+
from typing import Any
|
|
26
|
+
|
|
27
|
+
from smolagents.local_python_executor import CodeOutput
|
|
28
|
+
from smolagents.monitoring import AgentLogger, LogLevel
|
|
29
|
+
from smolagents.remote_executors import RemotePythonExecutor
|
|
30
|
+
from smolagents.utils import AgentError
|
|
31
|
+
from withruntime import Sandbox
|
|
32
|
+
|
|
33
|
+
__all__ = ["RuntimeExecutor"]
|
|
34
|
+
__version__ = "0.1.0"
|
|
35
|
+
|
|
36
|
+
# The richest representation first, as smolagents' E2B executor reads a result.
|
|
37
|
+
_DATA_TYPES = ("application/json", "text/html", "text/markdown", "text/latex", "image/svg+xml", "text/plain")
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class RuntimeExecutor(RemotePythonExecutor):
|
|
41
|
+
"""Run a CodeAgent's code in a Runtime Cloud sandbox.
|
|
42
|
+
|
|
43
|
+
Args:
|
|
44
|
+
additional_imports: Python packages to install in the sandbox first.
|
|
45
|
+
logger: The agent's logger; a default one is made when it is omitted.
|
|
46
|
+
allow_pickle: As for every smolagents remote executor: whether values
|
|
47
|
+
that JSON cannot carry may travel as pickles. Leave it False unless
|
|
48
|
+
you trust the sandbox's output.
|
|
49
|
+
sandbox: An existing ``withruntime.Sandbox`` to run in. The caller keeps
|
|
50
|
+
it; ``cleanup()`` leaves it running.
|
|
51
|
+
timeout_seconds: How long one code step may run, 60 by default.
|
|
52
|
+
**create: Sandbox fields for a new sandbox, such as ``image``,
|
|
53
|
+
``vcpu``, ``memory_mib``, ``network`` or ``labels``. The executor
|
|
54
|
+
owns that sandbox and ``cleanup()`` stops it.
|
|
55
|
+
"""
|
|
56
|
+
|
|
57
|
+
def __init__(
|
|
58
|
+
self,
|
|
59
|
+
additional_imports: list[str] | None = None,
|
|
60
|
+
logger: AgentLogger | None = None,
|
|
61
|
+
allow_pickle: bool = False,
|
|
62
|
+
*,
|
|
63
|
+
sandbox: Sandbox | None = None,
|
|
64
|
+
timeout_seconds: float = 60,
|
|
65
|
+
**create: Any,
|
|
66
|
+
):
|
|
67
|
+
super().__init__(list(additional_imports or []), logger or AgentLogger(level=LogLevel.INFO), allow_pickle)
|
|
68
|
+
self.timeout_ms = int(timeout_seconds * 1000)
|
|
69
|
+
self._owns_sandbox = sandbox is None
|
|
70
|
+
self.sandbox = sandbox if sandbox is not None else Sandbox.create(**create)
|
|
71
|
+
try:
|
|
72
|
+
self.installed_packages = self.install_packages(self.additional_imports)
|
|
73
|
+
except BaseException:
|
|
74
|
+
self.cleanup()
|
|
75
|
+
raise
|
|
76
|
+
self.logger.log(f"Runtime sandbox {self.sandbox.id} is running", level=LogLevel.INFO)
|
|
77
|
+
|
|
78
|
+
def run_code_raise_errors(self, code: str) -> CodeOutput:
|
|
79
|
+
execution = self.sandbox.interpreter.run(code, language="python", timeout_ms=self.timeout_ms)
|
|
80
|
+
logs = (execution.get("stdout") or "") + (execution.get("stderr") or "")
|
|
81
|
+
error = execution.get("error")
|
|
82
|
+
if error:
|
|
83
|
+
if error.get("name") == self.FINAL_ANSWER_EXCEPTION:
|
|
84
|
+
answer = self._deserialize_final_answer(error.get("value") or "", self.allow_pickle)
|
|
85
|
+
return CodeOutput(output=answer, logs=logs, is_final_answer=True)
|
|
86
|
+
raise AgentError(
|
|
87
|
+
f"{logs}\nExecuting code yielded an error:\n{error.get('name')}\n{error.get('value')}\n"
|
|
88
|
+
f"{error.get('traceback') or ''}",
|
|
89
|
+
self.logger,
|
|
90
|
+
)
|
|
91
|
+
if execution.get("status") not in (None, "ok"):
|
|
92
|
+
raise AgentError(f"{logs}\nExecuting code did not finish: {execution.get('status')}", self.logger)
|
|
93
|
+
return CodeOutput(output=_output(execution.get("results") or []), logs=logs, is_final_answer=False)
|
|
94
|
+
|
|
95
|
+
def install_packages(self, additional_imports: list[str]) -> list[str]:
|
|
96
|
+
"""Installs into the interpreter's own Python, which a shell's
|
|
97
|
+
``pip`` may not be."""
|
|
98
|
+
if additional_imports:
|
|
99
|
+
code = (
|
|
100
|
+
"import subprocess, sys\n"
|
|
101
|
+
f"_r = subprocess.run([sys.executable, '-m', 'pip', 'install', '--quiet', *{list(additional_imports)!r}],"
|
|
102
|
+
" capture_output=True, text=True)\n"
|
|
103
|
+
"print(_r.stdout[-2000:], _r.stderr[-2000:])\n"
|
|
104
|
+
"if _r.returncode: raise RuntimeError(f'pip install exited with {_r.returncode}')\n"
|
|
105
|
+
# pip installs into the user site, which a running interpreter
|
|
106
|
+
# leaves off sys.path when the folder did not exist at its start.
|
|
107
|
+
"import importlib, site\n"
|
|
108
|
+
"site.addsitedir(site.getusersitepackages())\n"
|
|
109
|
+
"importlib.invalidate_caches()"
|
|
110
|
+
)
|
|
111
|
+
self.logger.log(self.run_code_raise_errors(code).logs)
|
|
112
|
+
return list(additional_imports)
|
|
113
|
+
|
|
114
|
+
def cleanup(self) -> None:
|
|
115
|
+
"""Stops the sandbox this executor created; one passed in is left running."""
|
|
116
|
+
sandbox = self.__dict__.pop("sandbox", None)
|
|
117
|
+
if sandbox is None or not self._owns_sandbox:
|
|
118
|
+
return
|
|
119
|
+
try:
|
|
120
|
+
self.logger.log("Stopping the Runtime sandbox...", level=LogLevel.INFO)
|
|
121
|
+
sandbox.stop()
|
|
122
|
+
except Exception as e: # noqa: BLE001 - cleanup reports and never raises, as smolagents' executors do
|
|
123
|
+
self.logger.log_error(f"Error stopping the Runtime sandbox: {e}")
|
|
124
|
+
|
|
125
|
+
def delete(self) -> None:
|
|
126
|
+
self.cleanup()
|
|
127
|
+
|
|
128
|
+
def __del__(self) -> None:
|
|
129
|
+
try:
|
|
130
|
+
self.cleanup()
|
|
131
|
+
except Exception: # noqa: BLE001, S110 - nothing can be reported from a finalizer
|
|
132
|
+
pass
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
def _output(results: list[dict[str, Any]]) -> Any:
|
|
136
|
+
"""The main result, as E2B's executor returns it; else the last image a
|
|
137
|
+
cell displayed, such as a matplotlib figure; else None."""
|
|
138
|
+
main = next((r for r in results if r.get("main")), None)
|
|
139
|
+
images = [r for r in results if "image/png" in (r.get("data") or {}) or "image/jpeg" in (r.get("data") or {})]
|
|
140
|
+
chosen = main or (images[-1] if images else None)
|
|
141
|
+
if chosen is None:
|
|
142
|
+
return None
|
|
143
|
+
data = chosen.get("data") or {}
|
|
144
|
+
for kind in ("image/png", "image/jpeg"):
|
|
145
|
+
if kind in data:
|
|
146
|
+
import PIL.Image
|
|
147
|
+
|
|
148
|
+
return PIL.Image.open(BytesIO(base64.b64decode(data[kind])))
|
|
149
|
+
for kind in _DATA_TYPES:
|
|
150
|
+
if kind in data:
|
|
151
|
+
value = data[kind]
|
|
152
|
+
return json.loads(value) if kind == "application/json" and isinstance(value, str) else value
|
|
153
|
+
return None
|
|
File without changes
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: smolagents-withruntime
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Runtime Cloud sandboxes as a smolagents code executor: a CodeAgent's Python runs in a Firecracker microVM
|
|
5
|
+
Project-URL: Homepage, https://withruntime.com
|
|
6
|
+
Project-URL: Documentation, https://withruntime.com/learn/integrations/smolagents
|
|
7
|
+
Project-URL: Repository, https://github.com/withruntime/runtime/tree/main/integrations/smolagents
|
|
8
|
+
Author: Runtime LLC
|
|
9
|
+
License: Apache-2.0
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: ai agents,code execution,codeagent,executor,firecracker,hugging face,microvm,runtime,sandbox,smolagents
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
20
|
+
Classifier: Typing :: Typed
|
|
21
|
+
Requires-Python: <4.0,>=3.10
|
|
22
|
+
Requires-Dist: smolagents>=1.26
|
|
23
|
+
Requires-Dist: withruntime<1.0,>=0.9.0
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# smolagents-withruntime
|
|
27
|
+
|
|
28
|
+
Run the Python a [smolagents](https://github.com/huggingface/smolagents)
|
|
29
|
+
`CodeAgent` writes in a [Runtime Cloud](https://withruntime.com) sandbox, a
|
|
30
|
+
Firecracker microVM with its own Linux kernel, instead of in your own process.
|
|
31
|
+
It is a smolagents remote executor, like the E2B, Modal and Blaxel ones:
|
|
32
|
+
variables, imports and files persist between the agent's steps.
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip install smolagents-withruntime
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Set `RUNTIME_API_KEY` to a key from
|
|
39
|
+
[withruntime.com/account/keys](https://withruntime.com/account/keys), or run
|
|
40
|
+
`npx withruntime login` once on the machine.
|
|
41
|
+
|
|
42
|
+
```python
|
|
43
|
+
from smolagents import CodeAgent, InferenceClientModel
|
|
44
|
+
from smolagents_withruntime import RuntimeExecutor
|
|
45
|
+
|
|
46
|
+
agent = CodeAgent(
|
|
47
|
+
tools=[],
|
|
48
|
+
model=InferenceClientModel(),
|
|
49
|
+
executor=RuntimeExecutor(["pandas"]), # packages to install first
|
|
50
|
+
)
|
|
51
|
+
try:
|
|
52
|
+
agent.run("Load https://example.com/data.csv and give me the mean of the second column.")
|
|
53
|
+
finally:
|
|
54
|
+
agent.cleanup() # stops the sandbox
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`RuntimeExecutor(additional_imports, logger=None, allow_pickle=False, *, sandbox=None, timeout_seconds=60, **create)`:
|
|
58
|
+
|
|
59
|
+
- `**create` takes sandbox fields for a new sandbox, such as `image`, `vcpu`,
|
|
60
|
+
`memory_mib`, `network` or `labels`. The executor owns that sandbox and
|
|
61
|
+
`cleanup()` stops it.
|
|
62
|
+
- `sandbox=` runs in a `withruntime.Sandbox` you already have; `cleanup()`
|
|
63
|
+
leaves it running.
|
|
64
|
+
- `timeout_seconds` bounds each code step.
|
|
65
|
+
- A cell's main result comes back as its value; a figure a cell shows, such as
|
|
66
|
+
a matplotlib plot, comes back as a PIL image.
|
|
67
|
+
|
|
68
|
+
The package registers `runtime` in the `smolagents.executors` entry point
|
|
69
|
+
group, so once smolagents loads executors from it
|
|
70
|
+
([huggingface/smolagents#2722](https://github.com/huggingface/smolagents/issues/2722)),
|
|
71
|
+
`CodeAgent(..., executor_type="runtime")` works too.
|
|
72
|
+
|
|
73
|
+
## Tests
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
pip install -e . pytest
|
|
77
|
+
python -m pytest tests # no account needed
|
|
78
|
+
RUNTIME_API_KEY=... python scripts/e2e.py # a real sandbox, no model calls
|
|
79
|
+
```
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
smolagents_withruntime/__init__.py,sha256=ncZ1Z2U-2N_mlCuTXdS-dDFfrashndCTNWbaHjN1whQ,6996
|
|
2
|
+
smolagents_withruntime/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
smolagents_withruntime-0.1.0.dist-info/METADATA,sha256=-Ni1RhoshPHul-Fxz681iES2XCKP8HoJLL6lfnXXfJ0,3207
|
|
4
|
+
smolagents_withruntime-0.1.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
5
|
+
smolagents_withruntime-0.1.0.dist-info/entry_points.txt,sha256=BO5hg-Kr31ljKfnrmr7SO-SzQVGOYvYzrd4T0W-9sRo,72
|
|
6
|
+
smolagents_withruntime-0.1.0.dist-info/licenses/LICENSE,sha256=p9AL_VRSW8aUtuMvZMfrz15reuNle-XMEnZ7znRlSkc,9197
|
|
7
|
+
smolagents_withruntime-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
|
|
5
|
+
http://www.apache.org/licenses/
|
|
6
|
+
|
|
7
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
8
|
+
|
|
9
|
+
1. Definitions.
|
|
10
|
+
|
|
11
|
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
|
16
|
+
|
|
17
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
|
18
|
+
|
|
19
|
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
|
20
|
+
|
|
21
|
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
|
22
|
+
|
|
23
|
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
|
24
|
+
|
|
25
|
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
|
26
|
+
|
|
27
|
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
|
28
|
+
|
|
29
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
|
30
|
+
|
|
31
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
|
32
|
+
|
|
33
|
+
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
|
34
|
+
|
|
35
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
|
36
|
+
|
|
37
|
+
You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
|
38
|
+
|
|
39
|
+
You must cause any modified files to carry prominent notices stating that You changed the files; and
|
|
40
|
+
|
|
41
|
+
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
|
42
|
+
|
|
43
|
+
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
|
44
|
+
|
|
45
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
|
46
|
+
|
|
47
|
+
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
|
48
|
+
|
|
49
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
|
50
|
+
|
|
51
|
+
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
|
52
|
+
|
|
53
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
|
54
|
+
|
|
55
|
+
END OF TERMS AND CONDITIONS
|