DeepRat/TrueEye_Reports
0
1{2 "data": {3 "edges": [4 {5 "animated": false,6 "className": "",7 "data": {8 "sourceHandle": {9 "dataType": "ChatInput",10 "id": "ChatInput-WGsAl",11 "name": "message",12 "output_types": [13 "Message"14 ]15 },16 "targetHandle": {17 "fieldName": "urls",18 "id": "URLComponent-ZKgiv",19 "inputTypes": [20 "Message"21 ],22 "type": "str"23 }24 },25 "id": "reactflow__edge-ChatInput-WGsAl{œdataTypeœ:œChatInputœ,œidœ:œChatInput-WGsAlœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-URLComponent-ZKgiv{œfieldNameœ:œurlsœ,œidœ:œURLComponent-ZKgivœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",26 "selected": false,27 "source": "ChatInput-WGsAl",28 "sourceHandle": "{œdataTypeœ:œChatInputœ,œidœ:œChatInput-WGsAlœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}",29 "target": "URLComponent-ZKgiv",30 "targetHandle": "{œfieldNameœ:œurlsœ,œidœ:œURLComponent-ZKgivœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}"31 },32 {33 "animated": false,34 "className": "",35 "data": {36 "sourceHandle": {37 "dataType": "URLComponent",38 "id": "URLComponent-ZKgiv",39 "name": "data",40 "output_types": [41 "Data"42 ]43 },44 "targetHandle": {45 "fieldName": "input_data",46 "id": "ParserComponent-ZfeDa",47 "inputTypes": [48 "DataFrame",49 "Data"50 ],51 "type": "other"52 }53 },54 "id": "reactflow__edge-URLComponent-ZKgiv{œdataTypeœ:œURLComponentœ,œidœ:œURLComponent-ZKgivœ,œnameœ:œdataœ,œoutput_typesœ:[œDataœ]}-ParserComponent-ZfeDa{œfieldNameœ:œinput_dataœ,œidœ:œParserComponent-ZfeDaœ,œinputTypesœ:[œDataFrameœ,œDataœ],œtypeœ:œotherœ}",55 "selected": false,56 "source": "URLComponent-ZKgiv",57 "sourceHandle": "{œdataTypeœ:œURLComponentœ,œidœ:œURLComponent-ZKgivœ,œnameœ:œdataœ,œoutput_typesœ:[œDataœ]}",58 "target": "ParserComponent-ZfeDa",59 "targetHandle": "{œfieldNameœ:œinput_dataœ,œidœ:œParserComponent-ZfeDaœ,œinputTypesœ:[œDataFrameœ,œDataœ],œtypeœ:œotherœ}"60 },61 {62 "animated": false,63 "className": "",64 "data": {65 "sourceHandle": {66 "dataType": "ParserComponent",67 "id": "ParserComponent-ZfeDa",68 "name": "parsed_text",69 "output_types": [70 "Message"71 ]72 },73 "targetHandle": {74 "fieldName": "parsed_text",75 "id": "Prompt-DaEQe",76 "inputTypes": [77 "Message"78 ],79 "type": "str"80 }81 },82 "id": "reactflow__edge-ParserComponent-ZfeDa{œdataTypeœ:œParserComponentœ,œidœ:œParserComponent-ZfeDaœ,œnameœ:œparsed_textœ,œoutput_typesœ:[œMessageœ]}-Prompt-DaEQe{œfieldNameœ:œparsed_textœ,œidœ:œPrompt-DaEQeœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",83 "selected": false,84 "source": "ParserComponent-ZfeDa",85 "sourceHandle": "{œdataTypeœ:œParserComponentœ,œidœ:œParserComponent-ZfeDaœ,œnameœ:œparsed_textœ,œoutput_typesœ:[œMessageœ]}",86 "target": "Prompt-DaEQe",87 "targetHandle": "{œfieldNameœ:œparsed_textœ,œidœ:œPrompt-DaEQeœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}"88 },89 {90 "animated": false,91 "className": "",92 "data": {93 "sourceHandle": {94 "dataType": "Prompt",95 "id": "Prompt-DaEQe",96 "name": "prompt",97 "output_types": [98 "Message"99 ]100 },101 "targetHandle": {102 "fieldName": "system_message",103 "id": "AnthropicModel-ff7II",104 "inputTypes": [105 "Message"106 ],107 "type": "str"108 }109 },110 "id": "reactflow__edge-Prompt-DaEQe{œdataTypeœ:œPromptœ,œidœ:œPrompt-DaEQeœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-AnthropicModel-ff7II{œfieldNameœ:œsystem_messageœ,œidœ:œAnthropicModel-ff7IIœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",111 "selected": false,112 "source": "Prompt-DaEQe",113 "sourceHandle": "{œdataTypeœ:œPromptœ,œidœ:œPrompt-DaEQeœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}",114 "target": "AnthropicModel-ff7II",115 "targetHandle": "{œfieldNameœ:œsystem_messageœ,œidœ:œAnthropicModel-ff7IIœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}"116 },117 {118 "animated": false,119 "className": "",120 "data": {121 "sourceHandle": {122 "dataType": "Prompt",123 "id": "Prompt-DaEQe",124 "name": "prompt",125 "output_types": [126 "Message"127 ]128 },129 "targetHandle": {130 "fieldName": "input_value",131 "id": "AnthropicModel-ff7II",132 "inputTypes": [133 "Message"134 ],135 "type": "str"136 }137 },138 "id": "reactflow__edge-Prompt-DaEQe{œdataTypeœ:œPromptœ,œidœ:œPrompt-DaEQeœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-AnthropicModel-ff7II{œfieldNameœ:œinput_valueœ,œidœ:œAnthropicModel-ff7IIœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",139 "selected": false,140 "source": "Prompt-DaEQe",141 "sourceHandle": "{œdataTypeœ:œPromptœ,œidœ:œPrompt-DaEQeœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}",142 "target": "AnthropicModel-ff7II",143 "targetHandle": "{œfieldNameœ:œinput_valueœ,œidœ:œAnthropicModel-ff7IIœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}"144 },145 {146 "animated": false,147 "className": "",148 "data": {149 "sourceHandle": {150 "dataType": "AnthropicModel",151 "id": "AnthropicModel-ff7II",152 "name": "text_output",153 "output_types": [154 "Message"155 ]156 },157 "targetHandle": {158 "fieldName": "article",159 "id": "Prompt-qLrNR",160 "inputTypes": [161 "Message"162 ],163 "type": "str"164 }165 },166 "id": "reactflow__edge-AnthropicModel-ff7II{œdataTypeœ:œAnthropicModelœ,œidœ:œAnthropicModel-ff7IIœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-Prompt-qLrNR{œfieldNameœ:œarticleœ,œidœ:œPrompt-qLrNRœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",167 "selected": false,168 "source": "AnthropicModel-ff7II",169 "sourceHandle": "{œdataTypeœ:œAnthropicModelœ,œidœ:œAnthropicModel-ff7IIœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}",170 "target": "Prompt-qLrNR",171 "targetHandle": "{œfieldNameœ:œarticleœ,œidœ:œPrompt-qLrNRœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}"172 },173 {174 "animated": false,175 "className": "",176 "data": {177 "sourceHandle": {178 "dataType": "Prompt",179 "id": "Prompt-qLrNR",180 "name": "prompt",181 "output_types": [182 "Message"183 ]184 },185 "targetHandle": {186 "fieldName": "system_message",187 "id": "AnthropicModel-6Akp4",188 "inputTypes": [189 "Message"190 ],191 "type": "str"192 }193 },194 "id": "reactflow__edge-Prompt-qLrNR{œdataTypeœ:œPromptœ,œidœ:œPrompt-qLrNRœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-AnthropicModel-6Akp4{œfieldNameœ:œsystem_messageœ,œidœ:œAnthropicModel-6Akp4œ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",195 "selected": false,196 "source": "Prompt-qLrNR",197 "sourceHandle": "{œdataTypeœ:œPromptœ,œidœ:œPrompt-qLrNRœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}",198 "target": "AnthropicModel-6Akp4",199 "targetHandle": "{œfieldNameœ:œsystem_messageœ,œidœ:œAnthropicModel-6Akp4œ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}"200 },201 {202 "animated": false,203 "className": "",204 "data": {205 "sourceHandle": {206 "dataType": "Prompt",207 "id": "Prompt-qLrNR",208 "name": "prompt",209 "output_types": [210 "Message"211 ]212 },213 "targetHandle": {214 "fieldName": "input_value",215 "id": "AnthropicModel-6Akp4",216 "inputTypes": [217 "Message"218 ],219 "type": "str"220 }221 },222 "id": "reactflow__edge-Prompt-qLrNR{œdataTypeœ:œPromptœ,œidœ:œPrompt-qLrNRœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-AnthropicModel-6Akp4{œfieldNameœ:œinput_valueœ,œidœ:œAnthropicModel-6Akp4œ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",223 "selected": false,224 "source": "Prompt-qLrNR",225 "sourceHandle": "{œdataTypeœ:œPromptœ,œidœ:œPrompt-qLrNRœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}",226 "target": "AnthropicModel-6Akp4",227 "targetHandle": "{œfieldNameœ:œinput_valueœ,œidœ:œAnthropicModel-6Akp4œ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}"228 },229 {230 "animated": false,231 "className": "",232 "data": {233 "sourceHandle": {234 "dataType": "AnthropicModel",235 "id": "AnthropicModel-ff7II",236 "name": "text_output",237 "output_types": [238 "Message"239 ]240 },241 "targetHandle": {242 "fieldName": "analysis1",243 "id": "Prompt-l52jJ",244 "inputTypes": [245 "Message"246 ],247 "type": "str"248 }249 },250 "id": "reactflow__edge-AnthropicModel-ff7II{œdataTypeœ:œAnthropicModelœ,œidœ:œAnthropicModel-ff7IIœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-Prompt-l52jJ{œfieldNameœ:œanalysis1œ,œidœ:œPrompt-l52jJœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",251 "selected": false,252 "source": "AnthropicModel-ff7II",253 "sourceHandle": "{œdataTypeœ:œAnthropicModelœ,œidœ:œAnthropicModel-ff7IIœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}",254 "target": "Prompt-l52jJ",255 "targetHandle": "{œfieldNameœ:œanalysis1œ,œidœ:œPrompt-l52jJœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}"256 },257 {258 "animated": false,259 "className": "",260 "data": {261 "sourceHandle": {262 "dataType": "AnthropicModel",263 "id": "AnthropicModel-6Akp4",264 "name": "text_output",265 "output_types": [266 "Message"267 ]268 },269 "targetHandle": {270 "fieldName": "analysis3",271 "id": "Prompt-l52jJ",272 "inputTypes": [273 "Message"274 ],275 "type": "str"276 }277 },278 "id": "reactflow__edge-AnthropicModel-6Akp4{œdataTypeœ:œAnthropicModelœ,œidœ:œAnthropicModel-6Akp4œ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-Prompt-l52jJ{œfieldNameœ:œanalysis3œ,œidœ:œPrompt-l52jJœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",279 "selected": false,280 "source": "AnthropicModel-6Akp4",281 "sourceHandle": "{œdataTypeœ:œAnthropicModelœ,œidœ:œAnthropicModel-6Akp4œ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}",282 "target": "Prompt-l52jJ",283 "targetHandle": "{œfieldNameœ:œanalysis3œ,œidœ:œPrompt-l52jJœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}"284 },285 {286 "animated": false,287 "className": "",288 "data": {289 "sourceHandle": {290 "dataType": "ParserComponent",291 "id": "ParserComponent-ZfeDa",292 "name": "parsed_text",293 "output_types": [294 "Message"295 ]296 },297 "targetHandle": {298 "fieldName": "article",299 "id": "Prompt-l52jJ",300 "inputTypes": [301 "Message"302 ],303 "type": "str"304 }305 },306 "id": "reactflow__edge-ParserComponent-ZfeDa{œdataTypeœ:œParserComponentœ,œidœ:œParserComponent-ZfeDaœ,œnameœ:œparsed_textœ,œoutput_typesœ:[œMessageœ]}-Prompt-l52jJ{œfieldNameœ:œarticleœ,œidœ:œPrompt-l52jJœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",307 "selected": false,308 "source": "ParserComponent-ZfeDa",309 "sourceHandle": "{œdataTypeœ:œParserComponentœ,œidœ:œParserComponent-ZfeDaœ,œnameœ:œparsed_textœ,œoutput_typesœ:[œMessageœ]}",310 "target": "Prompt-l52jJ",311 "targetHandle": "{œfieldNameœ:œarticleœ,œidœ:œPrompt-l52jJœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}"312 },313 {314 "animated": false,315 "className": "",316 "data": {317 "sourceHandle": {318 "dataType": "Prompt",319 "id": "Prompt-l52jJ",320 "name": "prompt",321 "output_types": [322 "Message"323 ]324 },325 "targetHandle": {326 "fieldName": "system_message",327 "id": "AnthropicModel-BFQkw",328 "inputTypes": [329 "Message"330 ],331 "type": "str"332 }333 },334 "id": "reactflow__edge-Prompt-l52jJ{œdataTypeœ:œPromptœ,œidœ:œPrompt-l52jJœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-AnthropicModel-BFQkw{œfieldNameœ:œsystem_messageœ,œidœ:œAnthropicModel-BFQkwœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",335 "selected": false,336 "source": "Prompt-l52jJ",337 "sourceHandle": "{œdataTypeœ:œPromptœ,œidœ:œPrompt-l52jJœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}",338 "target": "AnthropicModel-BFQkw",339 "targetHandle": "{œfieldNameœ:œsystem_messageœ,œidœ:œAnthropicModel-BFQkwœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}"340 },341 {342 "animated": false,343 "className": "",344 "data": {345 "sourceHandle": {346 "dataType": "Prompt",347 "id": "Prompt-l52jJ",348 "name": "prompt",349 "output_types": [350 "Message"351 ]352 },353 "targetHandle": {354 "fieldName": "input_value",355 "id": "AnthropicModel-BFQkw",356 "inputTypes": [357 "Message"358 ],359 "type": "str"360 }361 },362 "id": "reactflow__edge-Prompt-l52jJ{œdataTypeœ:œPromptœ,œidœ:œPrompt-l52jJœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-AnthropicModel-BFQkw{œfieldNameœ:œinput_valueœ,œidœ:œAnthropicModel-BFQkwœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",363 "selected": false,364 "source": "Prompt-l52jJ",365 "sourceHandle": "{œdataTypeœ:œPromptœ,œidœ:œPrompt-l52jJœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}",366 "target": "AnthropicModel-BFQkw",367 "targetHandle": "{œfieldNameœ:œinput_valueœ,œidœ:œAnthropicModel-BFQkwœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}"368 },369 {370 "animated": false,371 "className": "",372 "data": {373 "sourceHandle": {374 "dataType": "AnthropicModel",375 "id": "AnthropicModel-ff7II",376 "name": "text_output",377 "output_types": [378 "Message"379 ]380 },381 "targetHandle": {382 "fieldName": "analysis1",383 "id": "Prompt-L3qXf",384 "inputTypes": [385 "Message"386 ],387 "type": "str"388 }389 },390 "id": "reactflow__edge-AnthropicModel-ff7II{œdataTypeœ:œAnthropicModelœ,œidœ:œAnthropicModel-ff7IIœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-Prompt-L3qXf{œfieldNameœ:œanalysis1œ,œidœ:œPrompt-L3qXfœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",391 "selected": false,392 "source": "AnthropicModel-ff7II",393 "sourceHandle": "{œdataTypeœ:œAnthropicModelœ,œidœ:œAnthropicModel-ff7IIœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}",394 "target": "Prompt-L3qXf",395 "targetHandle": "{œfieldNameœ:œanalysis1œ,œidœ:œPrompt-L3qXfœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}"396 },397 {398 "animated": false,399 "className": "",400 "data": {401 "sourceHandle": {402 "dataType": "AnthropicModel",403 "id": "AnthropicModel-6Akp4",404 "name": "text_output",405 "output_types": [406 "Message"407 ]408 },409 "targetHandle": {410 "fieldName": "analysis3",411 "id": "Prompt-L3qXf",412 "inputTypes": [413 "Message"414 ],415 "type": "str"416 }417 },418 "id": "reactflow__edge-AnthropicModel-6Akp4{œdataTypeœ:œAnthropicModelœ,œidœ:œAnthropicModel-6Akp4œ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-Prompt-L3qXf{œfieldNameœ:œanalysis3œ,œidœ:œPrompt-L3qXfœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",419 "selected": false,420 "source": "AnthropicModel-6Akp4",421 "sourceHandle": "{œdataTypeœ:œAnthropicModelœ,œidœ:œAnthropicModel-6Akp4œ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}",422 "target": "Prompt-L3qXf",423 "targetHandle": "{œfieldNameœ:œanalysis3œ,œidœ:œPrompt-L3qXfœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}"424 },425 {426 "animated": false,427 "className": "",428 "data": {429 "sourceHandle": {430 "dataType": "AnthropicModel",431 "id": "AnthropicModel-BFQkw",432 "name": "text_output",433 "output_types": [434 "Message"435 ]436 },437 "targetHandle": {438 "fieldName": "analysis4",439 "id": "Prompt-L3qXf",440 "inputTypes": [441 "Message"442 ],443 "type": "str"444 }445 },446 "id": "reactflow__edge-AnthropicModel-BFQkw{œdataTypeœ:œAnthropicModelœ,œidœ:œAnthropicModel-BFQkwœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-Prompt-L3qXf{œfieldNameœ:œanalysis4œ,œidœ:œPrompt-L3qXfœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",447 "selected": false,448 "source": "AnthropicModel-BFQkw",449 "sourceHandle": "{œdataTypeœ:œAnthropicModelœ,œidœ:œAnthropicModel-BFQkwœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}",450 "target": "Prompt-L3qXf",451 "targetHandle": "{œfieldNameœ:œanalysis4œ,œidœ:œPrompt-L3qXfœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}"452 },453 {454 "animated": false,455 "className": "",456 "data": {457 "sourceHandle": {458 "dataType": "Prompt",459 "id": "Prompt-L3qXf",460 "name": "prompt",461 "output_types": [462 "Message"463 ]464 },465 "targetHandle": {466 "fieldName": "input_value",467 "id": "ChatOutput-7XrLH",468 "inputTypes": [469 "Data",470 "DataFrame",471 "Message"472 ],473 "type": "other"474 }475 },476 "id": "reactflow__edge-Prompt-L3qXf{œdataTypeœ:œPromptœ,œidœ:œPrompt-L3qXfœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-7XrLH{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-7XrLHœ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œotherœ}",477 "selected": false,478 "source": "Prompt-L3qXf",479 "sourceHandle": "{œdataTypeœ:œPromptœ,œidœ:œPrompt-L3qXfœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}",480 "target": "ChatOutput-7XrLH",481 "targetHandle": "{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-7XrLHœ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œotherœ}"482 }483 ],484 "nodes": [485 {486 "data": {487 "id": "Prompt-DaEQe",488 "node": {489 "base_classes": [490 "Message"491 ],492 "beta": false,493 "conditional_paths": [],494 "custom_fields": {495 "template": [496 "parsed_text"497 ]498 },499 "description": "Create a prompt template with dynamic variables.",500 "display_name": "Prompt",501 "documentation": "",502 "edited": false,503 "error": null,504 "field_order": [505 "template",506 "tool_placeholder"507 ],508 "frozen": false,509 "full_path": null,510 "icon": "prompts",511 "is_composition": null,512 "is_input": null,513 "is_output": null,514 "legacy": false,515 "lf_version": "1.4.3",516 "metadata": {},517 "minimized": false,518 "name": "",519 "output_types": [],520 "outputs": [521 {522 "allows_loop": false,523 "cache": true,524 "display_name": "Prompt Message",525 "hidden": false,526 "method": "build_prompt",527 "name": "prompt",528 "options": null,529 "required_inputs": null,530 "selected": "Message",531 "tool_mode": true,532 "types": [533 "Message"534 ],535 "value": "__UNDEFINED__"536 }537 ],538 "pinned": false,539 "priority": null,540 "template": {541 "_type": "Component",542 "code": {543 "advanced": true,544 "dynamic": true,545 "fileTypes": [],546 "file_path": "",547 "info": "",548 "list": false,549 "load_from_db": false,550 "multiline": true,551 "name": "code",552 "password": false,553 "placeholder": "",554 "required": true,555 "show": true,556 "title_case": false,557 "type": "code",558 "value": "from langflow.base.prompts.api_utils import process_prompt_template\nfrom langflow.custom import Component\nfrom langflow.inputs.inputs import DefaultPromptField\nfrom langflow.io import MessageTextInput, Output, PromptInput\nfrom langflow.schema.message import Message\nfrom langflow.template.utils import update_template_values\n\n\nclass PromptComponent(Component):\n display_name: str = \"Prompt\"\n description: str = \"Create a prompt template with dynamic variables.\"\n icon = \"prompts\"\n trace_type = \"prompt\"\n name = \"Prompt\"\n\n inputs = [\n PromptInput(name=\"template\", display_name=\"Template\"),\n MessageTextInput(\n name=\"tool_placeholder\",\n display_name=\"Tool Placeholder\",\n tool_mode=True,\n advanced=True,\n info=\"A placeholder input for tool mode.\",\n ),\n ]\n\n outputs = [\n Output(display_name=\"Prompt Message\", name=\"prompt\", method=\"build_prompt\"),\n ]\n\n async def build_prompt(self) -> Message:\n prompt = Message.from_template(**self._attributes)\n self.status = prompt.text\n return prompt\n\n def _update_template(self, frontend_node: dict):\n prompt_template = frontend_node[\"template\"][\"template\"][\"value\"]\n custom_fields = frontend_node[\"custom_fields\"]\n frontend_node_template = frontend_node[\"template\"]\n _ = process_prompt_template(\n template=prompt_template,\n name=\"template\",\n custom_fields=custom_fields,\n frontend_node_template=frontend_node_template,\n )\n return frontend_node\n\n async def update_frontend_node(self, new_frontend_node: dict, current_frontend_node: dict):\n \"\"\"This function is called after the code validation is done.\"\"\"\n frontend_node = await super().update_frontend_node(new_frontend_node, current_frontend_node)\n template = frontend_node[\"template\"][\"template\"][\"value\"]\n # Kept it duplicated for backwards compatibility\n _ = process_prompt_template(\n template=template,\n name=\"template\",\n custom_fields=frontend_node[\"custom_fields\"],\n frontend_node_template=frontend_node[\"template\"],\n )\n # Now that template is updated, we need to grab any values that were set in the current_frontend_node\n # and update the frontend_node with those values\n update_template_values(new_template=frontend_node, previous_template=current_frontend_node[\"template\"])\n return frontend_node\n\n def _get_fallback_input(self, **kwargs):\n return DefaultPromptField(**kwargs)\n"559 },560 "parsed_text": {561 "advanced": false,562 "display_name": "parsed_text",563 "dynamic": false,564 "field_type": "str",565 "fileTypes": [],566 "file_path": "",567 "info": "",568 "input_types": [569 "Message"570 ],571 "list": false,572 "load_from_db": false,573 "multiline": true,574 "name": "parsed_text",575 "placeholder": "",576 "required": false,577 "show": true,578 "title_case": false,579 "type": "str",580 "value": ""581 },582 "template": {583 "_input_type": "PromptInput",584 "advanced": false,585 "display_name": "Template",586 "dynamic": false,587 "info": "",588 "list": false,589 "list_add_label": "Add More",590 "name": "template",591 "placeholder": "",592 "required": false,593 "show": true,594 "title_case": false,595 "tool_mode": false,596 "trace_as_input": true,597 "type": "prompt",598 "value": "IMPORTANTISIMO: LA FECHA ACTUAL ES 2025.\nNo incluyas reflexiones internas, procesos de pensamiento o marcadores HTML/Markdown en tu respuesta. Solo devuelve el contenido final estructurado.\n## Rol\nEres un **experto en periodismo, información, ciencia y desinformación**.\nUtilizas las TOOLS con los siguientes metodos:\nSCRAPE (para obtener la informaciòn del url brindado por el usuario)\nSEARCH_SERPER (para buscar informaciòn relevante cuando lo creas necesario. Tambien para buscar las Fuentes prioritarias para contraste)\nFETCH_CONTENT y AS_DATAFRAME (para utilizar wikipedia)\n\nTu tarea central es **analizar el contenido de las URLs** (noticias, artículos, publicaciones, etc.) que te proporcione el usuario y producir un informe detallado.\n\n## Objetivos\n1. **Sesgo**\n- **POSITIVO** → tono perceptiblemente positivo del emisor.\n- **NEGATIVO** → tono perceptiblemente negativo.\n- **NEUTRO** → imposible clasificar como positivo o negativo.\n\n2. **Matices**\nSiempre identifica y enumera cualquier matiz emocional o actitudinal presente (puedes añadir otros además de los listados):\n- Agresividad\n- Tristeza\n- Polarización\n- Alegría\n- Miedo\n- Solidaridad\n- Desconfianza\n- Cooperación\n\n3. **Resumen del corpus**\nRedacta un resumen conciso y de alta calidad.\n\n4. **Aclaraciones**\nExamina detenidamente el texto para detectar falacias o mentiras.\n- Enumera cada falacia.\n- Describe brevemente por qué es una falacia.\n- Desmiente cada mentira aportando la evidencia correspondiente.\n\n5. **Contraste de fuentes**\nBusca en internet información sobre el mismo tema y proporciona una **lista de fuentes** con enlace para verificación (ver sección de fuentes prioritarias).\n\n6. **Info. del Autor**\nEn los casos en los que el autor se encuentre explicitamente mencionado, realiza una investigaciòn del mismo y brinda un resume del mismo + URLs de otras noticias/publicaciones/articulos/etc, que puedas encontrar sobre el autor. Si el autor no se especifica, olvida este punto.\n\n---\n\n## Ejemplos de mentiras desmentidas\n\n### “Los hornos microondas causan cáncer”\n**Afirmación:** “La radiación de los microondas es suficientemente intensa para dañar el ADN y producir cáncer en los alimentos que cocinamos.” (snopes.com)\n**Realidad:** Los microondas emplean radiación no ionizante, sin energía suficiente para dañar el ADN. Estudios y agencias sanitarias confirman su inocuidad si se usan recipientes aptos. (politifact.com)\n\n### “Sólo usamos el 10 % de nuestro cerebro”\n**Afirmación:** “Apenas empleamos una décima parte de nuestra capacidad cerebral; si activáramos el resto, lograríamos poderes extraordinarios.” (snopes.com)\n**Realidad:** Escáneres cerebrales (fMRI, PET) muestran que prácticamente todas las áreas están activas en diversas tareas. No existen zonas ‘inactivas’ equivalentes al 90 % restante. (en.wikipedia.org)\n\n### “Comer muchas zanahorias te da visión nocturna”\n**Afirmación:** “Una dieta rica en zanahorias otorga visión de gato en la oscuridad.” (snopes.com)\n**Realidad:** El beta-caroteno sólo ayuda a mantener la visión normal cuando hay déficit de vitamina A; el mito surgió como propaganda británica en la II Guerra Mundial. (smithsonianmag.com)\n\n### “El 5G causa o agrava el COVID-19”\n**Afirmación:** “La expansión de redes 5G es responsable de la aparición o propagación del coronavirus.” (snopes.com)\n**Realidad:** No existe vínculo entre tecnología de comunicaciones y enfermedades víricas; la hipótesis carece de fundamento biológico. (time.com)\n\n### “Las vacunas provocan autismo”\n**Afirmación:** “El tiomersal en las vacunas causa autismo infantil.” (snopes.com)\n**Realidad:** Amplias revisiones epidemiológicas descartan relación causal entre vacunas y autismo. (mayoclinichealthsystem.org)\n\n### “La fluorización del agua reduce el coeficiente intelectual”\n**Afirmación:** “El fluoruro en el agua potable baja el IQ de los niños.” (snopes.com)\n**Realidad:** Los estudios que muestran tal efecto usan exposiciones muy superiores a las recomendadas; los niveles óptimos (0,7 mg/L) son seguros. (en.wikipedia.org)\n\n---\n\n## Fuentes prioritarias para contraste (no excluyentes) (recuerda que debes brindar noticias, articulos, posteos, etc. concretos)\nSnopes – https://www.snopes.com/\nPolitiFact – https://www.politifact.com/\nMayo Clinic Health System – https://www.mayoclinichealthsystem.org/\nFactCheck.org – https://www.factcheck.org/\nReuters Fact Check – https://www.reuters.com/fact-check/\nAP Fact Check – https://apnews.com/ap-fact-check\nAFP Fact Check – https://factcheck.afp.com/\nFull Fact – https://fullfact.org/\nCheck Your Fact – https://checkyourfact.com/\nAfrica Check – https://africacheck.org/\nCenters for Disease Control and Prevention (CDC) – https://www.cdc.gov/\nWorld Health Organization (WHO) – https://www.who.int/\nCochrane Library – https://www.cochranelibrary.com/\nNPR Fact Check – https://www.npr.org/sections/politics-fact-check\nFirst Draft – https://firstdraftnews.org/\nInternational Fact-Checking Network (IFCN) – https://www.poynter.org/ifcn/\nEuropean Fact-Checking Standards Network (EFCSN) – https://efcsn.com/\n\n---\n\n## Comportamiento de la Respuesta\n**¡Instrucción Crítica!** No reveles tu proceso de pensamiento, los pasos intermedios, ni las llamadas a las herramientas (como `SCRAPE` o `SEARCH_SERPER`). Tu única salida debe ser el informe final, siguiendo estrictamente la estructura definida en la sección 'Formato de salida'. No incluyas frases como \"Voy a analizar...\" o \"Usaré la herramienta...\".\n\n## Formato de salida (estrictamente. Presentalo con la estructura de un informe profesional en un formato markdown elegante)\n\n####Título de la noticia: <TÍTULO>\n(<URL>)\n\nSesgo detectado : <POSITIVO | NEGATIVO | NEUTRO> + <Breve Explicaciòn del ¿Por Que?>\nMatices detectados : <matiz1>, <matiz2>, …\nResumen del corpus :\n{parsed_text}\n\nAclaraciones :\n<Falacia o mentira 1>: <Explicación breve / desmentido>\n<Falacia o mentira 2>: <Explicación breve / desmentido>\n…\nFuentes que puedes investigar :\n<Título fuente 1> – <URL 1>\n<Título fuente 2> – <URL 2>\n…\nInvestigaciòn del Autor\nResume\n\nURL1\nURL2\n..."599 },600 "tool_placeholder": {601 "_input_type": "MessageTextInput",602 "advanced": true,603 "display_name": "Tool Placeholder",604 "dynamic": false,605 "info": "A placeholder input for tool mode.",606 "input_types": [607 "Message"608 ],609 "list": false,610 "list_add_label": "Add More",611 "load_from_db": false,612 "name": "tool_placeholder",613 "placeholder": "",614 "required": false,615 "show": true,616 "title_case": false,617 "tool_mode": true,618 "trace_as_input": true,619 "trace_as_metadata": true,620 "type": "str",621 "value": ""622 }623 },624 "tool_mode": false625 },626 "showNode": true,627 "type": "Prompt"628 },629 "dragging": false,630 "id": "Prompt-DaEQe",631 "measured": {632 "height": 411,633 "width": 320634 },635 "position": {636 "x": 2318.597592027175,637 "y": 1224.0767908780801638 },639 "selected": false,640 "type": "genericNode"641 },642 {643 "data": {644 "id": "ChatInput-WGsAl",645 "node": {646 "base_classes": [647 "Message"648 ],649 "beta": false,650 "category": "inputs",651 "conditional_paths": [],652 "custom_fields": {},653 "description": "Get chat inputs from the Playground.",654 "display_name": "Chat Input",655 "documentation": "",656 "edited": false,657 "field_order": [658 "input_value",659 "should_store_message",660 "sender",661 "sender_name",662 "session_id",663 "files",664 "background_color",665 "chat_icon",666 "text_color"667 ],668 "frozen": false,669 "icon": "MessagesSquare",670 "key": "ChatInput",671 "legacy": false,672 "lf_version": "1.4.3",673 "metadata": {},674 "minimized": true,675 "output_types": [],676 "outputs": [677 {678 "allows_loop": false,679 "cache": true,680 "display_name": "Message",681 "method": "message_response",682 "name": "message",683 "selected": "Message",684 "tool_mode": true,685 "types": [686 "Message"687 ],688 "value": "__UNDEFINED__"689 }690 ],691 "pinned": false,692 "score": 0.0020353564437605998,693 "template": {694 "_type": "Component",695 "background_color": {696 "_input_type": "MessageTextInput",697 "advanced": true,698 "display_name": "Background Color",699 "dynamic": false,700 "info": "The background color of the icon.",701 "input_types": [702 "Message"703 ],704 "list": false,705 "list_add_label": "Add More",706 "load_from_db": false,707 "name": "background_color",708 "placeholder": "",709 "required": false,710 "show": true,711 "title_case": false,712 "tool_mode": false,713 "trace_as_input": true,714 "trace_as_metadata": true,715 "type": "str",716 "value": ""717 },718 "chat_icon": {719 "_input_type": "MessageTextInput",720 "advanced": true,721 "display_name": "Icon",722 "dynamic": false,723 "info": "The icon of the message.",724 "input_types": [725 "Message"726 ],727 "list": false,728 "list_add_label": "Add More",729 "load_from_db": false,730 "name": "chat_icon",731 "placeholder": "",732 "required": false,733 "show": true,734 "title_case": false,735 "tool_mode": false,736 "trace_as_input": true,737 "trace_as_metadata": true,738 "type": "str",739 "value": ""740 },741 "code": {742 "advanced": true,743 "dynamic": true,744 "fileTypes": [],745 "file_path": "",746 "info": "",747 "list": false,748 "load_from_db": false,749 "multiline": true,750 "name": "code",751 "password": false,752 "placeholder": "",753 "required": true,754 "show": true,755 "title_case": false,756 "type": "code",757 "value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n temp_file=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n"758 },759 "files": {760 "_input_type": "FileInput",761 "advanced": true,762 "display_name": "Files",763 "dynamic": false,764 "fileTypes": [765 "txt",766 "md",767 "mdx",768 "csv",769 "json",770 "yaml",771 "yml",772 "xml",773 "html",774 "htm",775 "pdf",776 "docx",777 "py",778 "sh",779 "sql",780 "js",781 "ts",782 "tsx",783 "jpg",784 "jpeg",785 "png",786 "bmp",787 "image"788 ],789 "file_path": "",790 "info": "Files to be sent with the message.",791 "list": true,792 "list_add_label": "Add More",793 "name": "files",794 "placeholder": "",795 "required": false,796 "show": true,797 "temp_file": true,798 "title_case": false,799 "trace_as_metadata": true,800 "type": "file",801 "value": ""802 },803 "input_value": {804 "_input_type": "MultilineInput",805 "advanced": false,806 "copy_field": false,807 "display_name": "Text",808 "dynamic": false,809 "info": "Message to be passed as input.",810 "input_types": [],811 "list": false,812 "list_add_label": "Add More",813 "load_from_db": false,814 "multiline": true,815 "name": "input_value",816 "placeholder": "",817 "required": false,818 "show": true,819 "title_case": false,820 "tool_mode": false,821 "trace_as_input": true,822 "trace_as_metadata": true,823 "type": "str",824 "value": ""825 },826 "sender": {827 "_input_type": "DropdownInput",828 "advanced": true,829 "combobox": false,830 "dialog_inputs": {},831 "display_name": "Sender Type",832 "dynamic": false,833 "info": "Type of sender.",834 "name": "sender",835 "options": [836 "Machine",837 "User"838 ],839 "options_metadata": [],840 "placeholder": "",841 "required": false,842 "show": true,843 "title_case": false,844 "toggle": false,845 "tool_mode": false,846 "trace_as_metadata": true,847 "type": "str",848 "value": "User"849 },850 "sender_name": {851 "_input_type": "MessageTextInput",852 "advanced": true,853 "display_name": "Sender Name",854 "dynamic": false,855 "info": "Name of the sender.",856 "input_types": [857 "Message"858 ],859 "list": false,860 "list_add_label": "Add More",861 "load_from_db": false,862 "name": "sender_name",863 "placeholder": "",864 "required": false,865 "show": true,866 "title_case": false,867 "tool_mode": false,868 "trace_as_input": true,869 "trace_as_metadata": true,870 "type": "str",871 "value": "User"872 },873 "session_id": {874 "_input_type": "MessageTextInput",875 "advanced": true,876 "display_name": "Session ID",877 "dynamic": false,878 "info": "The session ID of the chat. If empty, the current session ID parameter will be used.",879 "input_types": [880 "Message"881 ],882 "list": false,883 "list_add_label": "Add More",884 "load_from_db": false,885 "name": "session_id",886 "placeholder": "",887 "required": false,888 "show": true,889 "title_case": false,890 "tool_mode": false,891 "trace_as_input": true,892 "trace_as_metadata": true,893 "type": "str",894 "value": ""895 },896 "should_store_message": {897 "_input_type": "BoolInput",898 "advanced": true,899 "display_name": "Store Messages",900 "dynamic": false,901 "info": "Store the message in the history.",902 "list": false,903 "list_add_label": "Add More",904 "name": "should_store_message",905 "placeholder": "",906 "required": false,907 "show": true,908 "title_case": false,909 "tool_mode": false,910 "trace_as_metadata": true,911 "type": "bool",912 "value": true913 },914 "text_color": {915 "_input_type": "MessageTextInput",916 "advanced": true,917 "display_name": "Text Color",918 "dynamic": false,919 "info": "The text color of the name",920 "input_types": [921 "Message"922 ],923 "list": false,924 "list_add_label": "Add More",925 "load_from_db": false,926 "name": "text_color",927 "placeholder": "",928 "required": false,929 "show": true,930 "title_case": false,931 "tool_mode": false,932 "trace_as_input": true,933 "trace_as_metadata": true,934 "type": "str",935 "value": ""936 }937 },938 "tool_mode": false939 },940 "showNode": false,941 "type": "ChatInput"942 },943 "dragging": false,944 "id": "ChatInput-WGsAl",945 "measured": {946 "height": 66,947 "width": 192948 },949 "position": {950 "x": 1373.5683878740256,951 "y": 1196.96974299611952 },953 "selected": false,954 "type": "genericNode"955 },956 {957 "data": {958 "id": "URLComponent-ZKgiv",959 "node": {960 "base_classes": [961 "Data",962 "DataFrame",963 "Message"964 ],965 "beta": false,966 "category": "data",967 "conditional_paths": [],968 "custom_fields": {},969 "description": "Load and parse child links from a root URL recursively",970 "display_name": "URL",971 "documentation": "",972 "edited": false,973 "field_order": [974 "urls",975 "max_depth",976 "prevent_outside",977 "use_async",978 "format",979 "timeout",980 "headers"981 ],982 "frozen": false,983 "icon": "layout-template",984 "key": "URLComponent",985 "legacy": false,986 "lf_version": "1.4.3",987 "metadata": {},988 "minimized": false,989 "output_types": [],990 "outputs": [991 {992 "allows_loop": false,993 "cache": true,994 "display_name": "Data",995 "hidden": false,996 "method": "fetch_content",997 "name": "data",998 "selected": "Data",999 "tool_mode": true,1000 "types": [1001 "Data"1002 ],1003 "value": "__UNDEFINED__"1004 },1005 {1006 "allows_loop": false,1007 "cache": true,1008 "display_name": "Message",1009 "hidden": false,1010 "method": "fetch_content_text",1011 "name": "text",1012 "selected": "Message",1013 "tool_mode": true,1014 "types": [1015 "Message"1016 ],1017 "value": "__UNDEFINED__"1018 },1019 {1020 "allows_loop": false,1021 "cache": true,1022 "display_name": "DataFrame",1023 "hidden": false,1024 "method": "as_dataframe",1025 "name": "dataframe",1026 "selected": "DataFrame",1027 "tool_mode": true,1028 "types": [1029 "DataFrame"1030 ],1031 "value": "__UNDEFINED__"1032 }1033 ],1034 "pinned": false,1035 "score": 2.220446049250313e-16,1036 "template": {1037 "_type": "Component",1038 "code": {1039 "advanced": true,1040 "dynamic": true,1041 "fileTypes": [],1042 "file_path": "",1043 "info": "",1044 "list": false,1045 "load_from_db": false,1046 "multiline": true,1047 "name": "code",1048 "password": false,1049 "placeholder": "",1050 "required": true,1051 "show": true,1052 "title_case": false,1053 "type": "code",1054 "value": "import re\n\nimport httpx\nfrom bs4 import BeautifulSoup\nfrom langchain_community.document_loaders import RecursiveUrlLoader\nfrom loguru import logger\n\nfrom langflow.custom.custom_component.component import Component\nfrom langflow.helpers.data import data_to_text\nfrom langflow.inputs.inputs import TableInput\nfrom langflow.io import BoolInput, DropdownInput, IntInput, MessageTextInput, Output\nfrom langflow.schema import Data\nfrom langflow.schema.dataframe import DataFrame\nfrom langflow.schema.message import Message\nfrom langflow.services.deps import get_settings_service\n\n\nclass URLComponent(Component):\n \"\"\"A component that loads and parses child links from a root URL recursively.\"\"\"\n\n display_name = \"URL\"\n description = \"Load and parse child links from a root URL recursively\"\n icon = \"layout-template\"\n name = \"URLComponent\"\n\n inputs = [\n MessageTextInput(\n name=\"urls\",\n display_name=\"URLs\",\n info=\"Enter one or more URLs to crawl recursively, by clicking the '+' button.\",\n is_list=True,\n tool_mode=True,\n placeholder=\"Enter a URL...\",\n list_add_label=\"Add URL\",\n ),\n IntInput(\n name=\"max_depth\",\n display_name=\"Max Depth\",\n info=(\n \"Controls how many 'clicks' away from the initial page the crawler will go:\\n\"\n \"- depth 1: only the initial page\\n\"\n \"- depth 2: initial page + all pages linked directly from it\\n\"\n \"- depth 3: initial page + direct links + links found on those direct link pages\\n\"\n \"Note: This is about link traversal, not URL path depth.\"\n ),\n value=1,\n required=False,\n ),\n BoolInput(\n name=\"prevent_outside\",\n display_name=\"Prevent Outside\",\n info=(\n \"If enabled, only crawls URLs within the same domain as the root URL. \"\n \"This helps prevent the crawler from going to external websites.\"\n ),\n value=True,\n required=False,\n advanced=True,\n ),\n BoolInput(\n name=\"use_async\",\n display_name=\"Use Async\",\n info=(\n \"If enabled, uses asynchronous loading which can be significantly faster \"\n \"but might use more system resources.\"\n ),\n value=True,\n required=False,\n advanced=True,\n ),\n DropdownInput(\n name=\"format\",\n display_name=\"Output Format\",\n info=\"Output Format. Use 'Text' to extract the text from the HTML or 'HTML' for the raw HTML content.\",\n options=[\"Text\", \"HTML\"],\n value=\"Text\",\n advanced=True,\n ),\n IntInput(\n name=\"timeout\",\n display_name=\"Timeout\",\n info=\"Timeout for the request in seconds.\",\n value=30,\n required=False,\n advanced=True,\n ),\n TableInput(\n name=\"headers\",\n display_name=\"Headers\",\n info=\"The headers to send with the request\",\n table_schema=[\n {\n \"name\": \"key\",\n \"display_name\": \"Header\",\n \"type\": \"str\",\n \"description\": \"Header name\",\n },\n {\n \"name\": \"value\",\n \"display_name\": \"Value\",\n \"type\": \"str\",\n \"description\": \"Header value\",\n },\n ],\n value=[{\"key\": \"User-Agent\", \"value\": get_settings_service().settings.user_agent}],\n advanced=True,\n input_types=[\"DataFrame\"],\n ),\n ]\n\n outputs = [\n Output(display_name=\"Data\", name=\"data\", method=\"fetch_content\"),\n Output(display_name=\"Message\", name=\"text\", method=\"fetch_content_text\"),\n Output(display_name=\"DataFrame\", name=\"dataframe\", method=\"as_dataframe\"),\n ]\n\n def validate_url(self, string: str) -> bool:\n \"\"\"Validates if the given string matches URL pattern.\"\"\"\n url_regex = re.compile(\n r\"^(https?:\\/\\/)?\" r\"(www\\.)?\" r\"([a-zA-Z0-9.-]+)\" r\"(\\.[a-zA-Z]{2,})?\" r\"(:\\d+)?\" r\"(\\/[^\\s]*)?$\",\n re.IGNORECASE,\n )\n return bool(url_regex.match(string))\n\n def ensure_url(self, url: str) -> str:\n \"\"\"Ensures the given string is a valid URL.\"\"\"\n if not url.startswith((\"http://\", \"https://\")):\n url = \"http://\" + url\n\n if not self.validate_url(url):\n error_msg = \"Invalid URL - \" + url\n raise ValueError(error_msg)\n\n return url\n\n def fetch_content(self) -> list[Data]:\n \"\"\"Load documents from the URLs.\"\"\"\n all_docs = []\n data = []\n try:\n urls = list({self.ensure_url(url.strip()) for url in self.urls if url.strip()})\n\n no_urls_msg = \"No valid URLs provided.\"\n if not urls:\n raise ValueError(no_urls_msg)\n\n # If there's only one URL, we'll make sure to propagate any errors\n single_url = len(urls) == 1\n\n for processed_url in urls:\n msg = f\"Loading documents from {processed_url}\"\n logger.info(msg)\n\n # Create headers dictionary\n headers_dict = {header[\"key\"]: header[\"value\"] for header in self.headers}\n\n # Configure RecursiveUrlLoader with httpx-compatible settings\n extractor = (lambda x: x) if self.format == \"HTML\" else (lambda x: BeautifulSoup(x, \"lxml\").get_text())\n\n # Modified settings for RecursiveUrlLoader\n # Note: We need to pass a compatible client or settings to RecursiveUrlLoader\n # This will depend on how RecursiveUrlLoader is implemented\n loader = RecursiveUrlLoader(\n url=processed_url,\n max_depth=self.max_depth,\n prevent_outside=self.prevent_outside,\n use_async=self.use_async,\n continue_on_failure=not single_url,\n extractor=extractor,\n timeout=self.timeout,\n headers=headers_dict,\n )\n\n try:\n docs = loader.load()\n if not docs:\n msg = f\"No documents found for {processed_url}\"\n logger.warning(msg)\n if single_url:\n message = f\"No documents found for {processed_url}\"\n raise ValueError(message)\n else:\n msg = f\"Found {len(docs)} documents from {processed_url}\"\n logger.info(msg)\n all_docs.extend(docs)\n except (httpx.HTTPError, httpx.RequestError) as e:\n msg = f\"Error loading documents from {processed_url}: {e}\"\n logger.exception(msg)\n if single_url:\n raise # Re-raise the exception if it's the only URL\n except UnicodeDecodeError as e:\n msg = f\"Error decoding content from {processed_url}: {e}\"\n logger.error(msg)\n if single_url:\n raise # Re-raise the exception if it's the only URL\n except Exception as e:\n msg = f\"Unexpected error loading documents from {processed_url}: {e}\"\n logger.exception(msg)\n if single_url:\n raise # Re-raise the exception if it's the only URL\n\n data = [Data(text=doc.page_content, **doc.metadata) for doc in all_docs]\n self.status = data\n\n except Exception as e:\n error_msg = e.message if hasattr(e, \"message\") else e\n msg = f\"Error loading documents: {error_msg!s}\"\n logger.exception(msg)\n raise ValueError(msg) from e\n\n self.status = data\n return data\n\n def fetch_content_text(self) -> Message:\n \"\"\"Load documents and return their text content.\"\"\"\n data = self.fetch_content()\n result_string = data_to_text(\"{text}\", data)\n self.status = result_string\n return Message(text=result_string)\n\n def as_dataframe(self) -> DataFrame:\n \"\"\"Convert the documents to a DataFrame.\"\"\"\n data_frame = DataFrame(self.fetch_content())\n self.status = data_frame\n return data_frame\n"1055 },1056 "format": {1057 "_input_type": "DropdownInput",1058 "advanced": true,1059 "combobox": false,1060 "dialog_inputs": {},1061 "display_name": "Output Format",1062 "dynamic": false,1063 "info": "Output Format. Use 'Text' to extract the text from the HTML or 'HTML' for the raw HTML content.",1064 "name": "format",1065 "options": [1066 "Text",1067 "HTML"1068 ],1069 "options_metadata": [],1070 "placeholder": "",1071 "required": false,1072 "show": true,1073 "title_case": false,1074 "toggle": false,1075 "tool_mode": false,1076 "trace_as_metadata": true,1077 "type": "str",1078 "value": "Text"1079 },1080 "headers": {1081 "_input_type": "TableInput",1082 "advanced": true,1083 "display_name": "Headers",1084 "dynamic": false,1085 "info": "The headers to send with the request",1086 "input_types": [1087 "DataFrame"1088 ],1089 "is_list": true,1090 "list_add_label": "Add More",1091 "name": "headers",1092 "placeholder": "",1093 "required": false,1094 "show": true,1095 "table_icon": "Table",1096 "table_schema": {1097 "columns": [1098 {1099 "default": "None",1100 "description": "Header name",1101 "disable_edit": false,1102 "display_name": "Header",1103 "edit_mode": "popover",1104 "filterable": true,1105 "formatter": "text",1106 "hidden": false,1107 "name": "key",1108 "sortable": true,1109 "type": "str"1110 },1111 {1112 "default": "None",1113 "description": "Header value",1114 "disable_edit": false,1115 "display_name": "Value",1116 "edit_mode": "popover",1117 "filterable": true,1118 "formatter": "text",1119 "hidden": false,1120 "name": "value",1121 "sortable": true,1122 "type": "str"1123 }1124 ]1125 },1126 "title_case": false,1127 "tool_mode": false,1128 "trace_as_metadata": true,1129 "trigger_icon": "Table",1130 "trigger_text": "Open table",1131 "type": "table",1132 "value": [1133 {1134 "key": "User-Agent",1135 "value": "langflow"1136 }1137 ]1138 },1139 "max_depth": {1140 "_input_type": "IntInput",1141 "advanced": false,1142 "display_name": "Max Depth",1143 "dynamic": false,1144 "info": "Controls how many 'clicks' away from the initial page the crawler will go:\n- depth 1: only the initial page\n- depth 2: initial page + all pages linked directly from it\n- depth 3: initial page + direct links + links found on those direct link pages\nNote: This is about link traversal, not URL path depth.",1145 "list": false,1146 "list_add_label": "Add More",1147 "name": "max_depth",1148 "placeholder": "",1149 "required": false,1150 "show": true,1151 "title_case": false,1152 "tool_mode": false,1153 "trace_as_metadata": true,1154 "type": "int",1155 "value": 11156 },1157 "prevent_outside": {1158 "_input_type": "BoolInput",1159 "advanced": true,1160 "display_name": "Prevent Outside",1161 "dynamic": false,1162 "info": "If enabled, only crawls URLs within the same domain as the root URL. This helps prevent the crawler from going to external websites.",1163 "list": false,1164 "list_add_label": "Add More",1165 "name": "prevent_outside",1166 "placeholder": "",1167 "required": false,1168 "show": true,1169 "title_case": false,1170 "tool_mode": false,1171 "trace_as_metadata": true,1172 "type": "bool",1173 "value": true1174 },1175 "timeout": {1176 "_input_type": "IntInput",1177 "advanced": true,1178 "display_name": "Timeout",1179 "dynamic": false,1180 "info": "Timeout for the request in seconds.",1181 "list": false,1182 "list_add_label": "Add More",1183 "name": "timeout",1184 "placeholder": "",1185 "required": false,1186 "show": true,1187 "title_case": false,1188 "tool_mode": false,1189 "trace_as_metadata": true,1190 "type": "int",1191 "value": 301192 },1193 "urls": {1194 "_input_type": "MessageTextInput",1195 "advanced": false,1196 "display_name": "URLs",1197 "dynamic": false,1198 "info": "Enter one or more URLs to crawl recursively, by clicking the '+' button.",1199 "input_types": [1200 "Message"