Conversation
Signed-off-by: Casper Nielsen <casper@diagrid.io>
…time if found Signed-off-by: Casper Nielsen <casper@diagrid.io>
Signed-off-by: Casper Nielsen <casper@diagrid.io>
Signed-off-by: Casper Nielsen <casper@diagrid.io>
Signed-off-by: Casper Nielsen <casper@diagrid.io>
Signed-off-by: Casper Nielsen <casper@diagrid.io>
|
@sicoyle before I get too far it would be good to align on the assumptions I take on naming: Secrets:
Conf:
I was thinking we could also allow users to specify this via env variables on equal terms. |
Signed-off-by: Casper Nielsen <casper@diagrid.io>
Signed-off-by: Casper Nielsen <casper@diagrid.io>
Looks great so far! Instead of an env var equivalent what are your thoughts on if we add an otelConfig dataclass instead as an optional secondary setup to reduce the amt of env vars we support. |
sicoyle
left a comment
There was a problem hiding this comment.
few comments so far for ya :)
dapr_agents/agents/components.py
Outdated
| pubsub = AgentPubSubConfig( | ||
| pubsub_name="agent-pubsub", | ||
| agent_topic=f"{name.replace(' ', '-').lower()}.topic", | ||
| broadcast_topic="agents.broadcast", |
There was a problem hiding this comment.
what if someone has set agent-pubsub and we're picking it up, but they set a diff broadcast_topic? Same for the state components... then, we would be overriding their value.
There was a problem hiding this comment.
Uf, this is a good point. Let me try to handle this scenario better!
There was a problem hiding this comment.
Actually, shouldn't that be covered by the conditional:
if (
"pubsub" in component.type
and component.name == "agent-pubsub"
and pubsub is None
):
...If they've added:
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: agent-pubsub
spec:
type: pubsub.redis
version: v1
metadata:
- name: redisHost
value: localhost:6379But they have not added it in the agent instantiation then this does exactly what we want it to, no?
"pubsub" in component.type -> We found the component
and component.name == "agent-pubsub" -> It has the right default naming
and pubsub is None -> And they didn't pass any during instantiation
Then the agent would pick it up as the default pubsub
Co-authored-by: Sam <sam@diagrid.io> Signed-off-by: Casper Nielsen <whopsec@protonmail.com>
@sicoyle I think this is a better approach. We'd still have to support the "usual suspects" (i.e., endpoint & token) but it would substantially lower the amount! |
Signed-off-by: Casper Nielsen <casper@diagrid.io>
Signed-off-by: Casper Nielsen <casper@diagrid.io>
Signed-off-by: Casper Nielsen <casper@diagrid.io>
Co-authored-by: Sam <sam@diagrid.io> Signed-off-by: Casper Nielsen <whopsec@protonmail.com>
Co-authored-by: Sam <sam@diagrid.io> Signed-off-by: Casper Nielsen <whopsec@protonmail.com>
Co-authored-by: Sam <sam@diagrid.io> Signed-off-by: Casper Nielsen <whopsec@protonmail.com>
Signed-off-by: Casper Nielsen <casper@diagrid.io>
Signed-off-by: Casper Nielsen <casper@diagrid.io>
Signed-off-by: Casper Nielsen <casper@diagrid.io>
… is fetched and used Signed-off-by: Casper Nielsen <casper@diagrid.io>
sicoyle
left a comment
There was a problem hiding this comment.
few comments so far and will complete my review in my morning. Thank you!!
Co-authored-by: Sam <sam@diagrid.io> Signed-off-by: Casper Nielsen <whopsec@protonmail.com>
Co-authored-by: Sam <sam@diagrid.io> Signed-off-by: Casper Nielsen <whopsec@protonmail.com>
Co-authored-by: Sam <sam@diagrid.io> Signed-off-by: Casper Nielsen <whopsec@protonmail.com>
…r_client Signed-off-by: Casper Nielsen <casper@diagrid.io>
Signed-off-by: Casper Nielsen <casper@diagrid.io>
sicoyle
left a comment
There was a problem hiding this comment.
one final comment and then g2g - thank you!
Co-authored-by: Sam <sam@diagrid.io> Signed-off-by: Casper Nielsen <whopsec@protonmail.com>
Signed-off-by: Casper Nielsen <casper@diagrid.io>
Signed-off-by: Casper Nielsen <casper@diagrid.io>
Signed-off-by: Casper Nielsen <casper@diagrid.io>
… avoid hanging process Signed-off-by: Casper Nielsen <casper@diagrid.io>
Signed-off-by: Casper Nielsen <casper@diagrid.io>
…ssed through the payload Signed-off-by: Casper Nielsen <casper@diagrid.io>
Signed-off-by: Casper Nielsen <casper@diagrid.io>
…ld + include possible system_prompt overwrite Signed-off-by: Casper Nielsen <casper@diagrid.io>
Signed-off-by: Casper Nielsen <casper@diagrid.io>
Signed-off-by: Casper Nielsen <casper@diagrid.io>
Signed-off-by: Casper Nielsen <casper@diagrid.io>
sicoyle
left a comment
There was a problem hiding this comment.
LGTM, pls fix the linter issue (flake8 I believe) and then this is g2g 🚀
Signed-off-by: Casper Nielsen <casper@diagrid.io>
Signed-off-by: Casper Nielsen <casper@diagrid.io>
Signed-off-by: Casper Nielsen <casper@diagrid.io>
Signed-off-by: Casper Nielsen <casper@diagrid.io>
Signed-off-by: Casper Nielsen <casper@diagrid.io>
Description
This PR allows default configuration and default secrets to be passed to the agent through
agent-secretstoreandagent-runtime. This PR also covers automatically setting up OTel tracing if the appropriate configuration parameters are passed throughagent-runtimestatestore.This allows operators to automate configuration setup as well as externalize the lifecycle of these configurations.
NB: This carries a breaking change with dropping support for Python 3.10.
Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR closes: #310
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list:
Note: We expect contributors to open a corresponding documentation PR in the dapr/docs repository. As the implementer, you are the best person to document your work! Implementation PRs will not be merged until the documentation PR is opened and ready for review.