langflow-base-nightly 0.5.0.dev37__py3-none-any.whl → 0.5.0.dev38__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.
- langflow/__main__.py +1 -1
- langflow/alembic/versions/4e5980a44eaa_fix_date_times_again.py +24 -30
- langflow/alembic/versions/58b28437a398_modify_nullable.py +6 -6
- langflow/alembic/versions/79e675cb6752_change_datetime_type.py +24 -30
- langflow/alembic/versions/b2fa308044b5_add_unique_constraints.py +12 -13
- langflow/api/build.py +21 -26
- langflow/api/health_check_router.py +3 -3
- langflow/api/utils.py +3 -3
- langflow/api/v1/callback.py +2 -2
- langflow/api/v1/chat.py +19 -31
- langflow/api/v1/endpoints.py +10 -10
- langflow/api/v1/flows.py +1 -1
- langflow/api/v1/knowledge_bases.py +3 -3
- langflow/api/v1/mcp.py +12 -12
- langflow/api/v1/mcp_projects.py +45 -81
- langflow/api/v1/mcp_utils.py +8 -8
- langflow/api/v1/schemas.py +1 -5
- langflow/api/v1/store.py +1 -1
- langflow/api/v1/validate.py +2 -2
- langflow/api/v1/voice_mode.py +58 -62
- langflow/api/v2/files.py +2 -2
- langflow/api/v2/mcp.py +10 -9
- langflow/base/composio/composio_base.py +21 -2
- langflow/base/data/docling_utils.py +194 -0
- langflow/base/embeddings/aiml_embeddings.py +1 -1
- langflow/base/flow_processing/utils.py +1 -2
- langflow/base/io/__init__.py +0 -1
- langflow/base/langwatch/utils.py +2 -1
- langflow/base/mcp/util.py +49 -47
- langflow/base/prompts/api_utils.py +1 -1
- langflow/base/tools/flow_tool.py +2 -2
- langflow/base/tools/run_flow.py +2 -6
- langflow/components/Notion/add_content_to_page.py +2 -2
- langflow/components/Notion/list_database_properties.py +2 -2
- langflow/components/Notion/list_pages.py +2 -2
- langflow/components/Notion/page_content_viewer.py +2 -2
- langflow/components/Notion/update_page_property.py +1 -1
- langflow/components/agentql/agentql_api.py +2 -10
- langflow/components/agents/agent.py +3 -3
- langflow/components/agents/mcp_component.py +14 -14
- langflow/components/anthropic/anthropic.py +5 -4
- langflow/components/assemblyai/assemblyai_get_subtitles.py +2 -2
- langflow/components/assemblyai/assemblyai_lemur.py +2 -2
- langflow/components/assemblyai/assemblyai_list_transcripts.py +2 -2
- langflow/components/assemblyai/assemblyai_poll_transcript.py +2 -2
- langflow/components/assemblyai/assemblyai_start_transcript.py +2 -2
- langflow/components/data/file.py +575 -55
- langflow/components/data/url.py +1 -1
- langflow/components/datastax/astra_assistant_manager.py +3 -3
- langflow/components/datastax/create_assistant.py +1 -2
- langflow/components/deactivated/merge_data.py +1 -2
- langflow/components/deactivated/sub_flow.py +6 -7
- langflow/components/deactivated/vectara_self_query.py +3 -3
- langflow/components/docling/__init__.py +0 -198
- langflow/components/docling/docling_inline.py +1 -1
- langflow/components/embeddings/text_embedder.py +3 -3
- langflow/components/firecrawl/firecrawl_extract_api.py +2 -9
- langflow/components/google/gmail.py +1 -1
- langflow/components/google/google_generative_ai.py +5 -11
- langflow/components/groq/groq.py +4 -3
- langflow/components/helpers/current_date.py +2 -3
- langflow/components/helpers/memory.py +1 -1
- langflow/components/ibm/watsonx.py +1 -1
- langflow/components/ibm/watsonx_embeddings.py +1 -1
- langflow/components/langwatch/langwatch.py +3 -3
- langflow/components/logic/flow_tool.py +2 -2
- langflow/components/logic/notify.py +1 -1
- langflow/components/logic/run_flow.py +2 -3
- langflow/components/logic/sub_flow.py +4 -5
- langflow/components/mem0/mem0_chat_memory.py +2 -8
- langflow/components/nvidia/nvidia.py +3 -3
- langflow/components/olivya/olivya.py +7 -7
- langflow/components/ollama/ollama.py +8 -6
- langflow/components/processing/batch_run.py +8 -8
- langflow/components/processing/data_operations.py +2 -2
- langflow/components/processing/merge_data.py +1 -2
- langflow/components/processing/message_to_data.py +2 -3
- langflow/components/processing/parse_json_data.py +1 -1
- langflow/components/prototypes/python_function.py +2 -3
- langflow/components/serpapi/serp.py +1 -1
- langflow/components/tavily/tavily_extract.py +1 -1
- langflow/components/tavily/tavily_search.py +1 -1
- langflow/components/tools/calculator.py +2 -2
- langflow/components/tools/python_code_structured_tool.py +3 -10
- langflow/components/tools/python_repl.py +2 -2
- langflow/components/tools/searxng.py +3 -3
- langflow/components/tools/serp_api.py +2 -2
- langflow/components/tools/tavily_search_tool.py +2 -2
- langflow/components/tools/yahoo_finance.py +1 -1
- langflow/components/twelvelabs/video_embeddings.py +4 -4
- langflow/components/vectorstores/local_db.py +1 -1
- langflow/components/yahoosearch/yahoo.py +1 -1
- langflow/components/youtube/trending.py +3 -4
- langflow/custom/attributes.py +2 -1
- langflow/custom/code_parser/code_parser.py +1 -1
- langflow/custom/custom_component/base_component.py +1 -1
- langflow/custom/custom_component/component.py +16 -2
- langflow/custom/directory_reader/directory_reader.py +7 -7
- langflow/custom/directory_reader/utils.py +1 -2
- langflow/custom/utils.py +30 -30
- langflow/events/event_manager.py +1 -1
- langflow/frontend/assets/{SlackIcon-CnvyOamQ.js → SlackIcon-BhW6H3JR.js} +1 -1
- langflow/frontend/assets/{Wikipedia-nyTEXdr2.js → Wikipedia-Dx5jbiy3.js} +1 -1
- langflow/frontend/assets/{Wolfram-BYMQkNSq.js → Wolfram-CIyonzwo.js} +1 -1
- langflow/frontend/assets/{index-HK3bVMYA.js → index-0XQqYgdG.js} +1 -1
- langflow/frontend/assets/{index-BZgXW854.js → index-1Q3VBqKn.js} +1 -1
- langflow/frontend/assets/{index-BQ6NUdMY.js → index-35sspuLu.js} +1 -1
- langflow/frontend/assets/{index-DPCzHdsC.js → index-7hzXChQz.js} +1 -1
- langflow/frontend/assets/{index-CFDvOtKC.js → index-8cuhogZP.js} +1 -1
- langflow/frontend/assets/{index-CYDAYm-i.js → index-B0m53xKd.js} +1 -1
- langflow/frontend/assets/{index-Q9vDw0Xl.js → index-B1XqWJhG.js} +1 -1
- langflow/frontend/assets/{index-Gkrq-vzm.js → index-B3KCdQ91.js} +1 -1
- langflow/frontend/assets/{index-DytJENYD.js → index-B7uEuOPK.js} +1 -1
- langflow/frontend/assets/{index-DkXy1WFo.js → index-B8UR8v-Q.js} +1 -1
- langflow/frontend/assets/{index-BChjg6Az.js → index-BD7Io1hL.js} +6 -6
- langflow/frontend/assets/{index-CyPvTB63.js → index-BDQrd7Tj.js} +1 -1
- langflow/frontend/assets/{index-BbJjt5m4.js → index-BDuk0d7P.js} +1 -1
- langflow/frontend/assets/{index-BBxAPk1y.js → index-BFQ8KFK0.js} +1 -1
- langflow/frontend/assets/{index-BqPpO6KG.js → index-BFf0HTFI.js} +1 -1
- langflow/frontend/assets/{index-yCHsaqs8.js → index-BHhnpSkW.js} +1 -1
- langflow/frontend/assets/{index-Bd6WtbKA.js → index-BKKrUElc.js} +1 -1
- langflow/frontend/assets/{index-DHq8TQPB.js → index-BKeZt2hQ.js} +1 -1
- langflow/frontend/assets/{index-BCCGvqay.js → index-BKlQbl-6.js} +1 -1
- langflow/frontend/assets/{index-Boso-xEw.js → index-BLYw9MK2.js} +1 -1
- langflow/frontend/assets/{index-DmMDPoi0.js → index-BLsVo9iW.js} +1 -1
- langflow/frontend/assets/{index-Car-zdor.js → index-BNQIbda3.js} +1 -1
- langflow/frontend/assets/{index-Dg-63Si_.js → index-BPR2mEFC.js} +1 -1
- langflow/frontend/assets/{index-CTrt1Q_j.js → index-BPfdqCc_.js} +1 -1
- langflow/frontend/assets/{index-CVQmT7ZL.js → index-BQrVDjR1.js} +1 -1
- langflow/frontend/assets/{index-BB15_iOb.js → index-BRmSeoWR.js} +1 -1
- langflow/frontend/assets/{index-BX5D-USa.js → index-BUse-kxM.js} +1 -1
- langflow/frontend/assets/{index-CaQ_H9ww.js → index-BVFaF7HW.js} +1 -1
- langflow/frontend/assets/{index-C26RqKWL.js → index-BWgIWfv2.js} +1 -1
- langflow/frontend/assets/{index-DbMFlnHE.js → index-BWt5xGeA.js} +1 -1
- langflow/frontend/assets/{index-Db71w3lq.js → index-BYhcGLTV.js} +1 -1
- langflow/frontend/assets/{index-DzW2mfkK.js → index-BYjw7Gk3.js} +1 -1
- langflow/frontend/assets/{index-DJB12jIC.js → index-BZFljdMa.js} +1 -1
- langflow/frontend/assets/{index-nVwHLjuV.js → index-BcAgItH4.js} +1 -1
- langflow/frontend/assets/{index-DkelbYy7.js → index-Bct1s6__.js} +1 -1
- langflow/frontend/assets/{index-ChXJpBz4.js → index-Bhv79Zso.js} +1 -1
- langflow/frontend/assets/{index-BxEuHa76.js → index-Bj3lSwvZ.js} +1 -1
- langflow/frontend/assets/{index-BkPYpfgw.js → index-Bk4mTwnI.js} +1 -1
- langflow/frontend/assets/{index-BvT7L317.js → index-BmIx1cws.js} +1 -1
- langflow/frontend/assets/{index-DIDDfmlJ.js → index-BmYJJ5YS.js} +1 -1
- langflow/frontend/assets/{index-C7QWbnLK.js → index-BnAFhkSN.js} +1 -1
- langflow/frontend/assets/{index-CJo_cyWW.js → index-Bo-ww0Bb.js} +1 -1
- langflow/frontend/assets/{index-DjQETUy8.js → index-BpmqDOeZ.js} +1 -1
- langflow/frontend/assets/{index-ya2uXE8v.js → index-BrVhdPZb.js} +1 -1
- langflow/frontend/assets/{index-DCRk27Tp.js → index-BvGQfVBD.js} +1 -1
- langflow/frontend/assets/{index-BTrsh9LS.js → index-Bwi4flFg.js} +1 -1
- langflow/frontend/assets/{index-BRxvproo.js → index-BzoRPtTY.js} +1 -1
- langflow/frontend/assets/{index-BIQQCMvz.js → index-C--IDAyc.js} +1 -1
- langflow/frontend/assets/{index-DfngcQxO.js → index-C0E3_MIK.js} +1 -1
- langflow/frontend/assets/{index-Bvxg4_ux.js → index-C27Jj_26.js} +1 -1
- langflow/frontend/assets/{index-D8lOi1GI.js → index-C2eQmQsn.js} +1 -1
- langflow/frontend/assets/{index-rXV1G1aB.js → index-C8K0r39B.js} +1 -1
- langflow/frontend/assets/{index-B3Sur4Z3.js → index-CEJNWPhA.js} +1 -1
- langflow/frontend/assets/{index-BR0bkVqX.js → index-CFNTYfFK.js} +1 -1
- langflow/frontend/assets/{index-Bnqod3vk.js → index-CMHpjHZl.js} +1 -1
- langflow/frontend/assets/{index-BLGYN-9b.js → index-CSu8KHOi.js} +1 -1
- langflow/frontend/assets/{index-BOB_zsjl.js → index-CUKmGsI6.js} +1 -1
- langflow/frontend/assets/{index-BzEUlaw_.js → index-CWYiSeWV.js} +1 -1
- langflow/frontend/assets/{index-DVlceYFD.js → index-CY7_TBTC.js} +1 -1
- langflow/frontend/assets/{index-D3DDfngy.js → index-CbnWRlYY.js} +1 -1
- langflow/frontend/assets/{index-cvZdgWHQ.js → index-CfPBgkqg.js} +1 -1
- langflow/frontend/assets/{index-Ui4xUImO.js → index-Cg53lrYh.js} +1 -1
- langflow/frontend/assets/{index-C6jri9Wm.js → index-CgU7KF4I.js} +1 -1
- langflow/frontend/assets/{index-BVEZDXxS.js → index-CgwykVGh.js} +1 -1
- langflow/frontend/assets/{index-BOeo01QB.js → index-Ch5r0oW6.js} +1 -1
- langflow/frontend/assets/{index-D6PSjHxP.js → index-CjsommIr.js} +1 -1
- langflow/frontend/assets/{index-pCQ_yw8m.js → index-CkK25zZO.js} +1 -1
- langflow/frontend/assets/{index-BFp_O-c9.js → index-CkjwSTSM.js} +1 -1
- langflow/frontend/assets/{index-Du_18NCU.js → index-CmSFKgiD.js} +1 -1
- langflow/frontend/assets/{index-BvwZfF2i.js → index-Cr5v2ave.js} +1 -1
- langflow/frontend/assets/{index-FUxmznS-.js → index-CrAF-31Y.js} +1 -1
- langflow/frontend/assets/{index-C-2hghRJ.js → index-CsLQiWNf.js} +1 -1
- langflow/frontend/assets/{index-C_TdzfAn.js → index-CuCM7Wu7.js} +1 -1
- langflow/frontend/assets/{index-D5_DsUJc.js → index-Cxy9sEpy.js} +1 -1
- langflow/frontend/assets/{index-C_veJlEb.js → index-CyP3py8K.js} +1 -1
- langflow/frontend/assets/{index-OazXJdEl.js → index-CzHzeZuA.js} +1 -1
- langflow/frontend/assets/{index-CvcEzq4x.js → index-D1oynC8a.js} +1 -1
- langflow/frontend/assets/{index-CZQ9rXNa.js → index-D4tjMhfY.js} +1 -1
- langflow/frontend/assets/{index-B1YN7oMV.js → index-D6CSIrp1.js} +1 -1
- langflow/frontend/assets/{index-DfxYyS3M.js → index-D9kwEzPB.js} +1 -1
- langflow/frontend/assets/{index-BbRm7beF.js → index-DDXsm8tz.js} +1 -1
- langflow/frontend/assets/{index-xuIrH2Dq.js → index-DDhJVVel.js} +1 -1
- langflow/frontend/assets/{index-CmplyEaa.js → index-DH6o91_s.js} +1 -1
- langflow/frontend/assets/{index-DnEGCgih.js → index-DHngW1k8.js} +1 -1
- langflow/frontend/assets/{index-ajRge-Mg.js → index-DIKUsGLF.js} +1 -1
- langflow/frontend/assets/{index-DpClkXIV.js → index-DJESSNJi.js} +1 -1
- langflow/frontend/assets/{index-8WdfSTTz.js → index-DMCWDJOl.js} +1 -1
- langflow/frontend/assets/{index-DZTC5pdT.js → index-DOEvKC2X.js} +1 -1
- langflow/frontend/assets/{index-DysKpOuj.js → index-DOQDkSoK.js} +1 -1
- langflow/frontend/assets/{index-C82JjCPD.js → index-DXAfIEvs.js} +1 -1
- langflow/frontend/assets/{index-D8GJngXa.js → index-DZP_SaHb.js} +1 -1
- langflow/frontend/assets/{index-DIkNW9Cd.js → index-DZxUIhWh.js} +1 -1
- langflow/frontend/assets/{index-DK1Ptcc4.js → index-Dda2u_yz.js} +1 -1
- langflow/frontend/assets/{index-BWmPX4iQ.js → index-Dg8N3NSO.js} +1 -1
- langflow/frontend/assets/{index-CWdkbVsd.js → index-DkGhPNeA.js} +1 -1
- langflow/frontend/assets/{index-DF5VwgU6.js → index-Dka_Rk4-.js} +1 -1
- langflow/frontend/assets/{index-Bsa0xZyL.js → index-DljpLeCW.js} +1 -1
- langflow/frontend/assets/{index-CLPdN-q6.js → index-DnVYJtVO.js} +1 -1
- langflow/frontend/assets/{index-CxvP91st.js → index-DqbzUcI5.js} +1 -1
- langflow/frontend/assets/{index-BIzTEqFh.js → index-Dr6pVDPI.js} +1 -1
- langflow/frontend/assets/{index-tVYiABdp.js → index-DsoX2o1S.js} +1 -1
- langflow/frontend/assets/{index-CCePCqkT.js → index-DwfHWnX7.js} +1 -1
- langflow/frontend/assets/{index-BEMw2Np8.js → index-Dx-Z87KT.js} +1 -1
- langflow/frontend/assets/{index-BRYjyhAd.js → index-DyqITq51.js} +1 -1
- langflow/frontend/assets/{index-l7bzB8Ex.js → index-DzIv3RyR.js} +1 -1
- langflow/frontend/assets/{index-D-9TI74R.js → index-G4ro0MjT.js} +1 -1
- langflow/frontend/assets/{index-CCxGSSTT.js → index-H7J7w7fa.js} +1 -1
- langflow/frontend/assets/{index-_UcqeEjm.js → index-KWY77KfV.js} +1 -1
- langflow/frontend/assets/{index-Dqd4RjYA.js → index-U9GWm1eH.js} +1 -1
- langflow/frontend/assets/{index-Dq5ilsem.js → index-Un9pWxnP.js} +1 -1
- langflow/frontend/assets/{index-BzL_EoKd.js → index-Xi4TplbI.js} +1 -1
- langflow/frontend/assets/{index-LbYjHKkn.js → index-_cbGmjF4.js} +1 -1
- langflow/frontend/assets/{index-DGRMNe9n.js → index-cEXY6V06.js} +1 -1
- langflow/frontend/assets/{index-8yMsjVV2.js → index-dyXKnkMi.js} +1 -1
- langflow/frontend/assets/{index-DKHNourL.js → index-eUkS6iJM.js} +1 -1
- langflow/frontend/assets/{index-Bv8h2Z-q.js → index-ekfMOqrF.js} +1 -1
- langflow/frontend/assets/{index-B748uLP1.js → index-gdb7XMS8.js} +1 -1
- langflow/frontend/assets/{index-CpvYQ0ug.js → index-hZUcL0MZ.js} +1 -1
- langflow/frontend/assets/{index-BIXaW2aY.js → index-kkA-qHB_.js} +1 -1
- langflow/frontend/assets/{index-BhIOhlCH.js → index-mzl9ULw5.js} +1 -1
- langflow/frontend/assets/{index-CYe8Ipef.js → index-oxHBZk2v.js} +1 -1
- langflow/frontend/assets/{index-WPFivmdQ.js → index-p2kStSPe.js} +1 -1
- langflow/frontend/assets/{index-BmX5CoED.js → index-paQEWYGT.js} +1 -1
- langflow/frontend/assets/{index-CpcbQZIF.js → index-r_8gs4nL.js} +1 -1
- langflow/frontend/assets/{index-dcnYpT9N.js → index-uiKla4UR.js} +1 -1
- langflow/frontend/assets/{index-BTEW9e8P.js → index-vJOO5U8M.js} +1 -1
- langflow/frontend/assets/{index-CQMoqLAu.js → index-w72fDjpG.js} +1 -1
- langflow/frontend/assets/{index-Dsps-jKu.js → index-zV82kQ6k.js} +1 -1
- langflow/frontend/assets/lazyIconImports-DTNgvPE-.js +2 -0
- langflow/frontend/assets/{use-post-add-user-BrBYH9eR.js → use-post-add-user-CvtuazTg.js} +1 -1
- langflow/frontend/index.html +1 -1
- langflow/graph/edge/base.py +2 -3
- langflow/graph/graph/base.py +14 -12
- langflow/graph/graph/constants.py +3 -0
- langflow/graph/utils.py +6 -6
- langflow/graph/vertex/base.py +4 -5
- langflow/graph/vertex/param_handler.py +1 -1
- langflow/graph/vertex/vertex_types.py +2 -2
- langflow/helpers/flow.py +1 -1
- langflow/initial_setup/setup.py +32 -30
- langflow/initial_setup/starter_projects/Blog Writer.json +2 -2
- langflow/initial_setup/starter_projects/Custom Component Generator.json +2 -2
- langflow/initial_setup/starter_projects/Document Q&A.json +1 -1
- langflow/initial_setup/starter_projects/Instagram Copywriter.json +3 -3
- langflow/initial_setup/starter_projects/Invoice Summarizer.json +1 -1
- langflow/initial_setup/starter_projects/Knowledge Ingestion.json +2 -2
- langflow/initial_setup/starter_projects/Market Research.json +3 -3
- langflow/initial_setup/starter_projects/Meeting Summary.json +6 -6
- langflow/initial_setup/starter_projects/Memory Chatbot.json +2 -2
- langflow/initial_setup/starter_projects/News Aggregator.json +3 -3
- langflow/initial_setup/starter_projects/Nvidia Remix.json +3 -3
- langflow/initial_setup/starter_projects/Pok/303/251dex Agent.json" +1 -1
- langflow/initial_setup/starter_projects/Portfolio Website Code Generator.json +1 -1
- langflow/initial_setup/starter_projects/Price Deal Finder.json +5 -5
- langflow/initial_setup/starter_projects/Research Agent.json +3 -3
- langflow/initial_setup/starter_projects/SaaS Pricing.json +1 -1
- langflow/initial_setup/starter_projects/Search agent.json +1 -1
- langflow/initial_setup/starter_projects/Sequential Tasks Agents.json +7 -7
- langflow/initial_setup/starter_projects/Simple Agent.json +3 -3
- langflow/initial_setup/starter_projects/Social Media Agent.json +1 -1
- langflow/initial_setup/starter_projects/Text Sentiment Analysis.json +1 -1
- langflow/initial_setup/starter_projects/Travel Planning Agents.json +3 -3
- langflow/initial_setup/starter_projects/Vector Store RAG.json +1 -1
- langflow/initial_setup/starter_projects/Youtube Analysis.json +3 -3
- langflow/interface/components.py +23 -22
- langflow/interface/initialize/loading.py +5 -5
- langflow/interface/run.py +1 -1
- langflow/interface/utils.py +1 -1
- langflow/io/__init__.py +0 -1
- langflow/langflow_launcher.py +1 -1
- langflow/load/load.py +2 -7
- langflow/logging/__init__.py +0 -1
- langflow/logging/logger.py +191 -115
- langflow/logging/setup.py +1 -1
- langflow/main.py +37 -52
- langflow/memory.py +7 -7
- langflow/middleware.py +1 -1
- langflow/processing/process.py +3 -3
- langflow/schema/artifact.py +2 -2
- langflow/schema/data.py +10 -2
- langflow/schema/dataframe.py +1 -1
- langflow/schema/message.py +1 -1
- langflow/serialization/serialization.py +1 -1
- langflow/services/auth/utils.py +2 -2
- langflow/services/cache/disk.py +1 -1
- langflow/services/cache/service.py +3 -3
- langflow/services/database/models/flow/model.py +2 -7
- langflow/services/database/models/transactions/crud.py +2 -2
- langflow/services/database/models/user/crud.py +2 -2
- langflow/services/database/service.py +8 -8
- langflow/services/database/utils.py +6 -5
- langflow/services/deps.py +2 -3
- langflow/services/factory.py +1 -1
- langflow/services/flow/flow_runner.py +7 -12
- langflow/services/job_queue/service.py +16 -15
- langflow/services/manager.py +3 -4
- langflow/services/settings/auth.py +1 -1
- langflow/services/settings/base.py +3 -8
- langflow/services/settings/manager.py +1 -1
- langflow/services/settings/utils.py +1 -1
- langflow/services/socket/__init__.py +0 -1
- langflow/services/socket/service.py +3 -3
- langflow/services/socket/utils.py +4 -4
- langflow/services/state/service.py +1 -2
- langflow/services/storage/factory.py +1 -1
- langflow/services/storage/local.py +9 -8
- langflow/services/storage/s3.py +11 -10
- langflow/services/store/service.py +3 -3
- langflow/services/store/utils.py +3 -2
- langflow/services/task/temp_flow_cleanup.py +7 -7
- langflow/services/telemetry/service.py +10 -10
- langflow/services/tracing/arize_phoenix.py +2 -2
- langflow/services/tracing/langfuse.py +1 -1
- langflow/services/tracing/langsmith.py +1 -1
- langflow/services/tracing/langwatch.py +1 -1
- langflow/services/tracing/opik.py +1 -1
- langflow/services/tracing/service.py +25 -6
- langflow/services/tracing/traceloop.py +245 -0
- langflow/services/utils.py +7 -7
- langflow/services/variable/kubernetes.py +3 -3
- langflow/services/variable/kubernetes_secrets.py +2 -1
- langflow/services/variable/service.py +5 -5
- langflow/utils/component_utils.py +9 -6
- langflow/utils/util.py +5 -5
- langflow/utils/validate.py +3 -3
- langflow/utils/voice_utils.py +2 -2
- {langflow_base_nightly-0.5.0.dev37.dist-info → langflow_base_nightly-0.5.0.dev38.dist-info}/METADATA +2 -1
- {langflow_base_nightly-0.5.0.dev37.dist-info → langflow_base_nightly-0.5.0.dev38.dist-info}/RECORD +334 -333
- langflow/frontend/assets/lazyIconImports-t6wEndt1.js +0 -2
- {langflow_base_nightly-0.5.0.dev37.dist-info → langflow_base_nightly-0.5.0.dev38.dist-info}/WHEEL +0 -0
- {langflow_base_nightly-0.5.0.dev37.dist-info → langflow_base_nightly-0.5.0.dev38.dist-info}/entry_points.txt +0 -0
langflow/__main__.py
CHANGED
|
@@ -162,7 +162,7 @@ def wait_for_server_ready(host, port, protocol) -> None:
|
|
|
162
162
|
except HTTPError:
|
|
163
163
|
time.sleep(1)
|
|
164
164
|
except Exception: # noqa: BLE001
|
|
165
|
-
logger.
|
|
165
|
+
logger.debug("Error while waiting for the server to become ready.", exc_info=True)
|
|
166
166
|
time.sleep(1)
|
|
167
167
|
|
|
168
168
|
|
|
@@ -6,19 +6,19 @@ Create Date: 2024-04-12 18:11:06.454037
|
|
|
6
6
|
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
|
-
from
|
|
9
|
+
from collections.abc import Sequence
|
|
10
10
|
|
|
11
11
|
import sqlalchemy as sa
|
|
12
12
|
from alembic import op
|
|
13
|
-
from loguru import logger
|
|
14
13
|
from sqlalchemy.dialects import postgresql
|
|
15
|
-
|
|
14
|
+
|
|
15
|
+
from langflow.logging.logger import logger
|
|
16
16
|
|
|
17
17
|
# revision identifiers, used by Alembic.
|
|
18
18
|
revision: str = "4e5980a44eaa"
|
|
19
|
-
down_revision:
|
|
20
|
-
branch_labels:
|
|
21
|
-
depends_on:
|
|
19
|
+
down_revision: str | None = "79e675cb6752"
|
|
20
|
+
branch_labels: str | Sequence[str] | None = None
|
|
21
|
+
depends_on: str | Sequence[str] | None = None
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
def upgrade() -> None:
|
|
@@ -37,11 +37,10 @@ def upgrade() -> None:
|
|
|
37
37
|
type_=sa.DateTime(timezone=True),
|
|
38
38
|
existing_nullable=False,
|
|
39
39
|
)
|
|
40
|
+
elif created_at_column is None:
|
|
41
|
+
logger.warning("Column 'created_at' not found in table 'apikey'")
|
|
40
42
|
else:
|
|
41
|
-
|
|
42
|
-
logger.warning("Column 'created_at' not found in table 'apikey'")
|
|
43
|
-
else:
|
|
44
|
-
logger.warning(f"Column 'created_at' has type {created_at_column['type']} in table 'apikey'")
|
|
43
|
+
logger.warning(f"Column 'created_at' has type {created_at_column['type']} in table 'apikey'")
|
|
45
44
|
if "variable" in table_names:
|
|
46
45
|
columns = inspector.get_columns("variable")
|
|
47
46
|
created_at_column = next((column for column in columns if column["name"] == "created_at"), None)
|
|
@@ -54,11 +53,10 @@ def upgrade() -> None:
|
|
|
54
53
|
type_=sa.DateTime(timezone=True),
|
|
55
54
|
existing_nullable=True,
|
|
56
55
|
)
|
|
56
|
+
elif created_at_column is None:
|
|
57
|
+
logger.warning("Column 'created_at' not found in table 'variable'")
|
|
57
58
|
else:
|
|
58
|
-
|
|
59
|
-
logger.warning("Column 'created_at' not found in table 'variable'")
|
|
60
|
-
else:
|
|
61
|
-
logger.warning(f"Column 'created_at' has type {created_at_column['type']} in table 'variable'")
|
|
59
|
+
logger.warning(f"Column 'created_at' has type {created_at_column['type']} in table 'variable'")
|
|
62
60
|
if updated_at_column is not None and isinstance(updated_at_column["type"], postgresql.TIMESTAMP):
|
|
63
61
|
batch_op.alter_column(
|
|
64
62
|
"updated_at",
|
|
@@ -66,11 +64,10 @@ def upgrade() -> None:
|
|
|
66
64
|
type_=sa.DateTime(timezone=True),
|
|
67
65
|
existing_nullable=True,
|
|
68
66
|
)
|
|
67
|
+
elif updated_at_column is None:
|
|
68
|
+
logger.warning("Column 'updated_at' not found in table 'variable'")
|
|
69
69
|
else:
|
|
70
|
-
|
|
71
|
-
logger.warning("Column 'updated_at' not found in table 'variable'")
|
|
72
|
-
else:
|
|
73
|
-
logger.warning(f"Column 'updated_at' has type {updated_at_column['type']} in table 'variable'")
|
|
70
|
+
logger.warning(f"Column 'updated_at' has type {updated_at_column['type']} in table 'variable'")
|
|
74
71
|
|
|
75
72
|
# ### end Alembic commands ###
|
|
76
73
|
|
|
@@ -92,11 +89,10 @@ def downgrade() -> None:
|
|
|
92
89
|
type_=postgresql.TIMESTAMP(),
|
|
93
90
|
existing_nullable=True,
|
|
94
91
|
)
|
|
92
|
+
elif updated_at_column is None:
|
|
93
|
+
logger.warning("Column 'updated_at' not found in table 'variable'")
|
|
95
94
|
else:
|
|
96
|
-
|
|
97
|
-
logger.warning("Column 'updated_at' not found in table 'variable'")
|
|
98
|
-
else:
|
|
99
|
-
logger.warning(f"Column 'updated_at' has type {updated_at_column['type']} in table 'variable'")
|
|
95
|
+
logger.warning(f"Column 'updated_at' has type {updated_at_column['type']} in table 'variable'")
|
|
100
96
|
if created_at_column is not None and isinstance(created_at_column["type"], sa.DateTime):
|
|
101
97
|
batch_op.alter_column(
|
|
102
98
|
"created_at",
|
|
@@ -104,11 +100,10 @@ def downgrade() -> None:
|
|
|
104
100
|
type_=postgresql.TIMESTAMP(),
|
|
105
101
|
existing_nullable=True,
|
|
106
102
|
)
|
|
103
|
+
elif created_at_column is None:
|
|
104
|
+
logger.warning("Column 'created_at' not found in table 'variable'")
|
|
107
105
|
else:
|
|
108
|
-
|
|
109
|
-
logger.warning("Column 'created_at' not found in table 'variable'")
|
|
110
|
-
else:
|
|
111
|
-
logger.warning(f"Column 'created_at' has type {created_at_column['type']} in table 'variable'")
|
|
106
|
+
logger.warning(f"Column 'created_at' has type {created_at_column['type']} in table 'variable'")
|
|
112
107
|
|
|
113
108
|
if "apikey" in table_names:
|
|
114
109
|
columns = inspector.get_columns("apikey")
|
|
@@ -121,10 +116,9 @@ def downgrade() -> None:
|
|
|
121
116
|
type_=postgresql.TIMESTAMP(),
|
|
122
117
|
existing_nullable=False,
|
|
123
118
|
)
|
|
119
|
+
elif created_at_column is None:
|
|
120
|
+
logger.warning("Column 'created_at' not found in table 'apikey'")
|
|
124
121
|
else:
|
|
125
|
-
|
|
126
|
-
logger.warning("Column 'created_at' not found in table 'apikey'")
|
|
127
|
-
else:
|
|
128
|
-
logger.warning(f"Column 'created_at' has type {created_at_column['type']} in table 'apikey'")
|
|
122
|
+
logger.warning(f"Column 'created_at' has type {created_at_column['type']} in table 'apikey'")
|
|
129
123
|
|
|
130
124
|
# ### end Alembic commands ###
|
|
@@ -6,16 +6,16 @@ Create Date: 2024-04-13 10:57:23.061709
|
|
|
6
6
|
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
|
-
from
|
|
9
|
+
from collections.abc import Sequence
|
|
10
10
|
|
|
11
11
|
import sqlalchemy as sa
|
|
12
12
|
from alembic import op
|
|
13
|
-
from loguru import logger
|
|
14
|
-
from sqlalchemy.engine.reflection import Inspector
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
from langflow.logging.logger import logger
|
|
15
|
+
|
|
16
|
+
down_revision: str | None = "4e5980a44eaa"
|
|
17
|
+
branch_labels: str | Sequence[str] | None = None
|
|
18
|
+
depends_on: str | Sequence[str] | None = None
|
|
19
19
|
|
|
20
20
|
# Revision identifiers, used by Alembic.
|
|
21
21
|
revision = "58b28437a398"
|
|
@@ -6,19 +6,19 @@ Create Date: 2024-04-11 19:23:10.697335
|
|
|
6
6
|
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
|
-
from
|
|
9
|
+
from collections.abc import Sequence
|
|
10
10
|
|
|
11
11
|
import sqlalchemy as sa
|
|
12
12
|
from alembic import op
|
|
13
|
-
from loguru import logger
|
|
14
13
|
from sqlalchemy.dialects import postgresql
|
|
15
|
-
|
|
14
|
+
|
|
15
|
+
from langflow.logging.logger import logger
|
|
16
16
|
|
|
17
17
|
# revision identifiers, used by Alembic.
|
|
18
18
|
revision: str = "79e675cb6752"
|
|
19
|
-
down_revision:
|
|
20
|
-
branch_labels:
|
|
21
|
-
depends_on:
|
|
19
|
+
down_revision: str | None = "e3bc869fa272"
|
|
20
|
+
branch_labels: str | Sequence[str] | None = None
|
|
21
|
+
depends_on: str | Sequence[str] | None = None
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
def upgrade() -> None:
|
|
@@ -37,11 +37,10 @@ def upgrade() -> None:
|
|
|
37
37
|
type_=sa.DateTime(timezone=True),
|
|
38
38
|
existing_nullable=False,
|
|
39
39
|
)
|
|
40
|
+
elif created_at_column is None:
|
|
41
|
+
logger.warning("Column 'created_at' not found in table 'apikey'")
|
|
40
42
|
else:
|
|
41
|
-
|
|
42
|
-
logger.warning("Column 'created_at' not found in table 'apikey'")
|
|
43
|
-
else:
|
|
44
|
-
logger.warning(f"Column 'created_at' has type {created_at_column['type']} in table 'apikey'")
|
|
43
|
+
logger.warning(f"Column 'created_at' has type {created_at_column['type']} in table 'apikey'")
|
|
45
44
|
if "variable" in table_names:
|
|
46
45
|
columns = inspector.get_columns("variable")
|
|
47
46
|
created_at_column = next((column for column in columns if column["name"] == "created_at"), None)
|
|
@@ -54,11 +53,10 @@ def upgrade() -> None:
|
|
|
54
53
|
type_=sa.DateTime(timezone=True),
|
|
55
54
|
existing_nullable=True,
|
|
56
55
|
)
|
|
56
|
+
elif created_at_column is None:
|
|
57
|
+
logger.warning("Column 'created_at' not found in table 'variable'")
|
|
57
58
|
else:
|
|
58
|
-
|
|
59
|
-
logger.warning("Column 'created_at' not found in table 'variable'")
|
|
60
|
-
else:
|
|
61
|
-
logger.warning(f"Column 'created_at' has type {created_at_column['type']} in table 'variable'")
|
|
59
|
+
logger.warning(f"Column 'created_at' has type {created_at_column['type']} in table 'variable'")
|
|
62
60
|
if updated_at_column is not None and isinstance(updated_at_column["type"], postgresql.TIMESTAMP):
|
|
63
61
|
batch_op.alter_column(
|
|
64
62
|
"updated_at",
|
|
@@ -66,11 +64,10 @@ def upgrade() -> None:
|
|
|
66
64
|
type_=sa.DateTime(timezone=True),
|
|
67
65
|
existing_nullable=True,
|
|
68
66
|
)
|
|
67
|
+
elif updated_at_column is None:
|
|
68
|
+
logger.warning("Column 'updated_at' not found in table 'variable'")
|
|
69
69
|
else:
|
|
70
|
-
|
|
71
|
-
logger.warning("Column 'updated_at' not found in table 'variable'")
|
|
72
|
-
else:
|
|
73
|
-
logger.warning(f"Column 'updated_at' has type {updated_at_column['type']} in table 'variable'")
|
|
70
|
+
logger.warning(f"Column 'updated_at' has type {updated_at_column['type']} in table 'variable'")
|
|
74
71
|
|
|
75
72
|
# ### end Alembic commands ###
|
|
76
73
|
|
|
@@ -92,11 +89,10 @@ def downgrade() -> None:
|
|
|
92
89
|
type_=postgresql.TIMESTAMP(),
|
|
93
90
|
existing_nullable=True,
|
|
94
91
|
)
|
|
92
|
+
elif updated_at_column is None:
|
|
93
|
+
logger.warning("Column 'updated_at' not found in table 'variable'")
|
|
95
94
|
else:
|
|
96
|
-
|
|
97
|
-
logger.warning("Column 'updated_at' not found in table 'variable'")
|
|
98
|
-
else:
|
|
99
|
-
logger.warning(f"Column 'updated_at' has type {updated_at_column['type']} in table 'variable'")
|
|
95
|
+
logger.warning(f"Column 'updated_at' has type {updated_at_column['type']} in table 'variable'")
|
|
100
96
|
if created_at_column is not None and isinstance(created_at_column["type"], sa.DateTime):
|
|
101
97
|
batch_op.alter_column(
|
|
102
98
|
"created_at",
|
|
@@ -104,11 +100,10 @@ def downgrade() -> None:
|
|
|
104
100
|
type_=postgresql.TIMESTAMP(),
|
|
105
101
|
existing_nullable=True,
|
|
106
102
|
)
|
|
103
|
+
elif created_at_column is None:
|
|
104
|
+
logger.warning("Column 'created_at' not found in table 'variable'")
|
|
107
105
|
else:
|
|
108
|
-
|
|
109
|
-
logger.warning("Column 'created_at' not found in table 'variable'")
|
|
110
|
-
else:
|
|
111
|
-
logger.warning(f"Column 'created_at' has type {created_at_column['type']} in table 'variable'")
|
|
106
|
+
logger.warning(f"Column 'created_at' has type {created_at_column['type']} in table 'variable'")
|
|
112
107
|
|
|
113
108
|
if "apikey" in table_names:
|
|
114
109
|
columns = inspector.get_columns("apikey")
|
|
@@ -121,10 +116,9 @@ def downgrade() -> None:
|
|
|
121
116
|
type_=postgresql.TIMESTAMP(),
|
|
122
117
|
existing_nullable=False,
|
|
123
118
|
)
|
|
119
|
+
elif created_at_column is None:
|
|
120
|
+
logger.warning("Column 'created_at' not found in table 'apikey'")
|
|
124
121
|
else:
|
|
125
|
-
|
|
126
|
-
logger.warning("Column 'created_at' not found in table 'apikey'")
|
|
127
|
-
else:
|
|
128
|
-
logger.warning(f"Column 'created_at' has type {created_at_column['type']} in table 'apikey'")
|
|
122
|
+
logger.warning(f"Column 'created_at' has type {created_at_column['type']} in table 'apikey'")
|
|
129
123
|
|
|
130
124
|
# ### end Alembic commands ###
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""Add unique constraints
|
|
1
|
+
"""Add unique constraints.
|
|
2
2
|
|
|
3
3
|
Revision ID: b2fa308044b5
|
|
4
4
|
Revises: 0b8757876a7c
|
|
@@ -6,25 +6,25 @@ Create Date: 2024-01-26 13:31:14.797548
|
|
|
6
6
|
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
|
-
from
|
|
9
|
+
from collections.abc import Sequence
|
|
10
10
|
|
|
11
11
|
import sqlalchemy as sa
|
|
12
12
|
import sqlmodel
|
|
13
13
|
from alembic import op
|
|
14
|
-
|
|
15
|
-
from
|
|
14
|
+
|
|
15
|
+
from langflow.logging.logger import logger
|
|
16
16
|
|
|
17
17
|
# revision identifiers, used by Alembic.
|
|
18
18
|
revision: str = "b2fa308044b5"
|
|
19
|
-
down_revision:
|
|
20
|
-
branch_labels:
|
|
21
|
-
depends_on:
|
|
19
|
+
down_revision: str | None = "0b8757876a7c"
|
|
20
|
+
branch_labels: str | Sequence[str] | None = None
|
|
21
|
+
depends_on: str | Sequence[str] | None = None
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
def upgrade() -> None:
|
|
25
25
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
26
26
|
conn = op.get_bind()
|
|
27
|
-
inspector = sa.inspect(conn)
|
|
27
|
+
inspector = sa.inspect(conn)
|
|
28
28
|
tables = inspector.get_table_names()
|
|
29
29
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
30
30
|
try:
|
|
@@ -53,14 +53,13 @@ def upgrade() -> None:
|
|
|
53
53
|
if "fk_flow_user_id_user" not in constraint_names:
|
|
54
54
|
batch_op.create_foreign_key("fk_flow_user_id_user", "user", ["user_id"], ["id"])
|
|
55
55
|
|
|
56
|
-
except Exception as e:
|
|
56
|
+
except Exception as e: # noqa: BLE001
|
|
57
57
|
logger.exception(f"Error during upgrade: {e}")
|
|
58
|
-
pass
|
|
59
58
|
|
|
60
59
|
|
|
61
60
|
def downgrade() -> None:
|
|
62
61
|
conn = op.get_bind()
|
|
63
|
-
inspector = sa.inspect(conn)
|
|
62
|
+
inspector = sa.inspect(conn)
|
|
64
63
|
try:
|
|
65
64
|
# Re-create the dropped table 'flowstyle' if it was previously dropped in upgrade
|
|
66
65
|
if "flowstyle" not in inspector.get_table_names():
|
|
@@ -97,6 +96,6 @@ def downgrade() -> None:
|
|
|
97
96
|
if "fk_flow_user_id_user" in constraint_names:
|
|
98
97
|
batch_op.drop_constraint("fk_flow_user_id_user", type_="foreignkey")
|
|
99
98
|
|
|
100
|
-
except Exception as e:
|
|
99
|
+
except Exception as e: # noqa: BLE001
|
|
101
100
|
# It's generally a good idea to log the exception or handle it in a way other than a bare pass
|
|
102
|
-
|
|
101
|
+
logger.exception(f"Error during downgrade: {e}")
|
langflow/api/build.py
CHANGED
|
@@ -6,7 +6,6 @@ import uuid
|
|
|
6
6
|
from collections.abc import AsyncIterator
|
|
7
7
|
|
|
8
8
|
from fastapi import BackgroundTasks, HTTPException, Response
|
|
9
|
-
from loguru import logger
|
|
10
9
|
from sqlmodel import select
|
|
11
10
|
|
|
12
11
|
from langflow.api.disconnect import DisconnectHandlerStreamingResponse
|
|
@@ -20,16 +19,12 @@ from langflow.api.utils import (
|
|
|
20
19
|
get_top_level_vertices,
|
|
21
20
|
parse_exception,
|
|
22
21
|
)
|
|
23
|
-
from langflow.api.v1.schemas import
|
|
24
|
-
FlowDataRequest,
|
|
25
|
-
InputValueRequest,
|
|
26
|
-
ResultDataResponse,
|
|
27
|
-
VertexBuildResponse,
|
|
28
|
-
)
|
|
22
|
+
from langflow.api.v1.schemas import FlowDataRequest, InputValueRequest, ResultDataResponse, VertexBuildResponse
|
|
29
23
|
from langflow.events.event_manager import EventManager
|
|
30
24
|
from langflow.exceptions.component import ComponentBuildError
|
|
31
25
|
from langflow.graph.graph.base import Graph
|
|
32
26
|
from langflow.graph.utils import log_vertex_build
|
|
27
|
+
from langflow.logging.logger import logger
|
|
33
28
|
from langflow.schema.message import ErrorMessage
|
|
34
29
|
from langflow.schema.schema import OutputValue
|
|
35
30
|
from langflow.services.database.models.flow.model import Flow
|
|
@@ -75,7 +70,7 @@ async def start_flow_build(
|
|
|
75
70
|
)
|
|
76
71
|
queue_service.start_job(job_id, task_coro)
|
|
77
72
|
except Exception as e:
|
|
78
|
-
logger.
|
|
73
|
+
await logger.aexception("Failed to create queue and start task")
|
|
79
74
|
raise HTTPException(status_code=500, detail=str(e)) from e
|
|
80
75
|
return job_id
|
|
81
76
|
|
|
@@ -91,7 +86,7 @@ async def get_flow_events_response(
|
|
|
91
86
|
main_queue, event_manager, event_task, _ = queue_service.get_queue_data(job_id)
|
|
92
87
|
if event_delivery in (EventDeliveryType.STREAMING, EventDeliveryType.DIRECT):
|
|
93
88
|
if event_task is None:
|
|
94
|
-
logger.
|
|
89
|
+
await logger.aerror(f"No event task found for job {job_id}")
|
|
95
90
|
raise HTTPException(status_code=404, detail="No event task found for job")
|
|
96
91
|
return await create_flow_response(
|
|
97
92
|
queue=main_queue,
|
|
@@ -130,19 +125,19 @@ async def get_flow_events_response(
|
|
|
130
125
|
content = "\n".join([event for event in events if event is not None])
|
|
131
126
|
return Response(content=content, media_type="application/x-ndjson")
|
|
132
127
|
except asyncio.CancelledError as exc:
|
|
133
|
-
logger.
|
|
128
|
+
await logger.ainfo(f"Event polling was cancelled for job {job_id}")
|
|
134
129
|
raise HTTPException(status_code=499, detail="Event polling was cancelled") from exc
|
|
135
130
|
except asyncio.TimeoutError:
|
|
136
|
-
logger.
|
|
131
|
+
await logger.awarning(f"Timeout while waiting for events for job {job_id}")
|
|
137
132
|
return Response(content="", media_type="application/x-ndjson") # Return empty response instead of error
|
|
138
133
|
|
|
139
134
|
except JobQueueNotFoundError as exc:
|
|
140
|
-
logger.
|
|
135
|
+
await logger.aerror(f"Job not found: {job_id}. Error: {exc!s}")
|
|
141
136
|
raise HTTPException(status_code=404, detail=f"Job not found: {exc!s}") from exc
|
|
142
137
|
except Exception as exc:
|
|
143
138
|
if isinstance(exc, HTTPException):
|
|
144
139
|
raise
|
|
145
|
-
logger.
|
|
140
|
+
await logger.aexception(f"Unexpected error processing flow events for job {job_id}")
|
|
146
141
|
raise HTTPException(status_code=500, detail=f"Unexpected error: {exc!s}") from exc
|
|
147
142
|
|
|
148
143
|
|
|
@@ -161,9 +156,9 @@ async def create_flow_response(
|
|
|
161
156
|
break
|
|
162
157
|
get_time = time.time()
|
|
163
158
|
yield value.decode("utf-8")
|
|
164
|
-
logger.
|
|
159
|
+
await logger.adebug(f"Event {event_id} consumed in {get_time - put_time:.4f}s")
|
|
165
160
|
except Exception as exc: # noqa: BLE001
|
|
166
|
-
logger.
|
|
161
|
+
await logger.aexception(f"Error consuming event: {exc}")
|
|
167
162
|
break
|
|
168
163
|
|
|
169
164
|
def on_disconnect() -> None:
|
|
@@ -233,7 +228,7 @@ async def generate_flow_events(
|
|
|
233
228
|
|
|
234
229
|
if "stream or streaming set to True" in str(exc):
|
|
235
230
|
raise HTTPException(status_code=400, detail=str(exc)) from exc
|
|
236
|
-
logger.
|
|
231
|
+
await logger.aexception("Error checking build status")
|
|
237
232
|
raise HTTPException(status_code=500, detail=str(exc)) from exc
|
|
238
233
|
return first_layer, vertices_to_run, graph
|
|
239
234
|
|
|
@@ -317,7 +312,7 @@ async def generate_flow_events(
|
|
|
317
312
|
tb = exc.formatted_traceback
|
|
318
313
|
else:
|
|
319
314
|
tb = traceback.format_exc()
|
|
320
|
-
logger.
|
|
315
|
+
await logger.aexception("Error building Component")
|
|
321
316
|
params = format_exception_message(exc)
|
|
322
317
|
message = {"errorMessage": params, "stackTrace": tb}
|
|
323
318
|
valid = False
|
|
@@ -390,7 +385,7 @@ async def generate_flow_events(
|
|
|
390
385
|
component_error_message=str(exc),
|
|
391
386
|
),
|
|
392
387
|
)
|
|
393
|
-
logger.
|
|
388
|
+
await logger.aexception("Error building Component")
|
|
394
389
|
message = parse_exception(exc)
|
|
395
390
|
raise HTTPException(status_code=500, detail=message) from exc
|
|
396
391
|
|
|
@@ -411,7 +406,7 @@ async def generate_flow_events(
|
|
|
411
406
|
try:
|
|
412
407
|
vertex_build_response: VertexBuildResponse = await _build_vertex(vertex_id, graph, event_manager)
|
|
413
408
|
except asyncio.CancelledError as exc:
|
|
414
|
-
logger.
|
|
409
|
+
await logger.aerror(f"Build cancelled: {exc}")
|
|
415
410
|
raise
|
|
416
411
|
|
|
417
412
|
# send built event or error event
|
|
@@ -459,7 +454,7 @@ async def generate_flow_events(
|
|
|
459
454
|
background_tasks.add_task(graph.end_all_traces_in_context())
|
|
460
455
|
raise
|
|
461
456
|
except Exception as e:
|
|
462
|
-
logger.
|
|
457
|
+
await logger.aerror(f"Error building vertices: {e}")
|
|
463
458
|
custom_component = graph.get_vertex(vertex_id).custom_component
|
|
464
459
|
trace_name = getattr(custom_component, "trace_name", None)
|
|
465
460
|
error_message = ErrorMessage(
|
|
@@ -499,11 +494,11 @@ async def cancel_flow_build(
|
|
|
499
494
|
_, _, event_task, _ = queue_service.get_queue_data(job_id)
|
|
500
495
|
|
|
501
496
|
if event_task is None:
|
|
502
|
-
logger.
|
|
497
|
+
await logger.awarning(f"No event task found for job_id {job_id}")
|
|
503
498
|
return True # Nothing to cancel is still a success
|
|
504
499
|
|
|
505
500
|
if event_task.done():
|
|
506
|
-
logger.
|
|
501
|
+
await logger.ainfo(f"Task for job_id {job_id} is already completed")
|
|
507
502
|
return True # Nothing to cancel is still a success
|
|
508
503
|
|
|
509
504
|
# Store the task reference to check status after cleanup
|
|
@@ -515,18 +510,18 @@ async def cancel_flow_build(
|
|
|
515
510
|
except asyncio.CancelledError:
|
|
516
511
|
# Check if the task was actually cancelled
|
|
517
512
|
if task_before_cleanup.cancelled():
|
|
518
|
-
logger.
|
|
513
|
+
await logger.ainfo(f"Successfully cancelled flow build for job_id {job_id} (CancelledError caught)")
|
|
519
514
|
return True
|
|
520
515
|
# If the task wasn't cancelled, re-raise the exception
|
|
521
|
-
logger.
|
|
516
|
+
await logger.aerror(f"CancelledError caught but task for job_id {job_id} was not cancelled")
|
|
522
517
|
raise
|
|
523
518
|
|
|
524
519
|
# If no exception was raised, verify that the task was actually cancelled
|
|
525
520
|
# The task should be done (cancelled) after cleanup
|
|
526
521
|
if task_before_cleanup.cancelled():
|
|
527
|
-
logger.
|
|
522
|
+
await logger.ainfo(f"Successfully cancelled flow build for job_id {job_id}")
|
|
528
523
|
return True
|
|
529
524
|
|
|
530
525
|
# If we get here, the task wasn't cancelled properly
|
|
531
|
-
logger.
|
|
526
|
+
await logger.aerror(f"Failed to cancel flow build for job_id {job_id}, task is still running")
|
|
532
527
|
return False
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import uuid
|
|
2
2
|
|
|
3
3
|
from fastapi import APIRouter, HTTPException, status
|
|
4
|
-
from loguru import logger
|
|
5
4
|
from pydantic import BaseModel
|
|
6
5
|
from sqlmodel import select
|
|
7
6
|
|
|
8
7
|
from langflow.api.utils import DbSession
|
|
8
|
+
from langflow.logging.logger import logger
|
|
9
9
|
from langflow.services.database.models.flow.model import Flow
|
|
10
10
|
from langflow.services.deps import get_chat_service
|
|
11
11
|
|
|
@@ -49,7 +49,7 @@ async def health_check(
|
|
|
49
49
|
(await session.exec(stmt)).first()
|
|
50
50
|
response.db = "ok"
|
|
51
51
|
except Exception: # noqa: BLE001
|
|
52
|
-
logger.
|
|
52
|
+
await logger.aexception("Error checking database")
|
|
53
53
|
|
|
54
54
|
try:
|
|
55
55
|
chat = get_chat_service()
|
|
@@ -57,7 +57,7 @@ async def health_check(
|
|
|
57
57
|
await chat.get_cache("health_check")
|
|
58
58
|
response.chat = "ok"
|
|
59
59
|
except Exception: # noqa: BLE001
|
|
60
|
-
logger.
|
|
60
|
+
await logger.aexception("Error checking chat service")
|
|
61
61
|
|
|
62
62
|
if response.has_error():
|
|
63
63
|
raise HTTPException(status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=response.model_dump())
|
langflow/api/utils.py
CHANGED
|
@@ -8,11 +8,11 @@ from typing import TYPE_CHECKING, Annotated, Any
|
|
|
8
8
|
|
|
9
9
|
from fastapi import Depends, HTTPException, Query
|
|
10
10
|
from fastapi_pagination import Params
|
|
11
|
-
from loguru import logger
|
|
12
11
|
from sqlalchemy import delete
|
|
13
12
|
from sqlmodel.ext.asyncio.session import AsyncSession
|
|
14
13
|
|
|
15
14
|
from langflow.graph.graph.base import Graph
|
|
15
|
+
from langflow.logging.logger import logger
|
|
16
16
|
from langflow.services.auth.utils import get_current_active_user, get_current_active_user_mcp
|
|
17
17
|
from langflow.services.database.models.flow.model import Flow
|
|
18
18
|
from langflow.services.database.models.message.model import MessageTable
|
|
@@ -119,7 +119,7 @@ async def check_langflow_version(component: StoreComponentCreate) -> None:
|
|
|
119
119
|
if langflow_version is None:
|
|
120
120
|
raise HTTPException(status_code=500, detail="Unable to verify the latest version of Langflow")
|
|
121
121
|
if langflow_version != component.last_tested_version:
|
|
122
|
-
logger.
|
|
122
|
+
await logger.awarning(
|
|
123
123
|
f"Your version of Langflow ({component.last_tested_version}) is outdated. "
|
|
124
124
|
f"Please update to the latest version ({langflow_version}) and try again."
|
|
125
125
|
)
|
|
@@ -371,7 +371,7 @@ async def verify_public_flow_and_get_user(flow_id: uuid.UUID, client_id: str | N
|
|
|
371
371
|
user = await get_user_by_flow_id_or_endpoint_name(str(flow_id))
|
|
372
372
|
|
|
373
373
|
except Exception as exc:
|
|
374
|
-
logger.
|
|
374
|
+
await logger.aexception(f"Error getting user for public flow {flow_id}")
|
|
375
375
|
raise HTTPException(status_code=403, detail="Flow is not accessible") from exc
|
|
376
376
|
|
|
377
377
|
if not user:
|
langflow/api/v1/callback.py
CHANGED
|
@@ -5,10 +5,10 @@ from uuid import UUID
|
|
|
5
5
|
|
|
6
6
|
from langchain_core.agents import AgentAction, AgentFinish
|
|
7
7
|
from langchain_core.callbacks.base import AsyncCallbackHandler
|
|
8
|
-
from loguru import logger
|
|
9
8
|
from typing_extensions import override
|
|
10
9
|
|
|
11
10
|
from langflow.api.v1.schemas import ChatResponse, PromptResponse
|
|
11
|
+
from langflow.logging.logger import logger
|
|
12
12
|
from langflow.services.deps import get_chat_service, get_socket_service
|
|
13
13
|
from langflow.utils.util import remove_ansi_escape_codes
|
|
14
14
|
|
|
@@ -78,7 +78,7 @@ class AsyncStreamingLLMCallbackHandleSIO(AsyncCallbackHandler):
|
|
|
78
78
|
for resp in resps:
|
|
79
79
|
await self.socketio_service.emit_token(to=self.sid, data=resp.model_dump())
|
|
80
80
|
except Exception: # noqa: BLE001
|
|
81
|
-
logger.
|
|
81
|
+
await logger.aexception("Error sending response")
|
|
82
82
|
|
|
83
83
|
async def on_tool_error(
|
|
84
84
|
self,
|