Skip to content

Commit b0bc5e1

Browse files
authored
Merge pull request #1454 from Yuxuan1998/fix_zero_subtopic_error
Fix zero subtopic error
2 parents b62c24b + 438e5ca commit b0bc5e1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gpt_researcher/utils/llm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ async def construct_subtopics(
144144

145145
chain = prompt | model | parser
146146

147-
output = chain.invoke({
147+
output = await chain.ainvoke({
148148
"task": task,
149149
"data": data,
150150
"subtopics": subtopics,
@@ -155,4 +155,5 @@ async def construct_subtopics(
155155

156156
except Exception as e:
157157
print("Exception in parsing subtopics : ", e)
158+
logging.getLogger(__name__).error("Exception in parsing subtopics : \n {e}")
158159
return subtopics

0 commit comments

Comments
 (0)