File tree Expand file tree Collapse file tree 2 files changed +3
-31
lines changed
Expand file tree Collapse file tree 2 files changed +3
-31
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -170,12 +170,12 @@ def handle_user_input(
170170 },
171171 {"callbacks" : [stream_handler ]},
172172 )
173- msgs .add_ai_message (result ["answer" ])
173+ msgs .add_ai_message (result ["answer" ]) # type: ignore[index]
174174
175175 # Display source documents in an expander
176176 with st .expander ("See sources" ):
177177 scores = [
178- chunk .metadata ["score" ] for chunk in result ["context" ]
178+ chunk .metadata ["score" ] for chunk in result ["context" ] # type: ignore[index]
179179 ]
180180
181181 if scores :
@@ -184,7 +184,7 @@ def handle_user_input(
184184 max_score * 0.9
185185 ) # Set threshold to 90% of the highest score
186186
187- for chunk in result ["context" ]:
187+ for chunk in result ["context" ]: # type: ignore[index]
188188 score = chunk .metadata ["score" ]
189189
190190 # Only show sources with scores
You can’t perform that action at this time.
0 commit comments