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.
- langflow/__main__.py +1 -1
- langflow/alembic/versions/0882f9657f22_encrypt_existing_mcp_auth_settings_.py +122 -0
- 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 +405 -120
- langflow/api/v1/mcp_utils.py +8 -8
- langflow/api/v1/schemas.py +2 -7
- 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/FAISS/__init__.py +34 -0
- 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 +249 -55
- 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/cassandra/__init__.py +40 -0
- langflow/components/chroma/__init__.py +34 -0
- langflow/components/clickhouse/__init__.py +34 -0
- langflow/components/couchbase/__init__.py +34 -0
- langflow/components/data/file.py +575 -55
- langflow/components/data/url.py +1 -1
- langflow/components/datastax/__init__.py +3 -3
- 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/elastic/__init__.py +37 -0
- 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/milvus/__init__.py +34 -0
- langflow/components/mongodb/__init__.py +34 -0
- langflow/components/nvidia/nvidia.py +3 -3
- langflow/components/olivya/olivya.py +7 -7
- langflow/components/ollama/ollama.py +9 -6
- langflow/components/perplexity/perplexity.py +3 -13
- langflow/components/pgvector/__init__.py +34 -0
- langflow/components/pinecone/__init__.py +34 -0
- 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/qdrant/__init__.py +34 -0
- langflow/components/redis/__init__.py +36 -2
- langflow/components/redis/redis.py +75 -29
- langflow/components/redis/redis_chat.py +43 -0
- langflow/components/serpapi/serp.py +1 -1
- langflow/components/supabase/__init__.py +37 -0
- 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/upstash/__init__.py +34 -0
- langflow/components/vectara/__init__.py +37 -0
- langflow/components/vectorstores/__init__.py +0 -69
- langflow/components/vectorstores/local_db.py +2 -1
- langflow/components/weaviate/__init__.py +34 -0
- 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/dependency_analyzer.py +165 -0
- langflow/custom/directory_reader/directory_reader.py +7 -7
- langflow/custom/directory_reader/utils.py +1 -2
- langflow/custom/utils.py +63 -45
- langflow/events/event_manager.py +1 -1
- langflow/frontend/assets/{SlackIcon-CnvyOamQ.js → SlackIcon-Cr3Q15Px.js} +1 -1
- langflow/frontend/assets/{Wikipedia-nyTEXdr2.js → Wikipedia-GxM5sPdM.js} +1 -1
- langflow/frontend/assets/{Wolfram-BYMQkNSq.js → Wolfram-BN3-VOCA.js} +1 -1
- langflow/frontend/assets/{index-DZTC5pdT.js → index-28oOcafk.js} +1 -1
- langflow/frontend/assets/{index-ChXJpBz4.js → index-2wSXqBtB.js} +1 -1
- langflow/frontend/assets/{index-BB15_iOb.js → index-3wW7BClE.js} +1 -1
- langflow/frontend/assets/{index-DKHNourL.js → index-6pyH3ZJB.js} +1 -1
- langflow/frontend/assets/{index-BvwZfF2i.js → index-AWCSdofD.js} +1 -1
- langflow/frontend/assets/{index-Bvxg4_ux.js → index-B2Zgv_xv.js} +1 -1
- langflow/frontend/assets/{index-Bd6WtbKA.js → index-B2ptVQGM.js} +1 -1
- langflow/frontend/assets/{index-C7QWbnLK.js → index-B3TANVes.js} +1 -1
- langflow/frontend/assets/{index-CpvYQ0ug.js → index-B4yCvZKV.js} +1 -1
- langflow/frontend/assets/{index-Dg-63Si_.js → index-BC65VuWx.js} +1 -1
- langflow/frontend/assets/{index-C6jri9Wm.js → index-BCDSei1q.js} +1 -1
- langflow/frontend/assets/{index-OazXJdEl.js → index-BJy50PvP.js} +1 -1
- langflow/frontend/assets/{index-CWdkbVsd.js → index-BKseQQ2I.js} +1 -1
- langflow/frontend/assets/{index-CaQ_H9ww.js → index-BLTxEeTi.js} +1 -1
- langflow/frontend/assets/{index-DGRMNe9n.js → index-BRg1f4Mu.js} +1 -1
- langflow/frontend/assets/{index-D8lOi1GI.js → index-BS8Vo8nc.js} +1 -1
- langflow/frontend/assets/{index-B748uLP1.js → index-BTKOU4xC.js} +1 -1
- langflow/frontend/assets/{index-Dqd4RjYA.js → index-BVwJDmw-.js} +1 -1
- langflow/frontend/assets/{index-DbMFlnHE.js → index-BWYuQ2Sj.js} +1 -1
- langflow/frontend/assets/{index-BEMw2Np8.js → index-BWdLILDG.js} +1 -1
- langflow/frontend/assets/{index-BmX5CoED.js → index-BZcw4827.js} +1 -1
- langflow/frontend/assets/{index-CyPvTB63.js → index-Bbi87Ve4.js} +1 -1
- langflow/frontend/assets/{index-BTEW9e8P.js → index-Bf0IYKLd.js} +1 -1
- langflow/frontend/assets/{index-BZgXW854.js → index-Bg5nrMRh.js} +1 -1
- langflow/frontend/assets/{index-BBxAPk1y.js → index-BiC280Nx.js} +1 -1
- langflow/frontend/assets/{index-BR0bkVqX.js → index-BiKKN6FR.js} +1 -1
- langflow/frontend/assets/{index-CTrt1Q_j.js → index-Bief6eyJ.js} +1 -1
- langflow/frontend/assets/{index-D5_DsUJc.js → index-BkXec1Yf.js} +1 -1
- langflow/frontend/assets/{index-CZQ9rXNa.js → index-Bnl6QHtP.js} +1 -1
- langflow/frontend/assets/{index-BChjg6Az.js → index-BpxbUiZD.js} +1979 -1979
- langflow/frontend/assets/{index-BOeo01QB.js → index-BrJV8psX.js} +1 -1
- langflow/frontend/assets/{index-DysKpOuj.js → index-BwLWcUXL.js} +1 -1
- langflow/frontend/assets/{index-Bnqod3vk.js → index-Bx7dBY26.js} +1 -1
- langflow/frontend/assets/{index-D3DDfngy.js → index-C-EdnFdA.js} +1 -1
- langflow/frontend/assets/{index-Bsa0xZyL.js → index-C-Xfg4cD.js} +1 -1
- langflow/frontend/assets/{index-BTrsh9LS.js → index-C1f2wMat.js} +1 -1
- langflow/frontend/assets/index-C1xroOlH.css +1 -0
- langflow/frontend/assets/{index-B1YN7oMV.js → index-C3KequvP.js} +1 -1
- langflow/frontend/assets/{index-DzW2mfkK.js → index-C3ZjKdCD.js} +1 -1
- langflow/frontend/assets/{index-ajRge-Mg.js → index-C3l0zYn0.js} +1 -1
- langflow/frontend/assets/{index-cvZdgWHQ.js → index-C3yvArUT.js} +1 -1
- langflow/frontend/assets/{index-C-2hghRJ.js → index-C9Cxnkl8.js} +1 -1
- langflow/frontend/assets/{index-BhIOhlCH.js → index-CBc8fEAE.js} +1 -1
- langflow/frontend/assets/{index-B3Sur4Z3.js → index-CBvrGgID.js} +1 -1
- langflow/frontend/assets/{index-CCePCqkT.js → index-CD-PqGCY.js} +1 -1
- langflow/frontend/assets/{index-8yMsjVV2.js → index-CGO1CiUr.js} +1 -1
- langflow/frontend/assets/{index-DF5VwgU6.js → index-CH5UVA9b.js} +1 -1
- langflow/frontend/assets/{index-dcnYpT9N.js → index-CLJeJYjH.js} +1 -1
- langflow/frontend/assets/{index-DfxYyS3M.js → index-CMZ79X-Y.js} +1 -1
- langflow/frontend/assets/{index-ya2uXE8v.js → index-CMzfJKiW.js} +1 -1
- langflow/frontend/assets/{index-DkelbYy7.js → index-CNw1H-Wc.js} +1 -1
- langflow/frontend/assets/{index-DytJENYD.js → index-CPHEscq9.js} +1 -1
- langflow/frontend/assets/{index-Bv8h2Z-q.js → index-CRPKJZw9.js} +1 -1
- langflow/frontend/assets/{index-D-9TI74R.js → index-CRPyCfYy.js} +1 -1
- langflow/frontend/assets/{index-BLGYN-9b.js → index-CRcMqCIj.js} +1 -1
- langflow/frontend/assets/{index-tVYiABdp.js → index-CUVDws8F.js} +1 -1
- langflow/frontend/assets/{index-CpcbQZIF.js → index-CVWQfRYZ.js} +1 -1
- langflow/frontend/assets/{index-DPCzHdsC.js → index-CVl6MbaM.js} +1 -1
- langflow/frontend/assets/{index-DkXy1WFo.js → index-CVwWoX99.js} +1 -1
- langflow/frontend/assets/{index-DK1Ptcc4.js → index-CWPzZtSx.js} +1 -1
- langflow/frontend/assets/{index-DHq8TQPB.js → index-CZqRL9DE.js} +1 -1
- langflow/frontend/assets/{index-DnEGCgih.js → index-CdIf07Rw.js} +1 -1
- langflow/frontend/assets/{index-BIQQCMvz.js → index-Cewy7JZE.js} +1 -1
- langflow/frontend/assets/{index-D8GJngXa.js → index-CfwLpbMM.js} +1 -1
- langflow/frontend/assets/{index-C_TdzfAn.js → index-CiR1dxI4.js} +1 -1
- langflow/frontend/assets/{index-BzL_EoKd.js → index-CiixOzDG.js} +1 -1
- langflow/frontend/assets/{index-Boso-xEw.js → index-ClsuDmR6.js} +1 -1
- langflow/frontend/assets/{index-8WdfSTTz.js → index-CmEYYRN1.js} +1 -1
- langflow/frontend/assets/{index-FUxmznS-.js → index-Co20d-eQ.js} +1 -1
- langflow/frontend/assets/{index-C82JjCPD.js → index-CpzXS6md.js} +1 -1
- langflow/frontend/assets/{index-DIDDfmlJ.js → index-Cqpzl1J4.js} +1 -1
- langflow/frontend/assets/{index-_UcqeEjm.js → index-CtVIONP2.js} +1 -1
- langflow/frontend/assets/{index-Gkrq-vzm.js → index-CuFXdTx4.js} +1 -1
- langflow/frontend/assets/{index-WPFivmdQ.js → index-Cyd2HtHK.js} +1 -1
- langflow/frontend/assets/{index-BFp_O-c9.js → index-D-1tA8Dt.js} +1 -1
- langflow/frontend/assets/{index-BqPpO6KG.js → index-D-KY3kkq.js} +1 -1
- langflow/frontend/assets/{index-Db71w3lq.js → index-D-_B1a8v.js} +1 -1
- langflow/frontend/assets/{index-BIzTEqFh.js → index-D14EWPyZ.js} +1 -1
- langflow/frontend/assets/{index-BbJjt5m4.js → index-D2N3l-cw.js} +1 -1
- langflow/frontend/assets/{index-DCRk27Tp.js → index-D5ETnvJa.js} +1 -1
- langflow/frontend/assets/{index-CvcEzq4x.js → index-D7kquVv2.js} +1 -1
- langflow/frontend/assets/{index-Q9vDw0Xl.js → index-DA6-bvgN.js} +1 -1
- langflow/frontend/assets/{index-l7bzB8Ex.js → index-DDWBeudF.js} +1 -1
- langflow/frontend/assets/{index-BCCGvqay.js → index-DDcMAaG4.js} +1 -1
- langflow/frontend/assets/{index-pCQ_yw8m.js → index-DHgomBdh.js} +1 -1
- langflow/frontend/assets/{index-BxEuHa76.js → index-DJP-ss47.js} +1 -1
- langflow/frontend/assets/{index-BbRm7beF.js → index-DQ7VYqQc.js} +1 -1
- langflow/frontend/assets/{index-Car-zdor.js → index-DTqbvGC0.js} +1 -1
- langflow/frontend/assets/{index-BRxvproo.js → index-DUpri6zF.js} +1 -1
- langflow/frontend/assets/{index-BQ6NUdMY.js → index-DV3utZDZ.js} +1 -1
- langflow/frontend/assets/{index-DjQETUy8.js → index-DXRfN4HV.js} +1 -1
- langflow/frontend/assets/{index-DfngcQxO.js → index-Db9dYSzy.js} +1 -1
- langflow/frontend/assets/{index-rXV1G1aB.js → index-DdtMEn6I.js} +1 -1
- langflow/frontend/assets/{index-DmMDPoi0.js → index-DfDhMHgQ.js} +1 -1
- langflow/frontend/assets/{index-DJB12jIC.js → index-Dfe7qfvf.js} +1 -1
- langflow/frontend/assets/{index-C_veJlEb.js → index-DhtZ5hx8.js} +1 -1
- langflow/frontend/assets/{index-CQMoqLAu.js → index-DiB3CTo8.js} +1 -1
- langflow/frontend/assets/{index-DVlceYFD.js → index-DiGWASY5.js} +1 -1
- langflow/frontend/assets/{index-Du_18NCU.js → index-Dl5amdBz.js} +1 -1
- langflow/frontend/assets/{index-CYDAYm-i.js → index-DlD4dXlZ.js} +1 -1
- langflow/frontend/assets/{index-CLPdN-q6.js → index-DmeiHnfl.js} +1 -1
- langflow/frontend/assets/index-Dmu-X5-4.js +1 -0
- langflow/frontend/assets/{index-BzEUlaw_.js → index-DpVWih90.js} +1 -1
- langflow/frontend/assets/{index-D6PSjHxP.js → index-DrDrcajG.js} +1 -1
- langflow/frontend/assets/{index-Dq5ilsem.js → index-Du-pc0KE.js} +1 -1
- langflow/frontend/assets/{index-CYe8Ipef.js → index-DwPkMTaY.js} +1 -1
- langflow/frontend/assets/{index-BVEZDXxS.js → index-DwQEZe3C.js} +1 -1
- langflow/frontend/assets/{index-BvT7L317.js → index-DyJFTK24.js} +1 -1
- langflow/frontend/assets/{index-HK3bVMYA.js → index-J38wh62w.js} +1 -1
- langflow/frontend/assets/{index-CCxGSSTT.js → index-Kwdl-e29.js} +1 -1
- langflow/frontend/assets/{index-BOB_zsjl.js → index-OwPvCmpW.js} +1 -1
- langflow/frontend/assets/{index-Dsps-jKu.js → index-Tw3Os-DN.js} +1 -1
- langflow/frontend/assets/{index-CFDvOtKC.js → index-X0guhYF8.js} +1 -1
- langflow/frontend/assets/{index-BX5D-USa.js → index-dJWNxIRH.js} +1 -1
- langflow/frontend/assets/{index-BRYjyhAd.js → index-dcJ8-agu.js} +1 -1
- langflow/frontend/assets/{index-Ui4xUImO.js → index-eo2mAtL-.js} +1 -1
- langflow/frontend/assets/{index-CxvP91st.js → index-hG24k5xJ.js} +1 -1
- langflow/frontend/assets/{index-CVQmT7ZL.js → index-h_aSZHf3.js} +1 -1
- langflow/frontend/assets/{index-BIXaW2aY.js → index-hbndqB9B.js} +1 -1
- langflow/frontend/assets/{index-DIkNW9Cd.js → index-iJngutFo.js} +1 -1
- langflow/frontend/assets/{index-BWmPX4iQ.js → index-lTpteg8t.js} +1 -1
- langflow/frontend/assets/{index-xuIrH2Dq.js → index-lZX9AvZW.js} +1 -1
- langflow/frontend/assets/{index-yCHsaqs8.js → index-m8QA6VNM.js} +1 -1
- langflow/frontend/assets/{index-BkPYpfgw.js → index-o0D2S7xW.js} +1 -1
- langflow/frontend/assets/{index-DpClkXIV.js → index-ovFJ_0J6.js} +1 -1
- langflow/frontend/assets/{index-CmplyEaa.js → index-pYJJOcma.js} +1 -1
- langflow/frontend/assets/{index-CJo_cyWW.js → index-sI75DsdM.js} +1 -1
- langflow/frontend/assets/{index-nVwHLjuV.js → index-xvFOmxx4.js} +1 -1
- langflow/frontend/assets/{index-LbYjHKkn.js → index-z3SRY-mX.js} +1 -1
- langflow/frontend/assets/lazyIconImports-D97HEZkE.js +2 -0
- langflow/frontend/assets/{use-post-add-user-BrBYH9eR.js → use-post-add-user-C0MdTpQ5.js} +1 -1
- langflow/frontend/index.html +2 -2
- langflow/graph/edge/base.py +2 -3
- langflow/graph/graph/base.py +15 -13
- 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/Basic Prompt Chaining.json +26 -0
- langflow/initial_setup/starter_projects/Basic Prompting.json +26 -0
- langflow/initial_setup/starter_projects/Blog Writer.json +58 -2
- langflow/initial_setup/starter_projects/Custom Component Generator.json +37 -2
- langflow/initial_setup/starter_projects/Document Q&A.json +27 -1
- langflow/initial_setup/starter_projects/Financial Report Parser.json +43 -0
- langflow/initial_setup/starter_projects/Hybrid Search RAG.json +83 -1
- langflow/initial_setup/starter_projects/Image Sentiment Analysis.json +43 -0
- langflow/initial_setup/starter_projects/Instagram Copywriter.json +51 -3
- langflow/initial_setup/starter_projects/Invoice Summarizer.json +40 -1
- langflow/initial_setup/starter_projects/Knowledge Ingestion.json +73 -2
- langflow/initial_setup/starter_projects/Knowledge Retrieval.json +63 -0
- langflow/initial_setup/starter_projects/Market Research.json +59 -3
- langflow/initial_setup/starter_projects/Meeting Summary.json +101 -6
- langflow/initial_setup/starter_projects/Memory Chatbot.json +37 -2
- langflow/initial_setup/starter_projects/News Aggregator.json +63 -3
- langflow/initial_setup/starter_projects/Nvidia Remix.json +69 -4
- langflow/initial_setup/starter_projects/Pok/303/251dex Agent.json" +48 -1
- langflow/initial_setup/starter_projects/Portfolio Website Code Generator.json +44 -1
- langflow/initial_setup/starter_projects/Price Deal Finder.json +57 -5
- langflow/initial_setup/starter_projects/Research Agent.json +42 -3
- langflow/initial_setup/starter_projects/Research Translation Loop.json +66 -0
- langflow/initial_setup/starter_projects/SEO Keyword Generator.json +17 -0
- langflow/initial_setup/starter_projects/SaaS Pricing.json +27 -1
- langflow/initial_setup/starter_projects/Search agent.json +40 -1
- langflow/initial_setup/starter_projects/Sequential Tasks Agents.json +76 -7
- langflow/initial_setup/starter_projects/Simple Agent.json +59 -3
- langflow/initial_setup/starter_projects/Social Media Agent.json +77 -1
- langflow/initial_setup/starter_projects/Text Sentiment Analysis.json +35 -1
- langflow/initial_setup/starter_projects/Travel Planning Agents.json +51 -3
- langflow/initial_setup/starter_projects/Twitter Thread Generator.json +80 -0
- langflow/initial_setup/starter_projects/Vector Store RAG.json +110 -3
- langflow/initial_setup/starter_projects/Youtube Analysis.json +84 -3
- langflow/initial_setup/starter_projects/vector_store_rag.py +1 -1
- 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 +6 -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/mcp_encryption.py +104 -0
- 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/feature_flags.py +1 -1
- 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.dev39.dist-info}/METADATA +2 -1
- {langflow_base_nightly-0.5.0.dev37.dist-info → langflow_base_nightly-0.5.0.dev39.dist-info}/RECORD +393 -374
- langflow/components/vectorstores/redis.py +0 -89
- langflow/frontend/assets/index-C26RqKWL.js +0 -1
- langflow/frontend/assets/index-CqS7zir1.css +0 -1
- langflow/frontend/assets/lazyIconImports-t6wEndt1.js +0 -2
- /langflow/components/{vectorstores → FAISS}/faiss.py +0 -0
- /langflow/components/{vectorstores → cassandra}/cassandra.py +0 -0
- /langflow/components/{datastax/cassandra.py → cassandra/cassandra_chat.py} +0 -0
- /langflow/components/{vectorstores → cassandra}/cassandra_graph.py +0 -0
- /langflow/components/{vectorstores → chroma}/chroma.py +0 -0
- /langflow/components/{vectorstores → clickhouse}/clickhouse.py +0 -0
- /langflow/components/{vectorstores → couchbase}/couchbase.py +0 -0
- /langflow/components/{vectorstores → datastax}/astradb.py +0 -0
- /langflow/components/{vectorstores → datastax}/astradb_graph.py +0 -0
- /langflow/components/{vectorstores → datastax}/graph_rag.py +0 -0
- /langflow/components/{vectorstores → datastax}/hcd.py +0 -0
- /langflow/components/{vectorstores → elastic}/elasticsearch.py +0 -0
- /langflow/components/{vectorstores → elastic}/opensearch.py +0 -0
- /langflow/components/{vectorstores → milvus}/milvus.py +0 -0
- /langflow/components/{vectorstores → mongodb}/mongodb_atlas.py +0 -0
- /langflow/components/{vectorstores → pgvector}/pgvector.py +0 -0
- /langflow/components/{vectorstores → pinecone}/pinecone.py +0 -0
- /langflow/components/{vectorstores → qdrant}/qdrant.py +0 -0
- /langflow/components/{vectorstores → supabase}/supabase.py +0 -0
- /langflow/components/{vectorstores → upstash}/upstash.py +0 -0
- /langflow/components/{vectorstores → vectara}/vectara.py +0 -0
- /langflow/components/{vectorstores → vectara}/vectara_rag.py +0 -0
- /langflow/components/{vectorstores → weaviate}/weaviate.py +0 -0
- {langflow_base_nightly-0.5.0.dev37.dist-info → langflow_base_nightly-0.5.0.dev39.dist-info}/WHEEL +0 -0
- {langflow_base_nightly-0.5.0.dev37.dist-info → langflow_base_nightly-0.5.0.dev39.dist-info}/entry_points.txt +0 -0
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
from typing import Any
|
|
2
2
|
|
|
3
|
-
from loguru import logger
|
|
4
|
-
|
|
5
3
|
from langflow.base.tools.run_flow import RunFlowBaseComponent
|
|
6
4
|
from langflow.helpers.flow import run_flow
|
|
5
|
+
from langflow.logging.logger import logger
|
|
7
6
|
from langflow.schema.dotdict import dotdict
|
|
8
7
|
|
|
9
8
|
|
|
@@ -34,7 +33,7 @@ class RunFlowComponent(RunFlowBaseComponent):
|
|
|
34
33
|
build_config = self.update_build_config_from_graph(build_config, graph)
|
|
35
34
|
except Exception as e:
|
|
36
35
|
msg = f"Error building graph for flow {field_value}"
|
|
37
|
-
logger.
|
|
36
|
+
await logger.aexception(msg)
|
|
38
37
|
raise RuntimeError(msg) from e
|
|
39
38
|
return build_config
|
|
40
39
|
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
from typing import Any
|
|
2
2
|
|
|
3
|
-
from loguru import logger
|
|
4
|
-
|
|
5
3
|
from langflow.base.flow_processing.utils import build_data_from_result_data
|
|
6
4
|
from langflow.custom.custom_component.component import Component
|
|
7
5
|
from langflow.graph.graph.base import Graph
|
|
8
6
|
from langflow.graph.vertex.base import Vertex
|
|
9
7
|
from langflow.helpers.flow import get_flow_inputs
|
|
10
8
|
from langflow.io import DropdownInput, Output
|
|
9
|
+
from langflow.logging.logger import logger
|
|
11
10
|
from langflow.schema.data import Data
|
|
12
11
|
from langflow.schema.dotdict import dotdict
|
|
13
12
|
|
|
@@ -41,11 +40,11 @@ class SubFlowComponent(Component):
|
|
|
41
40
|
try:
|
|
42
41
|
flow_data = await self.get_flow(field_value)
|
|
43
42
|
except Exception: # noqa: BLE001
|
|
44
|
-
logger.
|
|
43
|
+
await logger.aexception(f"Error getting flow {field_value}")
|
|
45
44
|
else:
|
|
46
45
|
if not flow_data:
|
|
47
46
|
msg = f"Flow {field_value} not found."
|
|
48
|
-
logger.
|
|
47
|
+
await logger.aerror(msg)
|
|
49
48
|
else:
|
|
50
49
|
try:
|
|
51
50
|
graph = Graph.from_payload(flow_data.data["data"])
|
|
@@ -54,7 +53,7 @@ class SubFlowComponent(Component):
|
|
|
54
53
|
# Add inputs to the build config
|
|
55
54
|
build_config = self.add_inputs_to_build_config(inputs, build_config)
|
|
56
55
|
except Exception: # noqa: BLE001
|
|
57
|
-
logger.
|
|
56
|
+
await logger.aexception(f"Error building graph for flow {field_value}")
|
|
58
57
|
|
|
59
58
|
return build_config
|
|
60
59
|
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
import os
|
|
2
2
|
|
|
3
|
-
from loguru import logger
|
|
4
3
|
from mem0 import Memory, MemoryClient
|
|
5
4
|
|
|
6
5
|
from langflow.base.memory.model import LCChatMemoryComponent
|
|
7
|
-
from langflow.inputs.inputs import
|
|
8
|
-
DictInput,
|
|
9
|
-
HandleInput,
|
|
10
|
-
MessageTextInput,
|
|
11
|
-
NestedDictInput,
|
|
12
|
-
SecretStrInput,
|
|
13
|
-
)
|
|
6
|
+
from langflow.inputs.inputs import DictInput, HandleInput, MessageTextInput, NestedDictInput, SecretStrInput
|
|
14
7
|
from langflow.io import Output
|
|
8
|
+
from langflow.logging.logger import logger
|
|
15
9
|
from langflow.schema.data import Data
|
|
16
10
|
|
|
17
11
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, Any
|
|
4
|
+
|
|
5
|
+
from langflow.components._importing import import_mod
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from .milvus import MilvusVectorStoreComponent
|
|
9
|
+
|
|
10
|
+
_dynamic_imports = {
|
|
11
|
+
"MilvusVectorStoreComponent": "milvus",
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"MilvusVectorStoreComponent",
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def __getattr__(attr_name: str) -> Any:
|
|
20
|
+
"""Lazily import Milvus components on attribute access."""
|
|
21
|
+
if attr_name not in _dynamic_imports:
|
|
22
|
+
msg = f"module '{__name__}' has no attribute '{attr_name}'"
|
|
23
|
+
raise AttributeError(msg)
|
|
24
|
+
try:
|
|
25
|
+
result = import_mod(attr_name, _dynamic_imports[attr_name], __spec__.parent)
|
|
26
|
+
except (ModuleNotFoundError, ImportError, AttributeError) as e:
|
|
27
|
+
msg = f"Could not import '{attr_name}' from '{__name__}': {e}"
|
|
28
|
+
raise AttributeError(msg) from e
|
|
29
|
+
globals()[attr_name] = result
|
|
30
|
+
return result
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def __dir__() -> list[str]:
|
|
34
|
+
return list(__all__)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, Any
|
|
4
|
+
|
|
5
|
+
from langflow.components._importing import import_mod
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from .mongodb_atlas import MongoVectorStoreComponent
|
|
9
|
+
|
|
10
|
+
_dynamic_imports = {
|
|
11
|
+
"MongoVectorStoreComponent": "mongodb_atlas",
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"MongoVectorStoreComponent",
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def __getattr__(attr_name: str) -> Any:
|
|
20
|
+
"""Lazily import MongoDB components on attribute access."""
|
|
21
|
+
if attr_name not in _dynamic_imports:
|
|
22
|
+
msg = f"module '{__name__}' has no attribute '{attr_name}'"
|
|
23
|
+
raise AttributeError(msg)
|
|
24
|
+
try:
|
|
25
|
+
result = import_mod(attr_name, _dynamic_imports[attr_name], __spec__.parent)
|
|
26
|
+
except (ModuleNotFoundError, ImportError, AttributeError) as e:
|
|
27
|
+
msg = f"Could not import '{attr_name}' from '{__name__}': {e}"
|
|
28
|
+
raise AttributeError(msg) from e
|
|
29
|
+
globals()[attr_name] = result
|
|
30
|
+
return result
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def __dir__() -> list[str]:
|
|
34
|
+
return list(__all__)
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
from typing import Any
|
|
2
2
|
|
|
3
|
-
from loguru import logger
|
|
4
3
|
from requests.exceptions import ConnectionError # noqa: A004
|
|
5
4
|
from urllib3.exceptions import MaxRetryError, NameResolutionError
|
|
6
5
|
|
|
@@ -8,6 +7,7 @@ from langflow.base.models.model import LCModelComponent
|
|
|
8
7
|
from langflow.field_typing import LanguageModel
|
|
9
8
|
from langflow.field_typing.range_spec import RangeSpec
|
|
10
9
|
from langflow.inputs.inputs import BoolInput, DropdownInput, IntInput, MessageTextInput, SecretStrInput, SliderInput
|
|
10
|
+
from langflow.logging.logger import logger
|
|
11
11
|
from langflow.schema.dotdict import dotdict
|
|
12
12
|
|
|
13
13
|
|
|
@@ -97,7 +97,7 @@ class NVIDIAModelComponent(LCModelComponent):
|
|
|
97
97
|
),
|
|
98
98
|
]
|
|
99
99
|
|
|
100
|
-
def get_models(self, tool_model_enabled: bool | None = None) -> list[str]:
|
|
100
|
+
def get_models(self, *, tool_model_enabled: bool | None = None) -> list[str]:
|
|
101
101
|
try:
|
|
102
102
|
from langchain_nvidia_ai_endpoints import ChatNVIDIA
|
|
103
103
|
except ImportError as e:
|
|
@@ -114,7 +114,7 @@ class NVIDIAModelComponent(LCModelComponent):
|
|
|
114
114
|
def update_build_config(self, build_config: dotdict, _field_value: Any, field_name: str | None = None):
|
|
115
115
|
if field_name in {"model_name", "tool_model_enabled", "base_url", "api_key"}:
|
|
116
116
|
try:
|
|
117
|
-
ids = self.get_models(self.tool_model_enabled)
|
|
117
|
+
ids = self.get_models(tool_model_enabled=self.tool_model_enabled)
|
|
118
118
|
build_config["model_name"]["options"] = ids
|
|
119
119
|
|
|
120
120
|
if "value" not in build_config["model_name"] or build_config["model_name"]["value"] is None:
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import json
|
|
2
2
|
|
|
3
3
|
import httpx
|
|
4
|
-
from loguru import logger
|
|
5
4
|
|
|
6
5
|
from langflow.custom.custom_component.component import Component
|
|
7
6
|
from langflow.io import MessageTextInput, Output
|
|
7
|
+
from langflow.logging.logger import logger
|
|
8
8
|
from langflow.schema.data import Data
|
|
9
9
|
|
|
10
10
|
|
|
@@ -83,7 +83,7 @@ class OlivyaComponent(Component):
|
|
|
83
83
|
"Content-Type": "application/json",
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
logger.
|
|
86
|
+
await logger.ainfo("Sending POST request with payload: %s", payload)
|
|
87
87
|
|
|
88
88
|
# Send the POST request with a timeout
|
|
89
89
|
async with httpx.AsyncClient() as client:
|
|
@@ -97,19 +97,19 @@ class OlivyaComponent(Component):
|
|
|
97
97
|
|
|
98
98
|
# Parse and return the successful response
|
|
99
99
|
response_data = response.json()
|
|
100
|
-
logger.
|
|
100
|
+
await logger.ainfo("Request successful: %s", response_data)
|
|
101
101
|
|
|
102
102
|
except httpx.HTTPStatusError as http_err:
|
|
103
|
-
logger.
|
|
103
|
+
await logger.aexception("HTTP error occurred")
|
|
104
104
|
response_data = {"error": f"HTTP error occurred: {http_err}", "response_text": response.text}
|
|
105
105
|
except httpx.RequestError as req_err:
|
|
106
|
-
logger.
|
|
106
|
+
await logger.aexception("Request failed")
|
|
107
107
|
response_data = {"error": f"Request failed: {req_err}"}
|
|
108
108
|
except json.JSONDecodeError as json_err:
|
|
109
|
-
logger.
|
|
109
|
+
await logger.aexception("Response parsing failed")
|
|
110
110
|
response_data = {"error": f"Response parsing failed: {json_err}", "raw_response": response.text}
|
|
111
111
|
except Exception as e: # noqa: BLE001
|
|
112
|
-
logger.
|
|
112
|
+
await logger.aexception("An unexpected error occurred")
|
|
113
113
|
response_data = {"error": f"An unexpected error occurred: {e!s}"}
|
|
114
114
|
|
|
115
115
|
# Return the response as part of the output
|
|
@@ -34,6 +34,7 @@ class ChatOllamaComponent(LCModelComponent):
|
|
|
34
34
|
display_name="Base URL",
|
|
35
35
|
info="Endpoint of the Ollama API.",
|
|
36
36
|
value="",
|
|
37
|
+
real_time_refresh=True,
|
|
37
38
|
),
|
|
38
39
|
DropdownInput(
|
|
39
40
|
name="model_name",
|
|
@@ -245,11 +246,13 @@ class ChatOllamaComponent(LCModelComponent):
|
|
|
245
246
|
if field_name in {"model_name", "base_url", "tool_model_enabled"}:
|
|
246
247
|
if await self.is_valid_ollama_url(self.base_url):
|
|
247
248
|
tool_model_enabled = build_config["tool_model_enabled"].get("value", False) or self.tool_model_enabled
|
|
248
|
-
build_config["model_name"]["options"] = await self.get_models(
|
|
249
|
+
build_config["model_name"]["options"] = await self.get_models(
|
|
250
|
+
self.base_url, tool_model_enabled=tool_model_enabled
|
|
251
|
+
)
|
|
249
252
|
elif await self.is_valid_ollama_url(build_config["base_url"].get("value", "")):
|
|
250
253
|
tool_model_enabled = build_config["tool_model_enabled"].get("value", False) or self.tool_model_enabled
|
|
251
254
|
build_config["model_name"]["options"] = await self.get_models(
|
|
252
|
-
build_config["base_url"].get("value", ""), tool_model_enabled
|
|
255
|
+
build_config["base_url"].get("value", ""), tool_model_enabled=tool_model_enabled
|
|
253
256
|
)
|
|
254
257
|
else:
|
|
255
258
|
build_config["model_name"]["options"] = []
|
|
@@ -265,7 +268,7 @@ class ChatOllamaComponent(LCModelComponent):
|
|
|
265
268
|
|
|
266
269
|
return build_config
|
|
267
270
|
|
|
268
|
-
async def get_models(self, base_url_value: str, tool_model_enabled: bool | None = None) -> list[str]:
|
|
271
|
+
async def get_models(self, base_url_value: str, *, tool_model_enabled: bool | None = None) -> list[str]:
|
|
269
272
|
"""Fetches a list of models from the Ollama API that do not have the "embedding" capability.
|
|
270
273
|
|
|
271
274
|
Args:
|
|
@@ -298,13 +301,13 @@ class ChatOllamaComponent(LCModelComponent):
|
|
|
298
301
|
models = tags_response.json()
|
|
299
302
|
if asyncio.iscoroutine(models):
|
|
300
303
|
models = await models
|
|
301
|
-
logger.
|
|
304
|
+
await logger.adebug(f"Available models: {models}")
|
|
302
305
|
|
|
303
306
|
# Filter models that are NOT embedding models
|
|
304
307
|
model_ids = []
|
|
305
308
|
for model in models[self.JSON_MODELS_KEY]:
|
|
306
309
|
model_name = model[self.JSON_NAME_KEY]
|
|
307
|
-
logger.
|
|
310
|
+
await logger.adebug(f"Checking model: {model_name}")
|
|
308
311
|
|
|
309
312
|
payload = {"model": model_name}
|
|
310
313
|
show_response = await client.post(show_url, json=payload)
|
|
@@ -313,7 +316,7 @@ class ChatOllamaComponent(LCModelComponent):
|
|
|
313
316
|
if asyncio.iscoroutine(json_data):
|
|
314
317
|
json_data = await json_data
|
|
315
318
|
capabilities = json_data.get(self.JSON_CAPABILITIES_KEY, [])
|
|
316
|
-
logger.
|
|
319
|
+
await logger.adebug(f"Model: {model_name}, Capabilities: {capabilities}")
|
|
317
320
|
|
|
318
321
|
if self.DESIRED_CAPABILITY in capabilities and (
|
|
319
322
|
not tool_model_enabled or self.TOOL_CALLING_CAPABILITY in capabilities
|
|
@@ -31,9 +31,7 @@ class PerplexityComponent(LCModelComponent):
|
|
|
31
31
|
],
|
|
32
32
|
value="llama-3.1-sonar-small-128k-online",
|
|
33
33
|
),
|
|
34
|
-
IntInput(
|
|
35
|
-
name="max_output_tokens", display_name="Max Output Tokens", info="The maximum number of tokens to generate."
|
|
36
|
-
),
|
|
34
|
+
IntInput(name="max_tokens", display_name="Max Output Tokens", info="The maximum number of tokens to generate."),
|
|
37
35
|
SecretStrInput(
|
|
38
36
|
name="api_key",
|
|
39
37
|
display_name="Perplexity API Key",
|
|
@@ -57,20 +55,13 @@ class PerplexityComponent(LCModelComponent):
|
|
|
57
55
|
"Note that the API may not return the full n completions if duplicates are generated.",
|
|
58
56
|
advanced=True,
|
|
59
57
|
),
|
|
60
|
-
IntInput(
|
|
61
|
-
name="top_k",
|
|
62
|
-
display_name="Top K",
|
|
63
|
-
info="Decode using top-k sampling: consider the set of top_k most probable tokens. Must be positive.",
|
|
64
|
-
advanced=True,
|
|
65
|
-
),
|
|
66
58
|
]
|
|
67
59
|
|
|
68
60
|
def build_model(self) -> LanguageModel: # type: ignore[type-var]
|
|
69
61
|
api_key = SecretStr(self.api_key).get_secret_value()
|
|
70
62
|
temperature = self.temperature
|
|
71
63
|
model = self.model_name
|
|
72
|
-
|
|
73
|
-
top_k = self.top_k
|
|
64
|
+
max_tokens = self.max_tokens
|
|
74
65
|
top_p = self.top_p
|
|
75
66
|
n = self.n
|
|
76
67
|
|
|
@@ -78,8 +69,7 @@ class PerplexityComponent(LCModelComponent):
|
|
|
78
69
|
model=model,
|
|
79
70
|
temperature=temperature or 0.75,
|
|
80
71
|
pplx_api_key=api_key,
|
|
81
|
-
top_k=top_k or None,
|
|
82
72
|
top_p=top_p or None,
|
|
83
73
|
n=n or 1,
|
|
84
|
-
|
|
74
|
+
max_tokens=max_tokens,
|
|
85
75
|
)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, Any
|
|
4
|
+
|
|
5
|
+
from langflow.components._importing import import_mod
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from .pgvector import PGVectorStoreComponent
|
|
9
|
+
|
|
10
|
+
_dynamic_imports = {
|
|
11
|
+
"PGVectorStoreComponent": "pgvector",
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"PGVectorStoreComponent",
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def __getattr__(attr_name: str) -> Any:
|
|
20
|
+
"""Lazily import pgvector components on attribute access."""
|
|
21
|
+
if attr_name not in _dynamic_imports:
|
|
22
|
+
msg = f"module '{__name__}' has no attribute '{attr_name}'"
|
|
23
|
+
raise AttributeError(msg)
|
|
24
|
+
try:
|
|
25
|
+
result = import_mod(attr_name, _dynamic_imports[attr_name], __spec__.parent)
|
|
26
|
+
except (ModuleNotFoundError, ImportError, AttributeError) as e:
|
|
27
|
+
msg = f"Could not import '{attr_name}' from '{__name__}': {e}"
|
|
28
|
+
raise AttributeError(msg) from e
|
|
29
|
+
globals()[attr_name] = result
|
|
30
|
+
return result
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def __dir__() -> list[str]:
|
|
34
|
+
return list(__all__)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, Any
|
|
4
|
+
|
|
5
|
+
from langflow.components._importing import import_mod
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from .pinecone import PineconeVectorStoreComponent
|
|
9
|
+
|
|
10
|
+
_dynamic_imports = {
|
|
11
|
+
"PineconeVectorStoreComponent": "pinecone",
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"PineconeVectorStoreComponent",
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def __getattr__(attr_name: str) -> Any:
|
|
20
|
+
"""Lazily import Pinecone components on attribute access."""
|
|
21
|
+
if attr_name not in _dynamic_imports:
|
|
22
|
+
msg = f"module '{__name__}' has no attribute '{attr_name}'"
|
|
23
|
+
raise AttributeError(msg)
|
|
24
|
+
try:
|
|
25
|
+
result = import_mod(attr_name, _dynamic_imports[attr_name], __spec__.parent)
|
|
26
|
+
except (ModuleNotFoundError, ImportError, AttributeError) as e:
|
|
27
|
+
msg = f"Could not import '{attr_name}' from '{__name__}': {e}"
|
|
28
|
+
raise AttributeError(msg) from e
|
|
29
|
+
globals()[attr_name] = result
|
|
30
|
+
return result
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def __dir__() -> list[str]:
|
|
34
|
+
return list(__all__)
|
|
@@ -3,10 +3,10 @@ from __future__ import annotations
|
|
|
3
3
|
from typing import TYPE_CHECKING, Any, cast
|
|
4
4
|
|
|
5
5
|
import toml # type: ignore[import-untyped]
|
|
6
|
-
from loguru import logger
|
|
7
6
|
|
|
8
7
|
from langflow.custom.custom_component.component import Component
|
|
9
8
|
from langflow.io import BoolInput, DataFrameInput, HandleInput, MessageTextInput, MultilineInput, Output
|
|
9
|
+
from langflow.logging.logger import logger
|
|
10
10
|
from langflow.schema.dataframe import DataFrame
|
|
11
11
|
|
|
12
12
|
if TYPE_CHECKING:
|
|
@@ -144,11 +144,11 @@ class BatchRunComponent(Component):
|
|
|
144
144
|
user_texts = df[col_name].astype(str).tolist()
|
|
145
145
|
else:
|
|
146
146
|
user_texts = [
|
|
147
|
-
self._format_row_as_toml(cast(dict[str, Any], row)) for row in df.to_dict(orient="records")
|
|
147
|
+
self._format_row_as_toml(cast("dict[str, Any]", row)) for row in df.to_dict(orient="records")
|
|
148
148
|
]
|
|
149
149
|
|
|
150
150
|
total_rows = len(user_texts)
|
|
151
|
-
logger.
|
|
151
|
+
await logger.ainfo(f"Processing {total_rows} rows with batch run")
|
|
152
152
|
|
|
153
153
|
# Prepare the batch of conversations
|
|
154
154
|
conversations = [
|
|
@@ -185,21 +185,21 @@ class BatchRunComponent(Component):
|
|
|
185
185
|
):
|
|
186
186
|
response_text = response[1].content if hasattr(response[1], "content") else str(response[1])
|
|
187
187
|
row = self._create_base_row(
|
|
188
|
-
cast(dict[str, Any], original_row), model_response=response_text, batch_index=idx
|
|
188
|
+
cast("dict[str, Any]", original_row), model_response=response_text, batch_index=idx
|
|
189
189
|
)
|
|
190
190
|
self._add_metadata(row, success=True, system_msg=system_msg)
|
|
191
191
|
rows.append(row)
|
|
192
192
|
|
|
193
193
|
# Log progress
|
|
194
194
|
if (idx + 1) % max(1, total_rows // 10) == 0:
|
|
195
|
-
logger.
|
|
195
|
+
await logger.ainfo(f"Processed {idx + 1}/{total_rows} rows")
|
|
196
196
|
|
|
197
|
-
logger.
|
|
197
|
+
await logger.ainfo("Batch processing completed successfully")
|
|
198
198
|
return DataFrame(rows)
|
|
199
199
|
|
|
200
200
|
except (KeyError, AttributeError) as e:
|
|
201
201
|
# Handle data structure and attribute access errors
|
|
202
|
-
logger.
|
|
203
|
-
error_row = self._create_base_row(
|
|
202
|
+
await logger.aerror(f"Data processing error: {e!s}")
|
|
203
|
+
error_row = self._create_base_row(dict.fromkeys(df.columns, ""), model_response="", batch_index=-1)
|
|
204
204
|
self._add_metadata(error_row, success=False, error=str(e))
|
|
205
205
|
return DataFrame([error_row])
|
|
@@ -181,7 +181,7 @@ class DataOperationsComponent(Component):
|
|
|
181
181
|
raise ValueError(msg)
|
|
182
182
|
|
|
183
183
|
# Data transformation operations
|
|
184
|
-
def select_keys(self, evaluate: bool | None = None) -> Data:
|
|
184
|
+
def select_keys(self, *, evaluate: bool | None = None) -> Data:
|
|
185
185
|
"""Select specific keys from the data dictionary."""
|
|
186
186
|
self.validate_single_data("Select Keys")
|
|
187
187
|
data_dict = self.get_normalized_data()
|
|
@@ -266,7 +266,7 @@ class DataOperationsComponent(Component):
|
|
|
266
266
|
logger.info("evaluating data")
|
|
267
267
|
return Data(**self.recursive_eval(self.get_data_dict()))
|
|
268
268
|
|
|
269
|
-
def combine_data(self, evaluate: bool | None = None) -> Data:
|
|
269
|
+
def combine_data(self, *, evaluate: bool | None = None) -> Data:
|
|
270
270
|
"""Combine multiple data objects into one."""
|
|
271
271
|
logger.info("combining data")
|
|
272
272
|
if not self.data_is_list():
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
from enum import Enum
|
|
2
2
|
from typing import cast
|
|
3
3
|
|
|
4
|
-
from loguru import logger
|
|
5
|
-
|
|
6
4
|
from langflow.custom.custom_component.component import Component
|
|
7
5
|
from langflow.io import DataInput, DropdownInput, Output
|
|
6
|
+
from langflow.logging.logger import logger
|
|
8
7
|
from langflow.schema.dataframe import DataFrame
|
|
9
8
|
|
|
10
9
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
from loguru import logger
|
|
2
|
-
|
|
3
1
|
from langflow.custom.custom_component.component import Component
|
|
4
2
|
from langflow.io import MessageInput, Output
|
|
3
|
+
from langflow.logging.logger import logger
|
|
5
4
|
from langflow.schema.data import Data
|
|
6
5
|
from langflow.schema.message import Message
|
|
7
6
|
|
|
@@ -32,6 +31,6 @@ class MessageToDataComponent(Component):
|
|
|
32
31
|
return Data(data=self.message.data)
|
|
33
32
|
|
|
34
33
|
msg = "Error converting Message to Data: Input must be a Message object"
|
|
35
|
-
logger.
|
|
34
|
+
logger.debug(msg, exc_info=True)
|
|
36
35
|
self.status = msg
|
|
37
36
|
return Data(data={"error": msg})
|
|
@@ -3,11 +3,11 @@ from json import JSONDecodeError
|
|
|
3
3
|
|
|
4
4
|
import jq
|
|
5
5
|
from json_repair import repair_json
|
|
6
|
-
from loguru import logger
|
|
7
6
|
|
|
8
7
|
from langflow.custom.custom_component.component import Component
|
|
9
8
|
from langflow.inputs.inputs import HandleInput, MessageTextInput
|
|
10
9
|
from langflow.io import Output
|
|
10
|
+
from langflow.logging.logger import logger
|
|
11
11
|
from langflow.schema.data import Data
|
|
12
12
|
from langflow.schema.message import Message
|
|
13
13
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
from collections.abc import Callable
|
|
2
2
|
|
|
3
|
-
from loguru import logger
|
|
4
|
-
|
|
5
3
|
from langflow.custom.custom_component.component import Component
|
|
6
4
|
from langflow.custom.utils import get_function
|
|
7
5
|
from langflow.io import CodeInput, Output
|
|
6
|
+
from langflow.logging.logger import logger
|
|
8
7
|
from langflow.schema.data import Data
|
|
9
8
|
from langflow.schema.dotdict import dotdict
|
|
10
9
|
from langflow.schema.message import Message
|
|
@@ -58,7 +57,7 @@ class PythonFunctionComponent(Component):
|
|
|
58
57
|
func = get_function(function_code)
|
|
59
58
|
return func()
|
|
60
59
|
except Exception as e: # noqa: BLE001
|
|
61
|
-
logger.
|
|
60
|
+
logger.debug("Error executing function", exc_info=True)
|
|
62
61
|
return f"Error executing function: {e}"
|
|
63
62
|
|
|
64
63
|
def execute_function_data(self) -> list[Data]:
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, Any
|
|
4
|
+
|
|
5
|
+
from langflow.components._importing import import_mod
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from .qdrant import QdrantVectorStoreComponent
|
|
9
|
+
|
|
10
|
+
_dynamic_imports = {
|
|
11
|
+
"QdrantVectorStoreComponent": "qdrant",
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"QdrantVectorStoreComponent",
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def __getattr__(attr_name: str) -> Any:
|
|
20
|
+
"""Lazily import Qdrant components on attribute access."""
|
|
21
|
+
if attr_name not in _dynamic_imports:
|
|
22
|
+
msg = f"module '{__name__}' has no attribute '{attr_name}'"
|
|
23
|
+
raise AttributeError(msg)
|
|
24
|
+
try:
|
|
25
|
+
result = import_mod(attr_name, _dynamic_imports[attr_name], __spec__.parent)
|
|
26
|
+
except (ModuleNotFoundError, ImportError, AttributeError) as e:
|
|
27
|
+
msg = f"Could not import '{attr_name}' from '{__name__}': {e}"
|
|
28
|
+
raise AttributeError(msg) from e
|
|
29
|
+
globals()[attr_name] = result
|
|
30
|
+
return result
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def __dir__() -> list[str]:
|
|
34
|
+
return list(__all__)
|
|
@@ -1,3 +1,37 @@
|
|
|
1
|
-
from
|
|
1
|
+
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
from typing import TYPE_CHECKING, Any
|
|
4
|
+
|
|
5
|
+
from langflow.components._importing import import_mod
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from .redis import RedisVectorStoreComponent
|
|
9
|
+
from .redis_chat import RedisIndexChatMemory
|
|
10
|
+
|
|
11
|
+
_dynamic_imports = {
|
|
12
|
+
"RedisVectorStoreComponent": "redis",
|
|
13
|
+
"RedisIndexChatMemory": "redis_chat",
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
__all__ = [
|
|
17
|
+
"RedisIndexChatMemory",
|
|
18
|
+
"RedisVectorStoreComponent",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def __getattr__(attr_name: str) -> Any:
|
|
23
|
+
"""Lazily import Redis components on attribute access."""
|
|
24
|
+
if attr_name not in _dynamic_imports:
|
|
25
|
+
msg = f"module '{__name__}' has no attribute '{attr_name}'"
|
|
26
|
+
raise AttributeError(msg)
|
|
27
|
+
try:
|
|
28
|
+
result = import_mod(attr_name, _dynamic_imports[attr_name], __spec__.parent)
|
|
29
|
+
except (ModuleNotFoundError, ImportError, AttributeError) as e:
|
|
30
|
+
msg = f"Could not import '{attr_name}' from '{__name__}': {e}"
|
|
31
|
+
raise AttributeError(msg) from e
|
|
32
|
+
globals()[attr_name] = result
|
|
33
|
+
return result
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def __dir__() -> list[str]:
|
|
37
|
+
return list(__all__)
|