Skip to content

Instantly share code, notes, and snippets.

@CodeWithOz
Last active August 26, 2025 22:34
Show Gist options
  • Select an option

  • Save CodeWithOz/0b01d558adac703673aceca48471dca7 to your computer and use it in GitHub Desktop.

Select an option

Save CodeWithOz/0b01d558adac703673aceca48471dca7 to your computer and use it in GitHub Desktop.
Agent for cleaning up named entities in YouTube video transcripts.
...
class DemoEnrichmentAgent:
...
def __init__(self):
...
graph_builder.add_node(
"get_verified_entity_worker", self.get_verified_entity_worker
)
# set edges
graph_builder.add_edge(START, "extractor")
graph_builder.add_conditional_edges(
"extractor", self.spawn_workers, ["get_verified_entity_worker"]
)
graph_builder.add_edge("get_verified_entity_worker", END)
# compile the graph
self.graph = graph_builder.compile()
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment