-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add slackbot example and update typing + debug logs #363
Conversation
src/controlflow/agents/agent.py
Outdated
@@ -289,7 +289,9 @@ def _run_model( | |||
tools = as_tools(self.get_tools() + tools) | |||
model = self.get_model(tools=tools) | |||
|
|||
logger.debug(f"Running model {model} for agent {self.name} with tools {tools}") | |||
logger.debug( | |||
f"Running model {controlflow.settings.llm_model} for agent {self.name} with tools {[t.name for t in tools]!r}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is actually not correct for the model -- this will log the global setting, not the agent's own setting (if it was overridden)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @zzstoatzz!
1763e98
to
41954d2
Compare
adds an initial FastAPI slackbot example and updates some typing on the
Flow
class so that its clear to users in their IDE what thingsFlow
acceptsalso fixes the async case with
as_task
(test_task_decorator_async_as_task
was throwing an "unawaited cororoutine" error)relatedly in PrefectHQ/prefect#15792, we noticed that
default=
is required inField
definitions for the type checker to recognize defaults as "not required" by the constructor of a model likeFlow
i plan to add to this slackbot over time