Skip to content

Commit c168e1c

Browse files
committed
types
1 parent 6b019bf commit c168e1c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/inferencesh/models/llm.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,20 @@ class LLMUsageMixin(BaseModel):
121121
default=None
122122
)
123123

124+
class ReasoningMixin(BaseModel):
125+
"""Mixin for models that support reasoning."""
126+
reasoning: Optional[str] = Field(
127+
description="The reasoning output of the model",
128+
default=None
129+
)
130+
131+
class ToolCallsMixin(BaseModel):
132+
"""Mixin for models that support tool calls."""
133+
tool_calls: Optional[List[Dict[str, Any]]] = Field(
134+
description="Tool calls for function calling",
135+
default=None
136+
)
137+
124138
# Example of how to use:
125139
class LLMOutput(BaseLLMOutput, LLMUsageMixin):
126140
"""Default LLM output model with token usage tracking."""

0 commit comments

Comments
 (0)