Skip to content

Commit 004faa0

Browse files
authored
feat(tinyagent): Allow to dynamically update completion params between calls. (#879)
1 parent acb46c0 commit 004faa0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/any_agent/frameworks/tinyagent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,10 @@ async def _run_async(self, prompt: str, **kwargs: Any) -> str | BaseModel:
188188
logger.warning(
189189
"`max_turns` is deprecated and has no effect. See https://mozilla-ai.github.io/any-agent/agents/callbacks/#example-limit-the-number-of-steps"
190190
)
191-
completion_params = self.completion_params.copy()
192191

193192
while True:
193+
completion_params = self.completion_params.copy()
194+
194195
completion_params["messages"] = messages
195196

196197
response: ChatCompletion = await self.call_model(**completion_params)

0 commit comments

Comments
 (0)