Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /li-boxuan_OpenDevin /openhands /security /invariant /nodes.py
| from typing import Any, Iterable | |
| from pydantic import BaseModel, Field | |
| from pydantic.dataclasses import dataclass | |
| class LLM: | |
| vendor: str | |
| model: str | |
| class Event(BaseModel): | |
| metadata: dict[str, Any] | None = Field( | |
| default_factory=lambda: dict(), description='Metadata associated with the event' | |
| ) | |
| class Function(BaseModel): | |
| name: str | |
| arguments: dict[str, Any] | |
| class ToolCall(Event): | |
| id: str | |
| type: str | |
| function: Function | |
| class Message(Event): | |
| role: str | |
| content: str | None | |
| tool_calls: list[ToolCall] | None = None | |
| def __rich_repr__( # type: ignore[override] | |
| self, | |
| ) -> Iterable[Any | tuple[Any] | tuple[str, Any] | tuple[str, Any, Any]]: | |
| # Print on separate line | |
| yield 'role', self.role | |
| yield 'content', self.content | |
| yield 'tool_calls', self.tool_calls | |
| class ToolOutput(Event): | |
| role: str | |
| content: str | |
| tool_call_id: str | None = None | |
| _tool_call: ToolCall | None = None | |
Xet Storage Details
- Size:
- 1.01 kB
- Xet hash:
- 8f257568497dc8848c4d9c954c15b91f2a9e355f455fb3aead993d95d810eb2e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.