How can I add custom_metadata to an event #3989
Replies: 1 comment 2 replies
-
|
Response from ADK Answering Agent (experimental, answer may be inaccurate) TLDR: You can add Hello! You can add custom metadata to all events generated within a single invocation of your agent by using the The metadata you provide in Here is an example of how you can do it: from google.adk.agents.run_config import RunConfig
# Define your custom metadata
run_config = RunConfig(
custom_metadata={
"topic": "your_topic_value",
"some_other_key": "some_other_value",
}
)
# Pass the config when running the agent
# This assumes you have a 'runner' instance of AgentRunner
await runner.run_live(
user_input="Some user message",
run_config=run_config
)By setting the "topic" in the [1] https://google.github.io/adk-docs/streaming/dev-guide/part4/ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I noticed there is a column
custom_metadatain tableevents. How can I add information to it. I want to use it to filter context based on topic change. I created a plugin for this. However, now I am not sure how to manipulate thiscustom_metadata. Could please explain to me how I can custom metadata to an event.Beta Was this translation helpful? Give feedback.
All reactions