Skip to content

Commit c2b3c47

Browse files
backends should add ACTION and MOT.
1 parent 3646edf commit c2b3c47

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

mellea/backends/dummy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ def generate_from_context(
2929
assert format is None, "The DummyBackend does not support constrained decoding."
3030
if self.responses is None:
3131
mot = ModelOutputThunk(value="dummy")
32-
return mot, ctx.add(mot)
32+
return mot, ctx.add(action).add(mot)
3333
elif self.idx < len(self.responses):
3434
return_value = ModelOutputThunk(value=self.responses[self.idx])
3535
self.idx += 1
36-
return return_value, ctx.add(return_value)
36+
return return_value, ctx.add(action).add(return_value)
3737
else:
3838
raise Exception(
3939
f"DummyBackend expected no more than {len(self.responses)} calls."

mellea/backends/huggingface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def generate_from_context(
216216
mot = self._generate_from_context_standard(
217217
action, ctx, format=format, model_options=model_opts, tool_calls=tool_calls
218218
)
219-
return mot, ctx.add(mot)
219+
return mot, ctx.add(action).add(mot)
220220

221221
def _generate_from_context_alora(
222222
self,

mellea/backends/litellm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def generate_from_context(
123123
model_options=model_options,
124124
tool_calls=tool_calls,
125125
)
126-
return mot, ctx.add(mot)
126+
return mot, ctx.add(action).add(mot)
127127

128128
def _simplify_and_merge(
129129
self, model_options: dict[str, Any] | None

mellea/backends/ollama.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def generate_from_context(
249249
tool_calls=tool_calls,
250250
)
251251

252-
return mot, ctx.add(mot)
252+
return mot, ctx.add(action).add(mot)
253253

254254
def generate_from_chat_context(
255255
self,

mellea/backends/openai.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ def generate_from_context(
283283
model_options=model_options,
284284
tool_calls=tool_calls,
285285
)
286-
return mot, ctx.add(mot)
286+
return mot, ctx.add(action).add(mot)
287287

288288
def generate_from_chat_context(
289289
self,

mellea/backends/watsonx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def generate_from_context(
225225
model_options=model_options,
226226
tool_calls=tool_calls,
227227
)
228-
return mot, ctx.add(mot)
228+
return mot, ctx.add(action).add(mot)
229229

230230
def generate_from_chat_context(
231231
self,

0 commit comments

Comments
 (0)