langflow-base-nightly 0.5.0.dev37__py3-none-any.whl → 0.5.0.dev39__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (397) hide show
  1. langflow/__main__.py +1 -1
  2. langflow/alembic/versions/0882f9657f22_encrypt_existing_mcp_auth_settings_.py +122 -0
  3. langflow/alembic/versions/4e5980a44eaa_fix_date_times_again.py +24 -30
  4. langflow/alembic/versions/58b28437a398_modify_nullable.py +6 -6
  5. langflow/alembic/versions/79e675cb6752_change_datetime_type.py +24 -30
  6. langflow/alembic/versions/b2fa308044b5_add_unique_constraints.py +12 -13
  7. langflow/api/build.py +21 -26
  8. langflow/api/health_check_router.py +3 -3
  9. langflow/api/utils.py +3 -3
  10. langflow/api/v1/callback.py +2 -2
  11. langflow/api/v1/chat.py +19 -31
  12. langflow/api/v1/endpoints.py +10 -10
  13. langflow/api/v1/flows.py +1 -1
  14. langflow/api/v1/knowledge_bases.py +3 -3
  15. langflow/api/v1/mcp.py +12 -12
  16. langflow/api/v1/mcp_projects.py +405 -120
  17. langflow/api/v1/mcp_utils.py +8 -8
  18. langflow/api/v1/schemas.py +2 -7
  19. langflow/api/v1/store.py +1 -1
  20. langflow/api/v1/validate.py +2 -2
  21. langflow/api/v1/voice_mode.py +58 -62
  22. langflow/api/v2/files.py +2 -2
  23. langflow/api/v2/mcp.py +10 -9
  24. langflow/base/composio/composio_base.py +21 -2
  25. langflow/base/data/docling_utils.py +194 -0
  26. langflow/base/embeddings/aiml_embeddings.py +1 -1
  27. langflow/base/flow_processing/utils.py +1 -2
  28. langflow/base/io/__init__.py +0 -1
  29. langflow/base/langwatch/utils.py +2 -1
  30. langflow/base/mcp/util.py +49 -47
  31. langflow/base/prompts/api_utils.py +1 -1
  32. langflow/base/tools/flow_tool.py +2 -2
  33. langflow/base/tools/run_flow.py +2 -6
  34. langflow/components/FAISS/__init__.py +34 -0
  35. langflow/components/Notion/add_content_to_page.py +2 -2
  36. langflow/components/Notion/list_database_properties.py +2 -2
  37. langflow/components/Notion/list_pages.py +2 -2
  38. langflow/components/Notion/page_content_viewer.py +2 -2
  39. langflow/components/Notion/update_page_property.py +1 -1
  40. langflow/components/agentql/agentql_api.py +2 -10
  41. langflow/components/agents/agent.py +249 -55
  42. langflow/components/agents/mcp_component.py +14 -14
  43. langflow/components/anthropic/anthropic.py +5 -4
  44. langflow/components/assemblyai/assemblyai_get_subtitles.py +2 -2
  45. langflow/components/assemblyai/assemblyai_lemur.py +2 -2
  46. langflow/components/assemblyai/assemblyai_list_transcripts.py +2 -2
  47. langflow/components/assemblyai/assemblyai_poll_transcript.py +2 -2
  48. langflow/components/assemblyai/assemblyai_start_transcript.py +2 -2
  49. langflow/components/cassandra/__init__.py +40 -0
  50. langflow/components/chroma/__init__.py +34 -0
  51. langflow/components/clickhouse/__init__.py +34 -0
  52. langflow/components/couchbase/__init__.py +34 -0
  53. langflow/components/data/file.py +575 -55
  54. langflow/components/data/url.py +1 -1
  55. langflow/components/datastax/__init__.py +3 -3
  56. langflow/components/datastax/astra_assistant_manager.py +3 -3
  57. langflow/components/datastax/create_assistant.py +1 -2
  58. langflow/components/deactivated/merge_data.py +1 -2
  59. langflow/components/deactivated/sub_flow.py +6 -7
  60. langflow/components/deactivated/vectara_self_query.py +3 -3
  61. langflow/components/docling/__init__.py +0 -198
  62. langflow/components/docling/docling_inline.py +1 -1
  63. langflow/components/elastic/__init__.py +37 -0
  64. langflow/components/embeddings/text_embedder.py +3 -3
  65. langflow/components/firecrawl/firecrawl_extract_api.py +2 -9
  66. langflow/components/google/gmail.py +1 -1
  67. langflow/components/google/google_generative_ai.py +5 -11
  68. langflow/components/groq/groq.py +4 -3
  69. langflow/components/helpers/current_date.py +2 -3
  70. langflow/components/helpers/memory.py +1 -1
  71. langflow/components/ibm/watsonx.py +1 -1
  72. langflow/components/ibm/watsonx_embeddings.py +1 -1
  73. langflow/components/langwatch/langwatch.py +3 -3
  74. langflow/components/logic/flow_tool.py +2 -2
  75. langflow/components/logic/notify.py +1 -1
  76. langflow/components/logic/run_flow.py +2 -3
  77. langflow/components/logic/sub_flow.py +4 -5
  78. langflow/components/mem0/mem0_chat_memory.py +2 -8
  79. langflow/components/milvus/__init__.py +34 -0
  80. langflow/components/mongodb/__init__.py +34 -0
  81. langflow/components/nvidia/nvidia.py +3 -3
  82. langflow/components/olivya/olivya.py +7 -7
  83. langflow/components/ollama/ollama.py +9 -6
  84. langflow/components/perplexity/perplexity.py +3 -13
  85. langflow/components/pgvector/__init__.py +34 -0
  86. langflow/components/pinecone/__init__.py +34 -0
  87. langflow/components/processing/batch_run.py +8 -8
  88. langflow/components/processing/data_operations.py +2 -2
  89. langflow/components/processing/merge_data.py +1 -2
  90. langflow/components/processing/message_to_data.py +2 -3
  91. langflow/components/processing/parse_json_data.py +1 -1
  92. langflow/components/prototypes/python_function.py +2 -3
  93. langflow/components/qdrant/__init__.py +34 -0
  94. langflow/components/redis/__init__.py +36 -2
  95. langflow/components/redis/redis.py +75 -29
  96. langflow/components/redis/redis_chat.py +43 -0
  97. langflow/components/serpapi/serp.py +1 -1
  98. langflow/components/supabase/__init__.py +37 -0
  99. langflow/components/tavily/tavily_extract.py +1 -1
  100. langflow/components/tavily/tavily_search.py +1 -1
  101. langflow/components/tools/calculator.py +2 -2
  102. langflow/components/tools/python_code_structured_tool.py +3 -10
  103. langflow/components/tools/python_repl.py +2 -2
  104. langflow/components/tools/searxng.py +3 -3
  105. langflow/components/tools/serp_api.py +2 -2
  106. langflow/components/tools/tavily_search_tool.py +2 -2
  107. langflow/components/tools/yahoo_finance.py +1 -1
  108. langflow/components/twelvelabs/video_embeddings.py +4 -4
  109. langflow/components/upstash/__init__.py +34 -0
  110. langflow/components/vectara/__init__.py +37 -0
  111. langflow/components/vectorstores/__init__.py +0 -69
  112. langflow/components/vectorstores/local_db.py +2 -1
  113. langflow/components/weaviate/__init__.py +34 -0
  114. langflow/components/yahoosearch/yahoo.py +1 -1
  115. langflow/components/youtube/trending.py +3 -4
  116. langflow/custom/attributes.py +2 -1
  117. langflow/custom/code_parser/code_parser.py +1 -1
  118. langflow/custom/custom_component/base_component.py +1 -1
  119. langflow/custom/custom_component/component.py +16 -2
  120. langflow/custom/dependency_analyzer.py +165 -0
  121. langflow/custom/directory_reader/directory_reader.py +7 -7
  122. langflow/custom/directory_reader/utils.py +1 -2
  123. langflow/custom/utils.py +63 -45
  124. langflow/events/event_manager.py +1 -1
  125. langflow/frontend/assets/{SlackIcon-CnvyOamQ.js → SlackIcon-Cr3Q15Px.js} +1 -1
  126. langflow/frontend/assets/{Wikipedia-nyTEXdr2.js → Wikipedia-GxM5sPdM.js} +1 -1
  127. langflow/frontend/assets/{Wolfram-BYMQkNSq.js → Wolfram-BN3-VOCA.js} +1 -1
  128. langflow/frontend/assets/{index-DZTC5pdT.js → index-28oOcafk.js} +1 -1
  129. langflow/frontend/assets/{index-ChXJpBz4.js → index-2wSXqBtB.js} +1 -1
  130. langflow/frontend/assets/{index-BB15_iOb.js → index-3wW7BClE.js} +1 -1
  131. langflow/frontend/assets/{index-DKHNourL.js → index-6pyH3ZJB.js} +1 -1
  132. langflow/frontend/assets/{index-BvwZfF2i.js → index-AWCSdofD.js} +1 -1
  133. langflow/frontend/assets/{index-Bvxg4_ux.js → index-B2Zgv_xv.js} +1 -1
  134. langflow/frontend/assets/{index-Bd6WtbKA.js → index-B2ptVQGM.js} +1 -1
  135. langflow/frontend/assets/{index-C7QWbnLK.js → index-B3TANVes.js} +1 -1
  136. langflow/frontend/assets/{index-CpvYQ0ug.js → index-B4yCvZKV.js} +1 -1
  137. langflow/frontend/assets/{index-Dg-63Si_.js → index-BC65VuWx.js} +1 -1
  138. langflow/frontend/assets/{index-C6jri9Wm.js → index-BCDSei1q.js} +1 -1
  139. langflow/frontend/assets/{index-OazXJdEl.js → index-BJy50PvP.js} +1 -1
  140. langflow/frontend/assets/{index-CWdkbVsd.js → index-BKseQQ2I.js} +1 -1
  141. langflow/frontend/assets/{index-CaQ_H9ww.js → index-BLTxEeTi.js} +1 -1
  142. langflow/frontend/assets/{index-DGRMNe9n.js → index-BRg1f4Mu.js} +1 -1
  143. langflow/frontend/assets/{index-D8lOi1GI.js → index-BS8Vo8nc.js} +1 -1
  144. langflow/frontend/assets/{index-B748uLP1.js → index-BTKOU4xC.js} +1 -1
  145. langflow/frontend/assets/{index-Dqd4RjYA.js → index-BVwJDmw-.js} +1 -1
  146. langflow/frontend/assets/{index-DbMFlnHE.js → index-BWYuQ2Sj.js} +1 -1
  147. langflow/frontend/assets/{index-BEMw2Np8.js → index-BWdLILDG.js} +1 -1
  148. langflow/frontend/assets/{index-BmX5CoED.js → index-BZcw4827.js} +1 -1
  149. langflow/frontend/assets/{index-CyPvTB63.js → index-Bbi87Ve4.js} +1 -1
  150. langflow/frontend/assets/{index-BTEW9e8P.js → index-Bf0IYKLd.js} +1 -1
  151. langflow/frontend/assets/{index-BZgXW854.js → index-Bg5nrMRh.js} +1 -1
  152. langflow/frontend/assets/{index-BBxAPk1y.js → index-BiC280Nx.js} +1 -1
  153. langflow/frontend/assets/{index-BR0bkVqX.js → index-BiKKN6FR.js} +1 -1
  154. langflow/frontend/assets/{index-CTrt1Q_j.js → index-Bief6eyJ.js} +1 -1
  155. langflow/frontend/assets/{index-D5_DsUJc.js → index-BkXec1Yf.js} +1 -1
  156. langflow/frontend/assets/{index-CZQ9rXNa.js → index-Bnl6QHtP.js} +1 -1
  157. langflow/frontend/assets/{index-BChjg6Az.js → index-BpxbUiZD.js} +1979 -1979
  158. langflow/frontend/assets/{index-BOeo01QB.js → index-BrJV8psX.js} +1 -1
  159. langflow/frontend/assets/{index-DysKpOuj.js → index-BwLWcUXL.js} +1 -1
  160. langflow/frontend/assets/{index-Bnqod3vk.js → index-Bx7dBY26.js} +1 -1
  161. langflow/frontend/assets/{index-D3DDfngy.js → index-C-EdnFdA.js} +1 -1
  162. langflow/frontend/assets/{index-Bsa0xZyL.js → index-C-Xfg4cD.js} +1 -1
  163. langflow/frontend/assets/{index-BTrsh9LS.js → index-C1f2wMat.js} +1 -1
  164. langflow/frontend/assets/index-C1xroOlH.css +1 -0
  165. langflow/frontend/assets/{index-B1YN7oMV.js → index-C3KequvP.js} +1 -1
  166. langflow/frontend/assets/{index-DzW2mfkK.js → index-C3ZjKdCD.js} +1 -1
  167. langflow/frontend/assets/{index-ajRge-Mg.js → index-C3l0zYn0.js} +1 -1
  168. langflow/frontend/assets/{index-cvZdgWHQ.js → index-C3yvArUT.js} +1 -1
  169. langflow/frontend/assets/{index-C-2hghRJ.js → index-C9Cxnkl8.js} +1 -1
  170. langflow/frontend/assets/{index-BhIOhlCH.js → index-CBc8fEAE.js} +1 -1
  171. langflow/frontend/assets/{index-B3Sur4Z3.js → index-CBvrGgID.js} +1 -1
  172. langflow/frontend/assets/{index-CCePCqkT.js → index-CD-PqGCY.js} +1 -1
  173. langflow/frontend/assets/{index-8yMsjVV2.js → index-CGO1CiUr.js} +1 -1
  174. langflow/frontend/assets/{index-DF5VwgU6.js → index-CH5UVA9b.js} +1 -1
  175. langflow/frontend/assets/{index-dcnYpT9N.js → index-CLJeJYjH.js} +1 -1
  176. langflow/frontend/assets/{index-DfxYyS3M.js → index-CMZ79X-Y.js} +1 -1
  177. langflow/frontend/assets/{index-ya2uXE8v.js → index-CMzfJKiW.js} +1 -1
  178. langflow/frontend/assets/{index-DkelbYy7.js → index-CNw1H-Wc.js} +1 -1
  179. langflow/frontend/assets/{index-DytJENYD.js → index-CPHEscq9.js} +1 -1
  180. langflow/frontend/assets/{index-Bv8h2Z-q.js → index-CRPKJZw9.js} +1 -1
  181. langflow/frontend/assets/{index-D-9TI74R.js → index-CRPyCfYy.js} +1 -1
  182. langflow/frontend/assets/{index-BLGYN-9b.js → index-CRcMqCIj.js} +1 -1
  183. langflow/frontend/assets/{index-tVYiABdp.js → index-CUVDws8F.js} +1 -1
  184. langflow/frontend/assets/{index-CpcbQZIF.js → index-CVWQfRYZ.js} +1 -1
  185. langflow/frontend/assets/{index-DPCzHdsC.js → index-CVl6MbaM.js} +1 -1
  186. langflow/frontend/assets/{index-DkXy1WFo.js → index-CVwWoX99.js} +1 -1
  187. langflow/frontend/assets/{index-DK1Ptcc4.js → index-CWPzZtSx.js} +1 -1
  188. langflow/frontend/assets/{index-DHq8TQPB.js → index-CZqRL9DE.js} +1 -1
  189. langflow/frontend/assets/{index-DnEGCgih.js → index-CdIf07Rw.js} +1 -1
  190. langflow/frontend/assets/{index-BIQQCMvz.js → index-Cewy7JZE.js} +1 -1
  191. langflow/frontend/assets/{index-D8GJngXa.js → index-CfwLpbMM.js} +1 -1
  192. langflow/frontend/assets/{index-C_TdzfAn.js → index-CiR1dxI4.js} +1 -1
  193. langflow/frontend/assets/{index-BzL_EoKd.js → index-CiixOzDG.js} +1 -1
  194. langflow/frontend/assets/{index-Boso-xEw.js → index-ClsuDmR6.js} +1 -1
  195. langflow/frontend/assets/{index-8WdfSTTz.js → index-CmEYYRN1.js} +1 -1
  196. langflow/frontend/assets/{index-FUxmznS-.js → index-Co20d-eQ.js} +1 -1
  197. langflow/frontend/assets/{index-C82JjCPD.js → index-CpzXS6md.js} +1 -1
  198. langflow/frontend/assets/{index-DIDDfmlJ.js → index-Cqpzl1J4.js} +1 -1
  199. langflow/frontend/assets/{index-_UcqeEjm.js → index-CtVIONP2.js} +1 -1
  200. langflow/frontend/assets/{index-Gkrq-vzm.js → index-CuFXdTx4.js} +1 -1
  201. langflow/frontend/assets/{index-WPFivmdQ.js → index-Cyd2HtHK.js} +1 -1
  202. langflow/frontend/assets/{index-BFp_O-c9.js → index-D-1tA8Dt.js} +1 -1
  203. langflow/frontend/assets/{index-BqPpO6KG.js → index-D-KY3kkq.js} +1 -1
  204. langflow/frontend/assets/{index-Db71w3lq.js → index-D-_B1a8v.js} +1 -1
  205. langflow/frontend/assets/{index-BIzTEqFh.js → index-D14EWPyZ.js} +1 -1
  206. langflow/frontend/assets/{index-BbJjt5m4.js → index-D2N3l-cw.js} +1 -1
  207. langflow/frontend/assets/{index-DCRk27Tp.js → index-D5ETnvJa.js} +1 -1
  208. langflow/frontend/assets/{index-CvcEzq4x.js → index-D7kquVv2.js} +1 -1
  209. langflow/frontend/assets/{index-Q9vDw0Xl.js → index-DA6-bvgN.js} +1 -1
  210. langflow/frontend/assets/{index-l7bzB8Ex.js → index-DDWBeudF.js} +1 -1
  211. langflow/frontend/assets/{index-BCCGvqay.js → index-DDcMAaG4.js} +1 -1
  212. langflow/frontend/assets/{index-pCQ_yw8m.js → index-DHgomBdh.js} +1 -1
  213. langflow/frontend/assets/{index-BxEuHa76.js → index-DJP-ss47.js} +1 -1
  214. langflow/frontend/assets/{index-BbRm7beF.js → index-DQ7VYqQc.js} +1 -1
  215. langflow/frontend/assets/{index-Car-zdor.js → index-DTqbvGC0.js} +1 -1
  216. langflow/frontend/assets/{index-BRxvproo.js → index-DUpri6zF.js} +1 -1
  217. langflow/frontend/assets/{index-BQ6NUdMY.js → index-DV3utZDZ.js} +1 -1
  218. langflow/frontend/assets/{index-DjQETUy8.js → index-DXRfN4HV.js} +1 -1
  219. langflow/frontend/assets/{index-DfngcQxO.js → index-Db9dYSzy.js} +1 -1
  220. langflow/frontend/assets/{index-rXV1G1aB.js → index-DdtMEn6I.js} +1 -1
  221. langflow/frontend/assets/{index-DmMDPoi0.js → index-DfDhMHgQ.js} +1 -1
  222. langflow/frontend/assets/{index-DJB12jIC.js → index-Dfe7qfvf.js} +1 -1
  223. langflow/frontend/assets/{index-C_veJlEb.js → index-DhtZ5hx8.js} +1 -1
  224. langflow/frontend/assets/{index-CQMoqLAu.js → index-DiB3CTo8.js} +1 -1
  225. langflow/frontend/assets/{index-DVlceYFD.js → index-DiGWASY5.js} +1 -1
  226. langflow/frontend/assets/{index-Du_18NCU.js → index-Dl5amdBz.js} +1 -1
  227. langflow/frontend/assets/{index-CYDAYm-i.js → index-DlD4dXlZ.js} +1 -1
  228. langflow/frontend/assets/{index-CLPdN-q6.js → index-DmeiHnfl.js} +1 -1
  229. langflow/frontend/assets/index-Dmu-X5-4.js +1 -0
  230. langflow/frontend/assets/{index-BzEUlaw_.js → index-DpVWih90.js} +1 -1
  231. langflow/frontend/assets/{index-D6PSjHxP.js → index-DrDrcajG.js} +1 -1
  232. langflow/frontend/assets/{index-Dq5ilsem.js → index-Du-pc0KE.js} +1 -1
  233. langflow/frontend/assets/{index-CYe8Ipef.js → index-DwPkMTaY.js} +1 -1
  234. langflow/frontend/assets/{index-BVEZDXxS.js → index-DwQEZe3C.js} +1 -1
  235. langflow/frontend/assets/{index-BvT7L317.js → index-DyJFTK24.js} +1 -1
  236. langflow/frontend/assets/{index-HK3bVMYA.js → index-J38wh62w.js} +1 -1
  237. langflow/frontend/assets/{index-CCxGSSTT.js → index-Kwdl-e29.js} +1 -1
  238. langflow/frontend/assets/{index-BOB_zsjl.js → index-OwPvCmpW.js} +1 -1
  239. langflow/frontend/assets/{index-Dsps-jKu.js → index-Tw3Os-DN.js} +1 -1
  240. langflow/frontend/assets/{index-CFDvOtKC.js → index-X0guhYF8.js} +1 -1
  241. langflow/frontend/assets/{index-BX5D-USa.js → index-dJWNxIRH.js} +1 -1
  242. langflow/frontend/assets/{index-BRYjyhAd.js → index-dcJ8-agu.js} +1 -1
  243. langflow/frontend/assets/{index-Ui4xUImO.js → index-eo2mAtL-.js} +1 -1
  244. langflow/frontend/assets/{index-CxvP91st.js → index-hG24k5xJ.js} +1 -1
  245. langflow/frontend/assets/{index-CVQmT7ZL.js → index-h_aSZHf3.js} +1 -1
  246. langflow/frontend/assets/{index-BIXaW2aY.js → index-hbndqB9B.js} +1 -1
  247. langflow/frontend/assets/{index-DIkNW9Cd.js → index-iJngutFo.js} +1 -1
  248. langflow/frontend/assets/{index-BWmPX4iQ.js → index-lTpteg8t.js} +1 -1
  249. langflow/frontend/assets/{index-xuIrH2Dq.js → index-lZX9AvZW.js} +1 -1
  250. langflow/frontend/assets/{index-yCHsaqs8.js → index-m8QA6VNM.js} +1 -1
  251. langflow/frontend/assets/{index-BkPYpfgw.js → index-o0D2S7xW.js} +1 -1
  252. langflow/frontend/assets/{index-DpClkXIV.js → index-ovFJ_0J6.js} +1 -1
  253. langflow/frontend/assets/{index-CmplyEaa.js → index-pYJJOcma.js} +1 -1
  254. langflow/frontend/assets/{index-CJo_cyWW.js → index-sI75DsdM.js} +1 -1
  255. langflow/frontend/assets/{index-nVwHLjuV.js → index-xvFOmxx4.js} +1 -1
  256. langflow/frontend/assets/{index-LbYjHKkn.js → index-z3SRY-mX.js} +1 -1
  257. langflow/frontend/assets/lazyIconImports-D97HEZkE.js +2 -0
  258. langflow/frontend/assets/{use-post-add-user-BrBYH9eR.js → use-post-add-user-C0MdTpQ5.js} +1 -1
  259. langflow/frontend/index.html +2 -2
  260. langflow/graph/edge/base.py +2 -3
  261. langflow/graph/graph/base.py +15 -13
  262. langflow/graph/graph/constants.py +3 -0
  263. langflow/graph/utils.py +6 -6
  264. langflow/graph/vertex/base.py +4 -5
  265. langflow/graph/vertex/param_handler.py +1 -1
  266. langflow/graph/vertex/vertex_types.py +2 -2
  267. langflow/helpers/flow.py +1 -1
  268. langflow/initial_setup/setup.py +32 -30
  269. langflow/initial_setup/starter_projects/Basic Prompt Chaining.json +26 -0
  270. langflow/initial_setup/starter_projects/Basic Prompting.json +26 -0
  271. langflow/initial_setup/starter_projects/Blog Writer.json +58 -2
  272. langflow/initial_setup/starter_projects/Custom Component Generator.json +37 -2
  273. langflow/initial_setup/starter_projects/Document Q&A.json +27 -1
  274. langflow/initial_setup/starter_projects/Financial Report Parser.json +43 -0
  275. langflow/initial_setup/starter_projects/Hybrid Search RAG.json +83 -1
  276. langflow/initial_setup/starter_projects/Image Sentiment Analysis.json +43 -0
  277. langflow/initial_setup/starter_projects/Instagram Copywriter.json +51 -3
  278. langflow/initial_setup/starter_projects/Invoice Summarizer.json +40 -1
  279. langflow/initial_setup/starter_projects/Knowledge Ingestion.json +73 -2
  280. langflow/initial_setup/starter_projects/Knowledge Retrieval.json +63 -0
  281. langflow/initial_setup/starter_projects/Market Research.json +59 -3
  282. langflow/initial_setup/starter_projects/Meeting Summary.json +101 -6
  283. langflow/initial_setup/starter_projects/Memory Chatbot.json +37 -2
  284. langflow/initial_setup/starter_projects/News Aggregator.json +63 -3
  285. langflow/initial_setup/starter_projects/Nvidia Remix.json +69 -4
  286. langflow/initial_setup/starter_projects/Pok/303/251dex Agent.json" +48 -1
  287. langflow/initial_setup/starter_projects/Portfolio Website Code Generator.json +44 -1
  288. langflow/initial_setup/starter_projects/Price Deal Finder.json +57 -5
  289. langflow/initial_setup/starter_projects/Research Agent.json +42 -3
  290. langflow/initial_setup/starter_projects/Research Translation Loop.json +66 -0
  291. langflow/initial_setup/starter_projects/SEO Keyword Generator.json +17 -0
  292. langflow/initial_setup/starter_projects/SaaS Pricing.json +27 -1
  293. langflow/initial_setup/starter_projects/Search agent.json +40 -1
  294. langflow/initial_setup/starter_projects/Sequential Tasks Agents.json +76 -7
  295. langflow/initial_setup/starter_projects/Simple Agent.json +59 -3
  296. langflow/initial_setup/starter_projects/Social Media Agent.json +77 -1
  297. langflow/initial_setup/starter_projects/Text Sentiment Analysis.json +35 -1
  298. langflow/initial_setup/starter_projects/Travel Planning Agents.json +51 -3
  299. langflow/initial_setup/starter_projects/Twitter Thread Generator.json +80 -0
  300. langflow/initial_setup/starter_projects/Vector Store RAG.json +110 -3
  301. langflow/initial_setup/starter_projects/Youtube Analysis.json +84 -3
  302. langflow/initial_setup/starter_projects/vector_store_rag.py +1 -1
  303. langflow/interface/components.py +23 -22
  304. langflow/interface/initialize/loading.py +5 -5
  305. langflow/interface/run.py +1 -1
  306. langflow/interface/utils.py +1 -1
  307. langflow/io/__init__.py +0 -1
  308. langflow/langflow_launcher.py +1 -1
  309. langflow/load/load.py +2 -7
  310. langflow/logging/__init__.py +0 -1
  311. langflow/logging/logger.py +191 -115
  312. langflow/logging/setup.py +1 -1
  313. langflow/main.py +37 -52
  314. langflow/memory.py +7 -7
  315. langflow/middleware.py +1 -1
  316. langflow/processing/process.py +6 -3
  317. langflow/schema/artifact.py +2 -2
  318. langflow/schema/data.py +10 -2
  319. langflow/schema/dataframe.py +1 -1
  320. langflow/schema/message.py +1 -1
  321. langflow/serialization/serialization.py +1 -1
  322. langflow/services/auth/mcp_encryption.py +104 -0
  323. langflow/services/auth/utils.py +2 -2
  324. langflow/services/cache/disk.py +1 -1
  325. langflow/services/cache/service.py +3 -3
  326. langflow/services/database/models/flow/model.py +2 -7
  327. langflow/services/database/models/transactions/crud.py +2 -2
  328. langflow/services/database/models/user/crud.py +2 -2
  329. langflow/services/database/service.py +8 -8
  330. langflow/services/database/utils.py +6 -5
  331. langflow/services/deps.py +2 -3
  332. langflow/services/factory.py +1 -1
  333. langflow/services/flow/flow_runner.py +7 -12
  334. langflow/services/job_queue/service.py +16 -15
  335. langflow/services/manager.py +3 -4
  336. langflow/services/settings/auth.py +1 -1
  337. langflow/services/settings/base.py +3 -8
  338. langflow/services/settings/feature_flags.py +1 -1
  339. langflow/services/settings/manager.py +1 -1
  340. langflow/services/settings/utils.py +1 -1
  341. langflow/services/socket/__init__.py +0 -1
  342. langflow/services/socket/service.py +3 -3
  343. langflow/services/socket/utils.py +4 -4
  344. langflow/services/state/service.py +1 -2
  345. langflow/services/storage/factory.py +1 -1
  346. langflow/services/storage/local.py +9 -8
  347. langflow/services/storage/s3.py +11 -10
  348. langflow/services/store/service.py +3 -3
  349. langflow/services/store/utils.py +3 -2
  350. langflow/services/task/temp_flow_cleanup.py +7 -7
  351. langflow/services/telemetry/service.py +10 -10
  352. langflow/services/tracing/arize_phoenix.py +2 -2
  353. langflow/services/tracing/langfuse.py +1 -1
  354. langflow/services/tracing/langsmith.py +1 -1
  355. langflow/services/tracing/langwatch.py +1 -1
  356. langflow/services/tracing/opik.py +1 -1
  357. langflow/services/tracing/service.py +25 -6
  358. langflow/services/tracing/traceloop.py +245 -0
  359. langflow/services/utils.py +7 -7
  360. langflow/services/variable/kubernetes.py +3 -3
  361. langflow/services/variable/kubernetes_secrets.py +2 -1
  362. langflow/services/variable/service.py +5 -5
  363. langflow/utils/component_utils.py +9 -6
  364. langflow/utils/util.py +5 -5
  365. langflow/utils/validate.py +3 -3
  366. langflow/utils/voice_utils.py +2 -2
  367. {langflow_base_nightly-0.5.0.dev37.dist-info → langflow_base_nightly-0.5.0.dev39.dist-info}/METADATA +2 -1
  368. {langflow_base_nightly-0.5.0.dev37.dist-info → langflow_base_nightly-0.5.0.dev39.dist-info}/RECORD +393 -374
  369. langflow/components/vectorstores/redis.py +0 -89
  370. langflow/frontend/assets/index-C26RqKWL.js +0 -1
  371. langflow/frontend/assets/index-CqS7zir1.css +0 -1
  372. langflow/frontend/assets/lazyIconImports-t6wEndt1.js +0 -2
  373. /langflow/components/{vectorstores → FAISS}/faiss.py +0 -0
  374. /langflow/components/{vectorstores → cassandra}/cassandra.py +0 -0
  375. /langflow/components/{datastax/cassandra.py → cassandra/cassandra_chat.py} +0 -0
  376. /langflow/components/{vectorstores → cassandra}/cassandra_graph.py +0 -0
  377. /langflow/components/{vectorstores → chroma}/chroma.py +0 -0
  378. /langflow/components/{vectorstores → clickhouse}/clickhouse.py +0 -0
  379. /langflow/components/{vectorstores → couchbase}/couchbase.py +0 -0
  380. /langflow/components/{vectorstores → datastax}/astradb.py +0 -0
  381. /langflow/components/{vectorstores → datastax}/astradb_graph.py +0 -0
  382. /langflow/components/{vectorstores → datastax}/graph_rag.py +0 -0
  383. /langflow/components/{vectorstores → datastax}/hcd.py +0 -0
  384. /langflow/components/{vectorstores → elastic}/elasticsearch.py +0 -0
  385. /langflow/components/{vectorstores → elastic}/opensearch.py +0 -0
  386. /langflow/components/{vectorstores → milvus}/milvus.py +0 -0
  387. /langflow/components/{vectorstores → mongodb}/mongodb_atlas.py +0 -0
  388. /langflow/components/{vectorstores → pgvector}/pgvector.py +0 -0
  389. /langflow/components/{vectorstores → pinecone}/pinecone.py +0 -0
  390. /langflow/components/{vectorstores → qdrant}/qdrant.py +0 -0
  391. /langflow/components/{vectorstores → supabase}/supabase.py +0 -0
  392. /langflow/components/{vectorstores → upstash}/upstash.py +0 -0
  393. /langflow/components/{vectorstores → vectara}/vectara.py +0 -0
  394. /langflow/components/{vectorstores → vectara}/vectara_rag.py +0 -0
  395. /langflow/components/{vectorstores → weaviate}/weaviate.py +0 -0
  396. {langflow_base_nightly-0.5.0.dev37.dist-info → langflow_base_nightly-0.5.0.dev39.dist-info}/WHEEL +0 -0
  397. {langflow_base_nightly-0.5.0.dev37.dist-info → langflow_base_nightly-0.5.0.dev39.dist-info}/entry_points.txt +0 -0
@@ -4,12 +4,12 @@ from enum import Enum
4
4
 
5
5
  import yfinance as yf
6
6
  from langchain_core.tools import ToolException
7
- from loguru import logger
8
7
  from pydantic import BaseModel, Field
9
8
 
10
9
  from langflow.custom.custom_component.component import Component
11
10
  from langflow.inputs.inputs import DropdownInput, IntInput, MessageTextInput
12
11
  from langflow.io import Output
12
+ from langflow.logging.logger import logger
13
13
  from langflow.schema.data import Data
14
14
  from langflow.schema.dataframe import DataFrame
15
15
 
@@ -6,6 +6,7 @@ from googleapiclient.errors import HttpError
6
6
 
7
7
  from langflow.custom.custom_component.component import Component
8
8
  from langflow.inputs.inputs import BoolInput, DropdownInput, IntInput, SecretStrInput
9
+ from langflow.logging.logger import logger
9
10
  from langflow.schema.dataframe import DataFrame
10
11
  from langflow.template.field.base import Output
11
12
 
@@ -279,8 +280,6 @@ class YouTubeTrendingComponent(Component):
279
280
 
280
281
  return DataFrame(pd.DataFrame({"error": [error_message]}))
281
282
 
282
- except Exception as e:
283
- import logging
284
-
285
- logging.exception("An unexpected error occurred:")
283
+ except Exception as e: # noqa: BLE001
284
+ logger.exception("An unexpected error occurred:")
286
285
  return DataFrame(pd.DataFrame({"error": [str(e)]}))
@@ -1,7 +1,8 @@
1
1
  from collections.abc import Callable
2
2
 
3
3
  import emoji
4
- from loguru import logger
4
+
5
+ from langflow.logging.logger import logger
5
6
 
6
7
 
7
8
  def validate_icon(value: str):
@@ -8,10 +8,10 @@ from typing import Any
8
8
 
9
9
  from cachetools import TTLCache, keys
10
10
  from fastapi import HTTPException
11
- from loguru import logger
12
11
 
13
12
  from langflow.custom.eval import eval_custom_component_code
14
13
  from langflow.custom.schema import CallableCodeDetails, ClassCodeDetails, MissingDefault
14
+ from langflow.logging.logger import logger
15
15
 
16
16
 
17
17
  class CodeSyntaxError(HTTPException):
@@ -5,11 +5,11 @@ from typing import TYPE_CHECKING, Any, ClassVar
5
5
 
6
6
  from cachetools import TTLCache, cachedmethod
7
7
  from fastapi import HTTPException
8
- from loguru import logger
9
8
 
10
9
  from langflow.custom.attributes import ATTR_FUNC_MAPPING
11
10
  from langflow.custom.code_parser.code_parser import CodeParser
12
11
  from langflow.custom.eval import eval_custom_component_code
12
+ from langflow.logging.logger import logger
13
13
  from langflow.utils import validate
14
14
 
15
15
  if TYPE_CHECKING:
@@ -3,6 +3,7 @@ from __future__ import annotations
3
3
  import ast
4
4
  import asyncio
5
5
  import inspect
6
+ import json
6
7
  from collections.abc import AsyncIterator, Iterator
7
8
  from copy import deepcopy
8
9
  from textwrap import dedent
@@ -1019,10 +1020,23 @@ class Component(CustomComponent):
1019
1020
  return {**predefined_inputs, **runtime_inputs}
1020
1021
 
1021
1022
  def get_trace_as_metadata(self):
1023
+ def safe_list_values(items):
1024
+ return [v if isinstance(v, str | int | float | bool) or v is None else str(v) for v in items]
1025
+
1026
+ def safe_value(val):
1027
+ if isinstance(val, str | int | float | bool) or val is None:
1028
+ return val
1029
+ if isinstance(val, list | tuple):
1030
+ return safe_list_values(val)
1031
+ try:
1032
+ return json.dumps(val)
1033
+ except (TypeError, ValueError):
1034
+ return str(val)
1035
+
1022
1036
  return {
1023
- input_.name: input_.value
1037
+ input_.name: safe_value(getattr(self, input_.name, input_.value))
1024
1038
  for input_ in self.inputs
1025
- if hasattr(input_, "trace_as_metadata") and input_.trace_as_metadata
1039
+ if getattr(input_, "trace_as_metadata", False)
1026
1040
  }
1027
1041
 
1028
1042
  async def _build_with_tracing(self):
@@ -0,0 +1,165 @@
1
+ """Dependency analysis utilities for custom components."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import ast
6
+ import importlib.metadata as md
7
+ import sys
8
+ from dataclasses import asdict, dataclass
9
+ from functools import lru_cache
10
+
11
+ try:
12
+ STDLIB_MODULES: set[str] = set(sys.stdlib_module_names) # 3.10+
13
+ except AttributeError:
14
+ # Fallback heuristic if running on <3.10
15
+ STDLIB_MODULES = set(sys.builtin_module_names)
16
+
17
+
18
+ @dataclass(frozen=True)
19
+ class DependencyInfo:
20
+ """Information about a dependency imported in Python code."""
21
+
22
+ name: str # package name (e.g. "numpy", "requests")
23
+ version: str | None # package version if available
24
+ is_local: bool # True for relative imports (from .module import ...)
25
+
26
+
27
+ def _top_level(pkg: str) -> str:
28
+ """Extract top-level package name."""
29
+ return pkg.split(".", 1)[0]
30
+
31
+
32
+ def _is_relative(module: str | None) -> bool:
33
+ """Check if module is a relative import."""
34
+ return module is not None and module.startswith(".")
35
+
36
+
37
+ class _ImportVisitor(ast.NodeVisitor):
38
+ """AST visitor to extract import information."""
39
+
40
+ def __init__(self):
41
+ self.results: list[DependencyInfo] = []
42
+
43
+ def visit_Import(self, node: ast.Import):
44
+ for alias in node.names:
45
+ full = alias.name
46
+ dep = DependencyInfo(
47
+ name=_top_level(full),
48
+ version=None,
49
+ is_local=False, # Regular imports are not local
50
+ )
51
+ self.results.append(dep)
52
+
53
+ def visit_ImportFrom(self, node: ast.ImportFrom):
54
+ # Reconstruct full module name with proper relative import handling
55
+ if node.level > 0:
56
+ # Relative import: from .module import x or from ..parent import x
57
+ dots = "." * node.level
58
+ full_module = dots + (node.module or "")
59
+ else:
60
+ # Absolute import: from module import x
61
+ full_module = node.module or ""
62
+ for _alias in node.names:
63
+ dep = DependencyInfo(
64
+ name=_top_level(full_module.lstrip(".")) if full_module else "",
65
+ version=None,
66
+ is_local=_is_relative(full_module), # Check if it's a relative import
67
+ )
68
+ self.results.append(dep)
69
+
70
+
71
+ def _classify_dependency(dep: DependencyInfo) -> DependencyInfo:
72
+ """Resolve version information for external dependencies."""
73
+ version = None
74
+ if not dep.is_local and dep.name:
75
+ version = _get_distribution_version(dep.name)
76
+
77
+ return DependencyInfo(
78
+ name=dep.name,
79
+ version=version,
80
+ is_local=dep.is_local,
81
+ )
82
+
83
+
84
+ def analyze_dependencies(source: str, *, resolve_versions: bool = True) -> list[dict]:
85
+ """Return a list[dict] of dependencies imported by the given Python source code.
86
+
87
+ Args:
88
+ source: Python source code string
89
+ resolve_versions: Whether to resolve version information
90
+
91
+ Returns:
92
+ List of dependency dictionaries
93
+ """
94
+ code = source
95
+
96
+ # Parse the code and extract imports
97
+ tree = ast.parse(code)
98
+ visitor = _ImportVisitor()
99
+ visitor.visit(tree)
100
+
101
+ # Process and deduplicate dependencies by package name only
102
+ unique_packages: dict[str, DependencyInfo] = {}
103
+ for raw_dep in visitor.results:
104
+ processed_dep = _classify_dependency(raw_dep) if resolve_versions else raw_dep
105
+
106
+ # Skip stdlib imports and local imports - we only care about external dependencies
107
+ if processed_dep.name in STDLIB_MODULES or processed_dep.is_local:
108
+ continue
109
+
110
+ # Deduplicate by package name only (not full_module)
111
+ if processed_dep.name not in unique_packages:
112
+ unique_packages[processed_dep.name] = processed_dep
113
+
114
+ return [asdict(d) for d in unique_packages.values()]
115
+
116
+
117
+ def analyze_component_dependencies(component_code: str) -> dict:
118
+ """Analyze dependencies for a custom component.
119
+
120
+ Args:
121
+ component_code: The component's source code
122
+
123
+ Returns:
124
+ Dictionary with dependency analysis results
125
+ """
126
+ try:
127
+ deps = analyze_dependencies(component_code, resolve_versions=True)
128
+
129
+ return {
130
+ "total_dependencies": len(deps),
131
+ "dependencies": [{"name": d["name"], "version": d["version"]} for d in deps if d["name"]],
132
+ }
133
+ except (SyntaxError, TypeError, ValueError, ImportError):
134
+ # If analysis fails, return minimal info
135
+ return {
136
+ "total_dependencies": 0,
137
+ "dependencies": [],
138
+ }
139
+
140
+
141
+ # Cache the expensive packages_distributions() call globally
142
+ @lru_cache(maxsize=1)
143
+ def _get_packages_distributions():
144
+ """Cache the expensive packages_distributions() call."""
145
+ try:
146
+ return md.packages_distributions()
147
+ except (OSError, AttributeError, ValueError):
148
+ return {}
149
+
150
+
151
+ # Helper function to cache version lookups for installed distributions
152
+ @lru_cache(maxsize=128)
153
+ def _get_distribution_version(import_name: str):
154
+ try:
155
+ # Reverse-lookup: which distribution(s) provide this importable name?
156
+ reverse_map = _get_packages_distributions()
157
+ dist_names = reverse_map.get(import_name)
158
+ if not dist_names:
159
+ return None
160
+
161
+ # Take the first matching distribution
162
+ dist_name = dist_names[0]
163
+ return md.distribution(dist_name).version
164
+ except (ImportError, AttributeError, OSError, ValueError):
165
+ return None
@@ -5,9 +5,9 @@ from pathlib import Path
5
5
 
6
6
  import anyio
7
7
  from aiofile import async_open
8
- from loguru import logger
9
8
 
10
9
  from langflow.custom.custom_component.component import Component
10
+ from langflow.logging.logger import logger
11
11
 
12
12
  MAX_DEPTH = 2
13
13
 
@@ -255,7 +255,7 @@ class DirectoryReader:
255
255
  try:
256
256
  output_types = self.get_output_types_from_code(result_content)
257
257
  except Exception: # noqa: BLE001
258
- logger.opt(exception=True).debug("Error while getting output types from code")
258
+ logger.debug("Error while getting output types from code", exc_info=True)
259
259
  output_types = [component_name_camelcase]
260
260
  else:
261
261
  output_types = [component_name_camelcase]
@@ -278,7 +278,7 @@ class DirectoryReader:
278
278
  try:
279
279
  file_content = await self.aread_file_content(file_path)
280
280
  except Exception: # noqa: BLE001
281
- logger.exception(f"Error while reading file {file_path}")
281
+ await logger.aexception(f"Error while reading file {file_path}")
282
282
  return False, f"Could not read {file_path}"
283
283
 
284
284
  if file_content is None:
@@ -300,7 +300,7 @@ class DirectoryReader:
300
300
 
301
301
  async def abuild_component_menu_list(self, file_paths):
302
302
  response = {"menu": []}
303
- logger.debug("-------------------- Async Building component menu list --------------------")
303
+ await logger.adebug("-------------------- Async Building component menu list --------------------")
304
304
 
305
305
  tasks = [self.process_file_async(file_path) for file_path in file_paths]
306
306
  results = await asyncio.gather(*tasks)
@@ -311,7 +311,7 @@ class DirectoryReader:
311
311
  filename = file_path_.name
312
312
 
313
313
  if not validation_result:
314
- logger.error(f"Error while processing file {file_path}")
314
+ await logger.aerror(f"Error while processing file {file_path}")
315
315
 
316
316
  menu_result = self.find_menu(response, menu_name) or {
317
317
  "name": menu_name,
@@ -329,7 +329,7 @@ class DirectoryReader:
329
329
  try:
330
330
  output_types = await asyncio.to_thread(self.get_output_types_from_code, result_content)
331
331
  except Exception: # noqa: BLE001
332
- logger.exception("Error while getting output types from code")
332
+ await logger.aexception("Error while getting output types from code")
333
333
  output_types = [component_name_camelcase]
334
334
  else:
335
335
  output_types = [component_name_camelcase]
@@ -346,7 +346,7 @@ class DirectoryReader:
346
346
  if menu_result not in response["menu"]:
347
347
  response["menu"].append(menu_result)
348
348
 
349
- logger.debug("-------------------- Component menu list built --------------------")
349
+ await logger.adebug("-------------------- Component menu list built --------------------")
350
350
  return response
351
351
 
352
352
  @staticmethod
@@ -1,8 +1,7 @@
1
1
  import asyncio
2
2
 
3
- from loguru import logger
4
-
5
3
  from langflow.custom.directory_reader.directory_reader import DirectoryReader
4
+ from langflow.logging.logger import logger
6
5
  from langflow.template.frontend_node.custom_components import CustomComponentFrontendNode
7
6
 
8
7
 
langflow/custom/utils.py CHANGED
@@ -1,4 +1,6 @@
1
1
  # mypy: ignore-errors
2
+ from __future__ import annotations
3
+
2
4
  import ast
3
5
  import asyncio
4
6
  import contextlib
@@ -7,15 +9,13 @@ import inspect
7
9
  import re
8
10
  import traceback
9
11
  from pathlib import Path
10
- from typing import Any
11
- from uuid import UUID
12
+ from typing import TYPE_CHECKING, Any
12
13
 
13
14
  from fastapi import HTTPException
14
- from loguru import logger
15
15
  from pydantic import BaseModel
16
16
 
17
17
  from langflow.custom.custom_component.component import Component
18
- from langflow.custom.custom_component.custom_component import CustomComponent
18
+ from langflow.custom.dependency_analyzer import analyze_component_dependencies
19
19
  from langflow.custom.directory_reader.utils import (
20
20
  abuild_custom_component_list_from_path,
21
21
  build_custom_component_list_from_path,
@@ -25,6 +25,7 @@ from langflow.custom.eval import eval_custom_component_code
25
25
  from langflow.custom.schema import MissingDefault
26
26
  from langflow.field_typing.range_spec import RangeSpec
27
27
  from langflow.helpers.custom import format_type
28
+ from langflow.logging.logger import logger
28
29
  from langflow.schema.dotdict import dotdict
29
30
  from langflow.template.field.base import Input
30
31
  from langflow.template.frontend_node.custom_components import ComponentFrontendNode, CustomComponentFrontendNode
@@ -32,6 +33,11 @@ from langflow.type_extraction.type_extraction import extract_inner_type
32
33
  from langflow.utils import validate
33
34
  from langflow.utils.util import get_base_classes
34
35
 
36
+ if TYPE_CHECKING:
37
+ from uuid import UUID
38
+
39
+ from langflow.custom.custom_component.custom_component import CustomComponent
40
+
35
41
 
36
42
  def _generate_code_hash(source_code: str, modname: str) -> str:
37
43
  """Generate a hash of the component source code.
@@ -488,6 +494,15 @@ def build_custom_component_template_from_inputs(
488
494
  # ! This should be removed when we have a better way to handle this
489
495
  frontend_node.set_base_classes_from_outputs()
490
496
  reorder_fields(frontend_node, cc_instance._get_field_order())
497
+ frontend_node = build_component_metadata(frontend_node, cc_instance, module_name, ctype_name)
498
+
499
+ return frontend_node.to_dict(keep_name=False), cc_instance
500
+
501
+
502
+ def build_component_metadata(
503
+ frontend_node: CustomComponentFrontendNode, custom_component: CustomComponent, module_name: str, ctype_name: str
504
+ ):
505
+ """Build the metadata for a custom component."""
491
506
  if module_name:
492
507
  frontend_node.metadata["module"] = module_name
493
508
  else:
@@ -500,9 +515,21 @@ def build_custom_component_template_from_inputs(
500
515
  if code_hash:
501
516
  frontend_node.metadata["code_hash"] = code_hash
502
517
  except Exception as exc: # noqa: BLE001
503
- logger.opt(exception=exc).debug(f"Error generating code hash for {custom_component.__class__.__name__}")
518
+ logger.debug(f"Error generating code hash for {custom_component.__class__.__name__}", exc_info=exc)
504
519
 
505
- return frontend_node.to_dict(keep_name=False), cc_instance
520
+ # Analyze component dependencies
521
+ try:
522
+ dependency_info = analyze_component_dependencies(custom_component._code)
523
+ frontend_node.metadata["dependencies"] = dependency_info
524
+ except (SyntaxError, TypeError, ValueError, ImportError) as exc:
525
+ logger.warning(f"Failed to analyze dependencies for component {ctype_name}: {exc}")
526
+ # Set minimal dependency info on failure
527
+ frontend_node.metadata["dependencies"] = {
528
+ "total_dependencies": 0,
529
+ "dependencies": [],
530
+ }
531
+
532
+ return frontend_node
506
533
 
507
534
 
508
535
  def build_custom_component_template(
@@ -562,18 +589,9 @@ def build_custom_component_template(
562
589
  reorder_fields(frontend_node, custom_instance._get_field_order())
563
590
 
564
591
  if module_name:
565
- frontend_node.metadata["module"] = module_name
566
- else:
567
- module_name = get_module_name_from_display_name(frontend_node.display_name)
568
- frontend_node.metadata["module"] = f"custom_components.{module_name}"
569
-
570
- # Generate code hash for cache invalidation and debugging
571
- try:
572
- code_hash = _generate_code_hash(custom_component._code, module_name)
573
- if code_hash:
574
- frontend_node.metadata["code_hash"] = code_hash
575
- except Exception as exc: # noqa: BLE001
576
- logger.opt(exception=exc).debug(f"Error generating code hash for {custom_component.__class__.__name__}")
592
+ frontend_node = build_component_metadata(
593
+ frontend_node, custom_component, module_name, custom_component.__class__.__name__
594
+ )
577
595
 
578
596
  return frontend_node.to_dict(keep_name=False), custom_instance
579
597
  except Exception as exc:
@@ -646,7 +664,7 @@ async def abuild_custom_components(components_paths: list[str]):
646
664
  if not components_paths:
647
665
  return {}
648
666
 
649
- logger.debug(f"Building custom components from {components_paths}")
667
+ await logger.adebug(f"Building custom components from {components_paths}")
650
668
  custom_components_from_file: dict = {}
651
669
  processed_paths = set()
652
670
  for path in components_paths:
@@ -657,7 +675,7 @@ async def abuild_custom_components(components_paths: list[str]):
657
675
  custom_component_dict = await abuild_custom_component_list_from_path(path_str)
658
676
  if custom_component_dict:
659
677
  category = next(iter(custom_component_dict))
660
- logger.debug(f"Loading {len(custom_component_dict[category])} component(s) from category {category}")
678
+ await logger.adebug(f"Loading {len(custom_component_dict[category])} component(s) from category {category}")
661
679
  custom_components_from_file = merge_nested_dicts_with_renaming(
662
680
  custom_components_from_file, custom_component_dict
663
681
  )
@@ -745,18 +763,18 @@ async def get_single_component_dict(component_type: str, component_name: str, co
745
763
  if hasattr(module, "template"):
746
764
  return module.template
747
765
  except ImportError as e:
748
- logger.error(f"Import error loading component {module_path}: {e!s}")
766
+ await logger.aerror(f"Import error loading component {module_path}: {e!s}")
749
767
  except AttributeError as e:
750
- logger.error(f"Attribute error loading component {module_path}: {e!s}")
768
+ await logger.aerror(f"Attribute error loading component {module_path}: {e!s}")
751
769
  except ValueError as e:
752
- logger.error(f"Value error loading component {module_path}: {e!s}")
770
+ await logger.aerror(f"Value error loading component {module_path}: {e!s}")
753
771
  except (KeyError, IndexError) as e:
754
- logger.error(f"Data structure error loading component {module_path}: {e!s}")
772
+ await logger.aerror(f"Data structure error loading component {module_path}: {e!s}")
755
773
  except RuntimeError as e:
756
- logger.error(f"Runtime error loading component {module_path}: {e!s}")
757
- logger.debug("Full traceback for runtime error", exc_info=True)
774
+ await logger.aerror(f"Runtime error loading component {module_path}: {e!s}")
775
+ await logger.adebug("Full traceback for runtime error", exc_info=True)
758
776
  except OSError as e:
759
- logger.error(f"OS error loading component {module_path}: {e!s}")
777
+ await logger.aerror(f"OS error loading component {module_path}: {e!s}")
760
778
 
761
779
  # If we get here, the component wasn't found or couldn't be loaded
762
780
  return None
@@ -811,43 +829,43 @@ async def load_custom_component(component_name: str, components_paths: list[str]
811
829
  if hasattr(module, "get_template"):
812
830
  return module.get_template()
813
831
  except ImportError as e:
814
- logger.error(f"Import error loading component {component_file}: {e!s}")
815
- logger.debug("Import error traceback", exc_info=True)
832
+ await logger.aerror(f"Import error loading component {component_file}: {e!s}")
833
+ await logger.adebug("Import error traceback", exc_info=True)
816
834
  except AttributeError as e:
817
- logger.error(f"Attribute error loading component {component_file}: {e!s}")
818
- logger.debug("Attribute error traceback", exc_info=True)
835
+ await logger.aerror(f"Attribute error loading component {component_file}: {e!s}")
836
+ await logger.adebug("Attribute error traceback", exc_info=True)
819
837
  except (ValueError, TypeError) as e:
820
- logger.error(f"Value/Type error loading component {component_file}: {e!s}")
821
- logger.debug("Value/Type error traceback", exc_info=True)
838
+ await logger.aerror(f"Value/Type error loading component {component_file}: {e!s}")
839
+ await logger.adebug("Value/Type error traceback", exc_info=True)
822
840
  except (KeyError, IndexError) as e:
823
- logger.error(f"Data structure error loading component {component_file}: {e!s}")
824
- logger.debug("Data structure error traceback", exc_info=True)
841
+ await logger.aerror(f"Data structure error loading component {component_file}: {e!s}")
842
+ await logger.adebug("Data structure error traceback", exc_info=True)
825
843
  except RuntimeError as e:
826
- logger.error(f"Runtime error loading component {component_file}: {e!s}")
827
- logger.debug("Runtime error traceback", exc_info=True)
844
+ await logger.aerror(f"Runtime error loading component {component_file}: {e!s}")
845
+ await logger.adebug("Runtime error traceback", exc_info=True)
828
846
  except OSError as e:
829
- logger.error(f"OS error loading component {component_file}: {e!s}")
830
- logger.debug("OS error traceback", exc_info=True)
847
+ await logger.aerror(f"OS error loading component {component_file}: {e!s}")
848
+ await logger.adebug("OS error traceback", exc_info=True)
831
849
 
832
850
  except ImportError as e:
833
- logger.error(f"Import error loading custom component {component_name}: {e!s}")
851
+ await logger.aerror(f"Import error loading custom component {component_name}: {e!s}")
834
852
  return None
835
853
  except AttributeError as e:
836
- logger.error(f"Attribute error loading custom component {component_name}: {e!s}")
854
+ await logger.aerror(f"Attribute error loading custom component {component_name}: {e!s}")
837
855
  return None
838
856
  except ValueError as e:
839
- logger.error(f"Value error loading custom component {component_name}: {e!s}")
857
+ await logger.aerror(f"Value error loading custom component {component_name}: {e!s}")
840
858
  return None
841
859
  except (KeyError, IndexError) as e:
842
- logger.error(f"Data structure error loading custom component {component_name}: {e!s}")
860
+ await logger.aerror(f"Data structure error loading custom component {component_name}: {e!s}")
843
861
  return None
844
862
  except RuntimeError as e:
845
- logger.error(f"Runtime error loading custom component {component_name}: {e!s}")
863
+ await logger.aerror(f"Runtime error loading custom component {component_name}: {e!s}")
846
864
  logger.debug("Full traceback for runtime error", exc_info=True)
847
865
  return None
848
866
 
849
867
  # If we get here, the component wasn't found in any of the paths
850
- logger.warning(f"Component {component_name} not found in any of the provided paths")
868
+ await logger.awarning(f"Component {component_name} not found in any of the provided paths")
851
869
  return None
852
870
 
853
871
 
@@ -8,9 +8,9 @@ from functools import partial
8
8
  from typing import TYPE_CHECKING
9
9
 
10
10
  from fastapi.encoders import jsonable_encoder
11
- from loguru import logger
12
11
  from typing_extensions import Protocol
13
12
 
13
+ from langflow.logging.logger import logger
14
14
  from langflow.schema.playground_events import create_event_by_type
15
15
 
16
16
  if TYPE_CHECKING:
@@ -1 +1 @@
1
- import{j as a}from"./index-BChjg6Az.js";const s=l=>a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 54 54",width:"1em",height:"1em",...l,children:a.jsxs("g",{fill:"none",fillRule:"evenodd",children:[a.jsx("path",{fill:"#36C5F0",d:"M19.712.133a5.381 5.381 0 0 0-5.376 5.387 5.381 5.381 0 0 0 5.376 5.386h5.376V5.52A5.381 5.381 0 0 0 19.712.133m0 14.365H5.376A5.381 5.381 0 0 0 0 19.884a5.381 5.381 0 0 0 5.376 5.387h14.336a5.381 5.381 0 0 0 5.376-5.387 5.381 5.381 0 0 0-5.376-5.386"}),a.jsx("path",{fill:"#2EB67D",d:"M53.76 19.884a5.381 5.381 0 0 0-5.376-5.386 5.381 5.381 0 0 0-5.376 5.386v5.387h5.376a5.381 5.381 0 0 0 5.376-5.387m-14.336 0V5.52A5.381 5.381 0 0 0 34.048.133a5.381 5.381 0 0 0-5.376 5.387v14.364a5.381 5.381 0 0 0 5.376 5.387 5.381 5.381 0 0 0 5.376-5.387"}),a.jsx("path",{fill:"#ECB22E",d:"M34.048 54a5.381 5.381 0 0 0 5.376-5.387 5.381 5.381 0 0 0-5.376-5.386h-5.376v5.386A5.381 5.381 0 0 0 34.048 54m0-14.365h14.336a5.381 5.381 0 0 0 5.376-5.386 5.381 5.381 0 0 0-5.376-5.387H34.048a5.381 5.381 0 0 0-5.376 5.387 5.381 5.381 0 0 0 5.376 5.386"}),a.jsx("path",{fill:"#E01E5A",d:"M0 34.249a5.381 5.381 0 0 0 5.376 5.386 5.381 5.381 0 0 0 5.376-5.386v-5.387H5.376A5.381 5.381 0 0 0 0 34.25m14.336-.001v14.364A5.381 5.381 0 0 0 19.712 54a5.381 5.381 0 0 0 5.376-5.387V34.25a5.381 5.381 0 0 0-5.376-5.387 5.381 5.381 0 0 0-5.376 5.387"})]})});export{s as default};
1
+ import{j as a}from"./index-BpxbUiZD.js";const s=l=>a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 54 54",width:"1em",height:"1em",...l,children:a.jsxs("g",{fill:"none",fillRule:"evenodd",children:[a.jsx("path",{fill:"#36C5F0",d:"M19.712.133a5.381 5.381 0 0 0-5.376 5.387 5.381 5.381 0 0 0 5.376 5.386h5.376V5.52A5.381 5.381 0 0 0 19.712.133m0 14.365H5.376A5.381 5.381 0 0 0 0 19.884a5.381 5.381 0 0 0 5.376 5.387h14.336a5.381 5.381 0 0 0 5.376-5.387 5.381 5.381 0 0 0-5.376-5.386"}),a.jsx("path",{fill:"#2EB67D",d:"M53.76 19.884a5.381 5.381 0 0 0-5.376-5.386 5.381 5.381 0 0 0-5.376 5.386v5.387h5.376a5.381 5.381 0 0 0 5.376-5.387m-14.336 0V5.52A5.381 5.381 0 0 0 34.048.133a5.381 5.381 0 0 0-5.376 5.387v14.364a5.381 5.381 0 0 0 5.376 5.387 5.381 5.381 0 0 0 5.376-5.387"}),a.jsx("path",{fill:"#ECB22E",d:"M34.048 54a5.381 5.381 0 0 0 5.376-5.387 5.381 5.381 0 0 0-5.376-5.386h-5.376v5.386A5.381 5.381 0 0 0 34.048 54m0-14.365h14.336a5.381 5.381 0 0 0 5.376-5.386 5.381 5.381 0 0 0-5.376-5.387H34.048a5.381 5.381 0 0 0-5.376 5.387 5.381 5.381 0 0 0 5.376 5.386"}),a.jsx("path",{fill:"#E01E5A",d:"M0 34.249a5.381 5.381 0 0 0 5.376 5.386 5.381 5.381 0 0 0 5.376-5.386v-5.387H5.376A5.381 5.381 0 0 0 0 34.25m14.336-.001v14.364A5.381 5.381 0 0 0 19.712 54a5.381 5.381 0 0 0 5.376-5.387V34.25a5.381 5.381 0 0 0-5.376-5.387 5.381 5.381 0 0 0-5.376 5.387"})]})});export{s as default};