File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
examples/research/processors Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -112,18 +112,9 @@ def __init__(
112
112
async def call (
113
113
self , content : AsyncIterable [ProcessorPart ]
114
114
) -> AsyncIterable [ProcessorPart ]:
115
- json_parts = []
115
+ topics = []
116
116
async for content_part in self ._pipeline (content ):
117
- json_parts .append (content_part )
118
-
119
- json_res = json .loads (content_api .as_text (json_parts ))
120
- topics = [
121
- interfaces .Topic (
122
- topic = t .get ('topic' ),
123
- relationship_to_user_content = t .get ('relationship_to_user_content' ),
124
- )
125
- for t in json_res
126
- ]
117
+ topics .append (content_part .get_dataclass (interfaces .Topic ))
127
118
128
119
yield processor .status (f'Generated { len (topics )} topics to research!' )
129
120
for i , t in enumerate (topics ):
You can’t perform that action at this time.
0 commit comments