2.0.0
Co-Authored-By: Quentin Torroba <quentin.torroba@mistral.ai> Co-Authored-By: Michel Thomazo <michel.thomazo@mistral.ai> Co-Authored-By: Clément Drouin <clement.drouin@mistral.ai> Co-Authored-By: Vincent Guilloux <vincent.guilloux@mistral.ai> Co-Authored-By: Clément Siriex <clement.sirieix@mistral.ai> Co-Authored-By: Kim-Adeline Miguel <kimadeline.miguel@mistral.ai> Co-Authored-By: Thaddee Tyl <thaddee.tyl@gmail.com> Co-Authored-By: David Brochart <david.brochart@gmail.com> Co-Authored-By: Joseph Guhlin <joseph.guhlin@gmail.com> Co-Authored-By: Thomas Kenbeek <thomaskenbeek@gmail.com> Co-Authored-By: Remenby31 <baptiste.cruvellier31@gmail.com>
This commit is contained in:
parent
79f215d91c
commit
d33db9fff8
217 changed files with 16911 additions and 4305 deletions
|
|
@ -1,8 +1,11 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from collections.abc import AsyncGenerator
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from vibe.core.tools.base import BaseTool, BaseToolConfig, BaseToolState
|
||||
from vibe.core.tools.base import BaseTool, BaseToolConfig, BaseToolState, InvokeContext
|
||||
from vibe.core.types import ToolStreamEvent
|
||||
|
||||
|
||||
class FakeToolArgs(BaseModel):
|
||||
|
|
@ -24,7 +27,9 @@ class FakeTool(BaseTool[FakeToolArgs, FakeToolResult, BaseToolConfig, FakeToolSt
|
|||
def get_name(cls) -> str:
|
||||
return "stub_tool"
|
||||
|
||||
async def run(self, args: FakeToolArgs) -> FakeToolResult:
|
||||
async def run(
|
||||
self, args: FakeToolArgs, ctx: InvokeContext | None = None
|
||||
) -> AsyncGenerator[ToolStreamEvent | FakeToolResult, None]:
|
||||
if self._exception_to_raise:
|
||||
raise self._exception_to_raise
|
||||
return FakeToolResult()
|
||||
yield FakeToolResult()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue