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,43 +1,89 @@
|
|
|
1
|
-
from
|
|
1
|
+
from pathlib import Path
|
|
2
2
|
|
|
3
|
-
from
|
|
3
|
+
from langchain.text_splitter import CharacterTextSplitter
|
|
4
|
+
from langchain_community.vectorstores.redis import Redis
|
|
4
5
|
|
|
5
|
-
from langflow.base.
|
|
6
|
-
from langflow.
|
|
7
|
-
from langflow.
|
|
6
|
+
from langflow.base.vectorstores.model import LCVectorStoreComponent, check_cached_vector_store
|
|
7
|
+
from langflow.helpers.data import docs_to_data
|
|
8
|
+
from langflow.io import HandleInput, IntInput, SecretStrInput, StrInput
|
|
9
|
+
from langflow.schema.data import Data
|
|
8
10
|
|
|
9
11
|
|
|
10
|
-
class
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
class RedisVectorStoreComponent(LCVectorStoreComponent):
|
|
13
|
+
"""A custom component for implementing a Vector Store using Redis."""
|
|
14
|
+
|
|
15
|
+
display_name: str = "Redis"
|
|
16
|
+
description: str = "Implementation of Vector Store using Redis"
|
|
17
|
+
name = "Redis"
|
|
14
18
|
icon = "Redis"
|
|
15
19
|
|
|
16
20
|
inputs = [
|
|
21
|
+
SecretStrInput(name="redis_server_url", display_name="Redis Server Connection String", required=True),
|
|
17
22
|
StrInput(
|
|
18
|
-
name="
|
|
19
|
-
|
|
20
|
-
IntInput(name="port", display_name="port", required=True, value=6379, info="Redis Port Number."),
|
|
21
|
-
StrInput(name="database", display_name="database", required=True, value="0", info="Redis database."),
|
|
22
|
-
MessageTextInput(
|
|
23
|
-
name="username", display_name="Username", value="", info="The Redis user name.", advanced=True
|
|
23
|
+
name="redis_index_name",
|
|
24
|
+
display_name="Redis Index",
|
|
24
25
|
),
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
StrInput(name="code", display_name="Code", advanced=True),
|
|
27
|
+
StrInput(
|
|
28
|
+
name="schema",
|
|
29
|
+
display_name="Schema",
|
|
27
30
|
),
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
name="
|
|
31
|
+
*LCVectorStoreComponent.inputs,
|
|
32
|
+
IntInput(
|
|
33
|
+
name="number_of_results",
|
|
34
|
+
display_name="Number of Results",
|
|
35
|
+
info="Number of results to return.",
|
|
36
|
+
value=4,
|
|
37
|
+
advanced=True,
|
|
31
38
|
),
|
|
39
|
+
HandleInput(name="embedding", display_name="Embedding", input_types=["Embeddings"]),
|
|
32
40
|
]
|
|
33
41
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
@check_cached_vector_store
|
|
43
|
+
def build_vector_store(self) -> Redis:
|
|
44
|
+
# Convert DataFrame to Data if needed using parent's method
|
|
45
|
+
self.ingest_data = self._prepare_ingest_data()
|
|
46
|
+
|
|
47
|
+
documents = []
|
|
48
|
+
for _input in self.ingest_data or []:
|
|
49
|
+
if isinstance(_input, Data):
|
|
50
|
+
documents.append(_input.to_lc_document())
|
|
51
|
+
else:
|
|
52
|
+
documents.append(_input)
|
|
53
|
+
Path("docuemnts.txt").write_text(str(documents), encoding="utf-8")
|
|
54
|
+
|
|
55
|
+
if not documents:
|
|
56
|
+
if self.schema is None:
|
|
57
|
+
msg = "If no documents are provided, a schema must be provided."
|
|
58
|
+
raise ValueError(msg)
|
|
59
|
+
redis_vs = Redis.from_existing_index(
|
|
60
|
+
embedding=self.embedding,
|
|
61
|
+
index_name=self.redis_index_name,
|
|
62
|
+
schema=self.schema,
|
|
63
|
+
key_prefix=None,
|
|
64
|
+
redis_url=self.redis_server_url,
|
|
65
|
+
)
|
|
66
|
+
else:
|
|
67
|
+
text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
|
|
68
|
+
docs = text_splitter.split_documents(documents)
|
|
69
|
+
redis_vs = Redis.from_documents(
|
|
70
|
+
documents=docs,
|
|
71
|
+
embedding=self.embedding,
|
|
72
|
+
redis_url=self.redis_server_url,
|
|
73
|
+
index_name=self.redis_index_name,
|
|
74
|
+
)
|
|
75
|
+
return redis_vs
|
|
76
|
+
|
|
77
|
+
def search_documents(self) -> list[Data]:
|
|
78
|
+
vector_store = self.build_vector_store()
|
|
79
|
+
|
|
80
|
+
if self.search_query and isinstance(self.search_query, str) and self.search_query.strip():
|
|
81
|
+
docs = vector_store.similarity_search(
|
|
82
|
+
query=self.search_query,
|
|
83
|
+
k=self.number_of_results,
|
|
84
|
+
)
|
|
41
85
|
|
|
42
|
-
|
|
43
|
-
|
|
86
|
+
data = docs_to_data(docs)
|
|
87
|
+
self.status = data
|
|
88
|
+
return data
|
|
89
|
+
return []
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
from urllib import parse
|
|
2
|
+
|
|
3
|
+
from langchain_community.chat_message_histories.redis import RedisChatMessageHistory
|
|
4
|
+
|
|
5
|
+
from langflow.base.memory.model import LCChatMemoryComponent
|
|
6
|
+
from langflow.field_typing.constants import Memory
|
|
7
|
+
from langflow.inputs.inputs import IntInput, MessageTextInput, SecretStrInput, StrInput
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class RedisIndexChatMemory(LCChatMemoryComponent):
|
|
11
|
+
display_name = "Redis Chat Memory"
|
|
12
|
+
description = "Retrieves and store chat messages from Redis."
|
|
13
|
+
name = "RedisChatMemory"
|
|
14
|
+
icon = "Redis"
|
|
15
|
+
|
|
16
|
+
inputs = [
|
|
17
|
+
StrInput(
|
|
18
|
+
name="host", display_name="hostname", required=True, value="localhost", info="IP address or hostname."
|
|
19
|
+
),
|
|
20
|
+
IntInput(name="port", display_name="port", required=True, value=6379, info="Redis Port Number."),
|
|
21
|
+
StrInput(name="database", display_name="database", required=True, value="0", info="Redis database."),
|
|
22
|
+
MessageTextInput(
|
|
23
|
+
name="username", display_name="Username", value="", info="The Redis user name.", advanced=True
|
|
24
|
+
),
|
|
25
|
+
SecretStrInput(
|
|
26
|
+
name="password", display_name="Password", value="", info="The password for username.", advanced=True
|
|
27
|
+
),
|
|
28
|
+
StrInput(name="key_prefix", display_name="Key prefix", info="Key prefix.", advanced=True),
|
|
29
|
+
MessageTextInput(
|
|
30
|
+
name="session_id", display_name="Session ID", info="Session ID for the message.", advanced=True
|
|
31
|
+
),
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
def build_message_history(self) -> Memory:
|
|
35
|
+
kwargs = {}
|
|
36
|
+
password: str | None = self.password
|
|
37
|
+
if self.key_prefix:
|
|
38
|
+
kwargs["key_prefix"] = self.key_prefix
|
|
39
|
+
if password:
|
|
40
|
+
password = parse.quote_plus(password)
|
|
41
|
+
|
|
42
|
+
url = f"redis://{self.username}:{self.password}@{self.host}:{self.port}/{self.database}"
|
|
43
|
+
return RedisChatMessageHistory(session_id=self.session_id, url=url, **kwargs)
|
|
@@ -2,12 +2,12 @@ from typing import Any
|
|
|
2
2
|
|
|
3
3
|
from langchain_community.utilities.serpapi import SerpAPIWrapper
|
|
4
4
|
from langchain_core.tools import ToolException
|
|
5
|
-
from loguru import logger
|
|
6
5
|
from pydantic import BaseModel, Field
|
|
7
6
|
|
|
8
7
|
from langflow.custom.custom_component.component import Component
|
|
9
8
|
from langflow.inputs.inputs import DictInput, IntInput, MultilineInput, SecretStrInput
|
|
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
|
|
|
@@ -0,0 +1,37 @@
|
|
|
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 .supabase import SupabaseVectorStoreComponent
|
|
9
|
+
from .supabase_composio import SupabaseComposioComponent
|
|
10
|
+
|
|
11
|
+
_dynamic_imports = {
|
|
12
|
+
"SupabaseVectorStoreComponent": "supabase",
|
|
13
|
+
"SupabaseComposioComponent": "supabase_composio",
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
__all__ = [
|
|
17
|
+
"SupabaseComposioComponent",
|
|
18
|
+
"SupabaseVectorStoreComponent",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def __getattr__(attr_name: str) -> Any:
|
|
23
|
+
"""Lazily import Supabase 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__)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import httpx
|
|
2
|
-
from loguru import logger
|
|
3
2
|
|
|
4
3
|
from langflow.custom import Component
|
|
5
4
|
from langflow.io import BoolInput, DropdownInput, MessageTextInput, Output, SecretStrInput
|
|
5
|
+
from langflow.logging.logger import logger
|
|
6
6
|
from langflow.schema import Data
|
|
7
7
|
from langflow.schema.dataframe import DataFrame
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import httpx
|
|
2
|
-
from loguru import logger
|
|
3
2
|
|
|
4
3
|
from langflow.custom.custom_component.component import Component
|
|
5
4
|
from langflow.inputs.inputs import BoolInput, DropdownInput, IntInput, MessageTextInput, SecretStrInput
|
|
5
|
+
from langflow.logging.logger import logger
|
|
6
6
|
from langflow.schema.data import Data
|
|
7
7
|
from langflow.schema.dataframe import DataFrame
|
|
8
8
|
from langflow.template.field.base import Output
|
|
@@ -3,12 +3,12 @@ import operator
|
|
|
3
3
|
|
|
4
4
|
from langchain.tools import StructuredTool
|
|
5
5
|
from langchain_core.tools import ToolException
|
|
6
|
-
from loguru import logger
|
|
7
6
|
from pydantic import BaseModel, Field
|
|
8
7
|
|
|
9
8
|
from langflow.base.langchain_utilities.model import LCToolComponent
|
|
10
9
|
from langflow.field_typing import Tool
|
|
11
10
|
from langflow.inputs.inputs import MessageTextInput
|
|
11
|
+
from langflow.logging.logger import logger
|
|
12
12
|
from langflow.schema.data import Data
|
|
13
13
|
|
|
14
14
|
|
|
@@ -87,7 +87,7 @@ class CalculatorToolComponent(LCToolComponent):
|
|
|
87
87
|
self.status = error_message
|
|
88
88
|
return [Data(data={"error": error_message, "input": expression})]
|
|
89
89
|
except Exception as e: # noqa: BLE001
|
|
90
|
-
logger.
|
|
90
|
+
logger.debug("Error evaluating expression", exc_info=True)
|
|
91
91
|
error_message = f"Error: {e}"
|
|
92
92
|
self.status = error_message
|
|
93
93
|
return [Data(data={"error": error_message, "input": expression})]
|
|
@@ -4,21 +4,14 @@ from typing import Any
|
|
|
4
4
|
|
|
5
5
|
from langchain.agents import Tool
|
|
6
6
|
from langchain_core.tools import StructuredTool
|
|
7
|
-
from loguru import logger
|
|
8
7
|
from pydantic.v1 import Field, create_model
|
|
9
8
|
from pydantic.v1.fields import Undefined
|
|
10
9
|
from typing_extensions import override
|
|
11
10
|
|
|
12
11
|
from langflow.base.langchain_utilities.model import LCToolComponent
|
|
13
|
-
from langflow.inputs.inputs import
|
|
14
|
-
BoolInput,
|
|
15
|
-
DropdownInput,
|
|
16
|
-
FieldTypes,
|
|
17
|
-
HandleInput,
|
|
18
|
-
MessageTextInput,
|
|
19
|
-
MultilineInput,
|
|
20
|
-
)
|
|
12
|
+
from langflow.inputs.inputs import BoolInput, DropdownInput, FieldTypes, HandleInput, MessageTextInput, MultilineInput
|
|
21
13
|
from langflow.io import Output
|
|
14
|
+
from langflow.logging.logger import logger
|
|
22
15
|
from langflow.schema.data import Data
|
|
23
16
|
from langflow.schema.dotdict import dotdict
|
|
24
17
|
|
|
@@ -139,7 +132,7 @@ class PythonCodeStructuredTool(LCToolComponent):
|
|
|
139
132
|
build_config["tool_function"]["options"] = names
|
|
140
133
|
except Exception as e: # noqa: BLE001
|
|
141
134
|
self.status = f"Failed to extract names: {e}"
|
|
142
|
-
logger.
|
|
135
|
+
logger.debug(self.status, exc_info=True)
|
|
143
136
|
build_config["tool_function"]["options"] = ["Failed to parse", str(e)]
|
|
144
137
|
return build_config
|
|
145
138
|
|
|
@@ -3,12 +3,12 @@ import importlib
|
|
|
3
3
|
from langchain.tools import StructuredTool
|
|
4
4
|
from langchain_core.tools import ToolException
|
|
5
5
|
from langchain_experimental.utilities import PythonREPL
|
|
6
|
-
from loguru import logger
|
|
7
6
|
from pydantic import BaseModel, Field
|
|
8
7
|
|
|
9
8
|
from langflow.base.langchain_utilities.model import LCToolComponent
|
|
10
9
|
from langflow.field_typing import Tool
|
|
11
10
|
from langflow.inputs.inputs import StrInput
|
|
11
|
+
from langflow.logging.logger import logger
|
|
12
12
|
from langflow.schema.data import Data
|
|
13
13
|
|
|
14
14
|
|
|
@@ -78,7 +78,7 @@ class PythonREPLToolComponent(LCToolComponent):
|
|
|
78
78
|
try:
|
|
79
79
|
return python_repl.run(code)
|
|
80
80
|
except Exception as e:
|
|
81
|
-
logger.
|
|
81
|
+
logger.debug("Error running Python code", exc_info=True)
|
|
82
82
|
raise ToolException(str(e)) from e
|
|
83
83
|
|
|
84
84
|
tool = StructuredTool.from_function(
|
|
@@ -5,12 +5,12 @@ from typing import Any
|
|
|
5
5
|
import requests
|
|
6
6
|
from langchain.agents import Tool
|
|
7
7
|
from langchain_core.tools import StructuredTool
|
|
8
|
-
from loguru import logger
|
|
9
8
|
from pydantic.v1 import Field, create_model
|
|
10
9
|
|
|
11
10
|
from langflow.base.langchain_utilities.model import LCToolComponent
|
|
12
11
|
from langflow.inputs.inputs import DropdownInput, IntInput, MessageTextInput, MultiselectInput
|
|
13
12
|
from langflow.io import Output
|
|
13
|
+
from langflow.logging.logger import logger
|
|
14
14
|
from langflow.schema.dotdict import dotdict
|
|
15
15
|
|
|
16
16
|
|
|
@@ -76,7 +76,7 @@ class SearXNGToolComponent(LCToolComponent):
|
|
|
76
76
|
build_config["language"]["options"] = languages.copy()
|
|
77
77
|
except Exception as e: # noqa: BLE001
|
|
78
78
|
self.status = f"Failed to extract names: {e}"
|
|
79
|
-
logger.
|
|
79
|
+
logger.debug(self.status, exc_info=True)
|
|
80
80
|
build_config["categories"]["options"] = ["Failed to parse", str(e)]
|
|
81
81
|
return build_config
|
|
82
82
|
|
|
@@ -112,7 +112,7 @@ class SearXNGToolComponent(LCToolComponent):
|
|
|
112
112
|
num_results = min(SearxSearch._max_results, len(response["results"]))
|
|
113
113
|
return [response["results"][i] for i in range(num_results)]
|
|
114
114
|
except Exception as e: # noqa: BLE001
|
|
115
|
-
logger.
|
|
115
|
+
logger.debug("Error running SearXNG Search", exc_info=True)
|
|
116
116
|
return [f"Failed to search: {e}"]
|
|
117
117
|
|
|
118
118
|
SearxSearch._url = self.url
|
|
@@ -3,12 +3,12 @@ from typing import Any
|
|
|
3
3
|
from langchain.tools import StructuredTool
|
|
4
4
|
from langchain_community.utilities.serpapi import SerpAPIWrapper
|
|
5
5
|
from langchain_core.tools import ToolException
|
|
6
|
-
from loguru import logger
|
|
7
6
|
from pydantic import BaseModel, Field
|
|
8
7
|
|
|
9
8
|
from langflow.base.langchain_utilities.model import LCToolComponent
|
|
10
9
|
from langflow.field_typing import Tool
|
|
11
10
|
from langflow.inputs.inputs import DictInput, IntInput, MultilineInput, SecretStrInput
|
|
11
|
+
from langflow.logging.logger import logger
|
|
12
12
|
from langflow.schema.data import Data
|
|
13
13
|
|
|
14
14
|
|
|
@@ -111,7 +111,7 @@ class SerpAPIComponent(LCToolComponent):
|
|
|
111
111
|
data_list = [Data(data=result, text=result.get("snippet", "")) for result in results]
|
|
112
112
|
|
|
113
113
|
except Exception as e: # noqa: BLE001
|
|
114
|
-
logger.
|
|
114
|
+
logger.debug("Error running SerpAPI", exc_info=True)
|
|
115
115
|
self.status = f"Error: {e}"
|
|
116
116
|
return [Data(data={"error": str(e)}, text=str(e))]
|
|
117
117
|
|
|
@@ -3,12 +3,12 @@ from enum import Enum
|
|
|
3
3
|
import httpx
|
|
4
4
|
from langchain.tools import StructuredTool
|
|
5
5
|
from langchain_core.tools import ToolException
|
|
6
|
-
from loguru import logger
|
|
7
6
|
from pydantic import BaseModel, Field
|
|
8
7
|
|
|
9
8
|
from langflow.base.langchain_utilities.model import LCToolComponent
|
|
10
9
|
from langflow.field_typing import Tool
|
|
11
10
|
from langflow.inputs.inputs import BoolInput, DropdownInput, IntInput, MessageTextInput, SecretStrInput
|
|
11
|
+
from langflow.logging.logger import logger
|
|
12
12
|
from langflow.schema.data import Data
|
|
13
13
|
|
|
14
14
|
# Add at the top with other constants
|
|
@@ -338,7 +338,7 @@ Note: Check 'Advanced' for all options.
|
|
|
338
338
|
raise ToolException(error_message) from e
|
|
339
339
|
except Exception as e:
|
|
340
340
|
error_message = f"Unexpected error: {e}"
|
|
341
|
-
logger.
|
|
341
|
+
logger.debug("Error running Tavily Search", exc_info=True)
|
|
342
342
|
self.status = error_message
|
|
343
343
|
raise ToolException(error_message) from e
|
|
344
344
|
return data_results
|
|
@@ -5,12 +5,12 @@ from enum import Enum
|
|
|
5
5
|
import yfinance as yf
|
|
6
6
|
from langchain.tools import StructuredTool
|
|
7
7
|
from langchain_core.tools import ToolException
|
|
8
|
-
from loguru import logger
|
|
9
8
|
from pydantic import BaseModel, Field
|
|
10
9
|
|
|
11
10
|
from langflow.base.langchain_utilities.model import LCToolComponent
|
|
12
11
|
from langflow.field_typing import Tool
|
|
13
12
|
from langflow.inputs.inputs import DropdownInput, IntInput, MessageTextInput
|
|
13
|
+
from langflow.logging.logger import logger
|
|
14
14
|
from langflow.schema.data import Data
|
|
15
15
|
|
|
16
16
|
|
|
@@ -29,9 +29,9 @@ class TwelveLabsVideoEmbeddings(Embeddings):
|
|
|
29
29
|
|
|
30
30
|
# First try to use video embedding, then fall back to clip embedding if available
|
|
31
31
|
if result["video_embedding"] is not None:
|
|
32
|
-
embeddings.append(cast(list[float], result["video_embedding"]))
|
|
32
|
+
embeddings.append(cast("list[float]", result["video_embedding"]))
|
|
33
33
|
elif result["clip_embeddings"] and len(result["clip_embeddings"]) > 0:
|
|
34
|
-
embeddings.append(cast(list[float], result["clip_embeddings"][0]))
|
|
34
|
+
embeddings.append(cast("list[float]", result["clip_embeddings"][0]))
|
|
35
35
|
else:
|
|
36
36
|
# If neither is available, raise an error
|
|
37
37
|
error_msg = "No embeddings were generated for the video"
|
|
@@ -45,9 +45,9 @@ class TwelveLabsVideoEmbeddings(Embeddings):
|
|
|
45
45
|
|
|
46
46
|
# First try to use video embedding, then fall back to clip embedding if available
|
|
47
47
|
if result["video_embedding"] is not None:
|
|
48
|
-
return cast(list[float], result["video_embedding"])
|
|
48
|
+
return cast("list[float]", result["video_embedding"])
|
|
49
49
|
if result["clip_embeddings"] and len(result["clip_embeddings"]) > 0:
|
|
50
|
-
return cast(list[float], result["clip_embeddings"][0])
|
|
50
|
+
return cast("list[float]", result["clip_embeddings"][0])
|
|
51
51
|
# If neither is available, raise an error
|
|
52
52
|
error_msg = "No embeddings were generated for the video"
|
|
53
53
|
raise ValueError(error_msg)
|
|
@@ -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 .upstash import UpstashVectorStoreComponent
|
|
9
|
+
|
|
10
|
+
_dynamic_imports = {
|
|
11
|
+
"UpstashVectorStoreComponent": "upstash",
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"UpstashVectorStoreComponent",
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def __getattr__(attr_name: str) -> Any:
|
|
20
|
+
"""Lazily import Upstash 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,37 @@
|
|
|
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 .vectara import VectaraVectorStoreComponent
|
|
9
|
+
from .vectara_rag import VectaraRagComponent
|
|
10
|
+
|
|
11
|
+
_dynamic_imports = {
|
|
12
|
+
"VectaraVectorStoreComponent": "vectara",
|
|
13
|
+
"VectaraRagComponent": "vectara_rag",
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
__all__ = [
|
|
17
|
+
"VectaraRagComponent",
|
|
18
|
+
"VectaraVectorStoreComponent",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def __getattr__(attr_name: str) -> Any:
|
|
23
|
+
"""Lazily import Vectara 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__)
|
|
@@ -5,83 +5,14 @@ from typing import TYPE_CHECKING, Any
|
|
|
5
5
|
from langflow.components._importing import import_mod
|
|
6
6
|
|
|
7
7
|
if TYPE_CHECKING:
|
|
8
|
-
from .astradb import AstraDBVectorStoreComponent
|
|
9
|
-
from .astradb_graph import AstraDBGraphVectorStoreComponent
|
|
10
|
-
from .cassandra import CassandraVectorStoreComponent
|
|
11
|
-
from .cassandra_graph import CassandraGraphVectorStoreComponent
|
|
12
|
-
from .chroma import ChromaVectorStoreComponent
|
|
13
|
-
from .clickhouse import ClickhouseVectorStoreComponent
|
|
14
|
-
from .couchbase import CouchbaseVectorStoreComponent
|
|
15
|
-
from .elasticsearch import ElasticsearchVectorStoreComponent
|
|
16
|
-
from .faiss import FaissVectorStoreComponent
|
|
17
|
-
from .graph_rag import GraphRAGComponent
|
|
18
|
-
from .hcd import HCDVectorStoreComponent
|
|
19
8
|
from .local_db import LocalDBComponent
|
|
20
|
-
from .milvus import MilvusVectorStoreComponent
|
|
21
|
-
from .mongodb_atlas import MongoVectorStoreComponent
|
|
22
|
-
from .opensearch import OpenSearchVectorStoreComponent
|
|
23
|
-
from .pgvector import PGVectorStoreComponent
|
|
24
|
-
from .pinecone import PineconeVectorStoreComponent
|
|
25
|
-
from .qdrant import QdrantVectorStoreComponent
|
|
26
|
-
from .redis import RedisVectorStoreComponent
|
|
27
|
-
from .supabase import SupabaseVectorStoreComponent
|
|
28
|
-
from .upstash import UpstashVectorStoreComponent
|
|
29
|
-
from .vectara import VectaraVectorStoreComponent
|
|
30
|
-
from .vectara_rag import VectaraRagComponent
|
|
31
|
-
from .weaviate import WeaviateVectorStoreComponent
|
|
32
9
|
|
|
33
10
|
_dynamic_imports = {
|
|
34
|
-
"AstraDBVectorStoreComponent": "astradb",
|
|
35
|
-
"AstraDBGraphVectorStoreComponent": "astradb_graph",
|
|
36
|
-
"CassandraVectorStoreComponent": "cassandra",
|
|
37
|
-
"CassandraGraphVectorStoreComponent": "cassandra_graph",
|
|
38
|
-
"ChromaVectorStoreComponent": "chroma",
|
|
39
|
-
"ClickhouseVectorStoreComponent": "clickhouse",
|
|
40
|
-
"CouchbaseVectorStoreComponent": "couchbase",
|
|
41
|
-
"ElasticsearchVectorStoreComponent": "elasticsearch",
|
|
42
|
-
"FaissVectorStoreComponent": "faiss",
|
|
43
|
-
"GraphRAGComponent": "graph_rag",
|
|
44
|
-
"HCDVectorStoreComponent": "hcd",
|
|
45
11
|
"LocalDBComponent": "local_db",
|
|
46
|
-
"MilvusVectorStoreComponent": "milvus",
|
|
47
|
-
"MongoVectorStoreComponent": "mongodb_atlas",
|
|
48
|
-
"OpenSearchVectorStoreComponent": "opensearch",
|
|
49
|
-
"PGVectorStoreComponent": "pgvector",
|
|
50
|
-
"PineconeVectorStoreComponent": "pinecone",
|
|
51
|
-
"QdrantVectorStoreComponent": "qdrant",
|
|
52
|
-
"RedisVectorStoreComponent": "redis",
|
|
53
|
-
"SupabaseVectorStoreComponent": "supabase",
|
|
54
|
-
"UpstashVectorStoreComponent": "upstash",
|
|
55
|
-
"VectaraVectorStoreComponent": "vectara",
|
|
56
|
-
"VectaraRagComponent": "vectara_rag",
|
|
57
|
-
"WeaviateVectorStoreComponent": "weaviate",
|
|
58
12
|
}
|
|
59
13
|
|
|
60
14
|
__all__ = [
|
|
61
|
-
"AstraDBGraphVectorStoreComponent",
|
|
62
|
-
"AstraDBVectorStoreComponent",
|
|
63
|
-
"CassandraGraphVectorStoreComponent",
|
|
64
|
-
"CassandraVectorStoreComponent",
|
|
65
|
-
"ChromaVectorStoreComponent",
|
|
66
|
-
"ClickhouseVectorStoreComponent",
|
|
67
|
-
"CouchbaseVectorStoreComponent",
|
|
68
|
-
"ElasticsearchVectorStoreComponent",
|
|
69
|
-
"FaissVectorStoreComponent",
|
|
70
|
-
"GraphRAGComponent",
|
|
71
|
-
"HCDVectorStoreComponent",
|
|
72
15
|
"LocalDBComponent",
|
|
73
|
-
"MilvusVectorStoreComponent",
|
|
74
|
-
"MongoVectorStoreComponent",
|
|
75
|
-
"OpenSearchVectorStoreComponent",
|
|
76
|
-
"PGVectorStoreComponent",
|
|
77
|
-
"PineconeVectorStoreComponent",
|
|
78
|
-
"QdrantVectorStoreComponent",
|
|
79
|
-
"RedisVectorStoreComponent",
|
|
80
|
-
"SupabaseVectorStoreComponent",
|
|
81
|
-
"UpstashVectorStoreComponent",
|
|
82
|
-
"VectaraRagComponent",
|
|
83
|
-
"VectaraVectorStoreComponent",
|
|
84
|
-
"WeaviateVectorStoreComponent",
|
|
85
16
|
]
|
|
86
17
|
|
|
87
18
|
|
|
@@ -2,13 +2,13 @@ from copy import deepcopy
|
|
|
2
2
|
from pathlib import Path
|
|
3
3
|
|
|
4
4
|
from langchain_chroma import Chroma
|
|
5
|
-
from loguru import logger
|
|
6
5
|
from typing_extensions import override
|
|
7
6
|
|
|
8
7
|
from langflow.base.vectorstores.model import LCVectorStoreComponent, check_cached_vector_store
|
|
9
8
|
from langflow.base.vectorstores.utils import chroma_collection_to_data
|
|
10
9
|
from langflow.inputs.inputs import MultilineInput
|
|
11
10
|
from langflow.io import BoolInput, DropdownInput, HandleInput, IntInput, MessageTextInput, TabInput
|
|
11
|
+
from langflow.logging.logger import logger
|
|
12
12
|
from langflow.schema.data import Data
|
|
13
13
|
from langflow.schema.dataframe import DataFrame
|
|
14
14
|
from langflow.template.field.base import Output
|
|
@@ -21,6 +21,7 @@ class LocalDBComponent(LCVectorStoreComponent):
|
|
|
21
21
|
description: str = "Local Vector Store with search capabilities"
|
|
22
22
|
name = "LocalDB"
|
|
23
23
|
icon = "database"
|
|
24
|
+
legacy = True
|
|
24
25
|
|
|
25
26
|
inputs = [
|
|
26
27
|
TabInput(
|
|
@@ -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 .weaviate import WeaviateVectorStoreComponent
|
|
9
|
+
|
|
10
|
+
_dynamic_imports = {
|
|
11
|
+
"WeaviateVectorStoreComponent": "weaviate",
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"WeaviateVectorStoreComponent",
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def __getattr__(attr_name: str) -> Any:
|
|
20
|
+
"""Lazily import Weaviate 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__)
|