Skip to content

Commit 6a4f615

Browse files
committed
remove m.genslot in favor of m.act
1 parent 7d5c15d commit 6a4f615

File tree

2 files changed

+5
-27
lines changed

2 files changed

+5
-27
lines changed

mellea/stdlib/genslot.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from pydantic import BaseModel, Field, create_model
1010

1111
from mellea.stdlib.base import Component, TemplateRepresentation
12-
from mellea.stdlib.session import get_session
12+
from mellea.stdlib.session import MelleaSession, get_session
1313

1414
P = ParamSpec("P")
1515
R = TypeVar("R")
@@ -154,7 +154,7 @@ def __init__(self, func: Callable[P, R]):
154154

155155
def __call__(
156156
self,
157-
m=None,
157+
m: MelleaSession | None = None,
158158
model_options: dict | None = None,
159159
*args: P.args,
160160
**kwargs: P.kwargs,
@@ -180,13 +180,11 @@ def __call__(
180180

181181
response_model = create_response_format(self._function._func)
182182

183-
response = m.genslot(
184-
slot_copy, model_options=model_options, format=response_model
185-
)
183+
response = m.act(slot_copy, format=response_model, model_options=model_options)
186184

187185
function_response: FunctionResponse[R] = response_model.model_validate_json(
188-
response.value
189-
) # type: ignore
186+
response.value # type: ignore
187+
)
190188

191189
return function_response.result
192190

mellea/stdlib/session.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -525,26 +525,6 @@ def load_default_aloras(self):
525525
"This model/backend combination does not support any aloras."
526526
)
527527

528-
def genslot(
529-
self,
530-
gen_slot: Component,
531-
format: type[BaseModelSubclass] | None = None,
532-
model_options: dict | None = None,
533-
tool_calls: bool = False,
534-
) -> ModelOutputThunk:
535-
"""Call generative Slot on a GenerativeSlot Component.
536-
537-
Args:
538-
gen_slot (GenerativeSlot Component): A generative slot
539-
540-
Returns:
541-
ModelOutputThunk: Output thunk
542-
"""
543-
result = self.act(
544-
gen_slot, format=format, model_options=model_options, tool_calls=tool_calls
545-
)
546-
return result
547-
548528
def query(
549529
self,
550530
obj: Any,

0 commit comments

Comments
 (0)