Last active
August 26, 2025 22:34
-
-
Save CodeWithOz/0b01d558adac703673aceca48471dca7 to your computer and use it in GitHub Desktop.
Agent for cleaning up named entities in YouTube video transcripts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| from typing import Annotated | |
| import operator | |
| ... | |
| class WorkerState(TypedDict): | |
| named_entity: NamedEntity | |
| verified_entities: Annotated[list, operator.add] | |
| class DemoEnrichmentAgent: | |
| ... | |
| async def get_verified_entity_worker(self, state: WorkerState): | |
| entity = state["named_entity"] | |
| search_res = await self.research_entity(entity) | |
| verified_entity = await self.get_canonical_name(entity, search_res) | |
| return { "verified_entities": [verified_entity] } | |
| ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment