lfx-nightly 0.1.12.dev14__py3-none-any.whl → 0.1.12.dev16__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.

Potentially problematic release.


This version of lfx-nightly might be problematic. Click here for more details.

Files changed (130) hide show
  1. lfx/base/agents/events.py +40 -29
  2. lfx/base/constants.py +1 -1
  3. lfx/base/data/docling_utils.py +43 -8
  4. lfx/base/data/utils.py +3 -3
  5. lfx/base/knowledge_bases/__init__.py +3 -0
  6. lfx/base/knowledge_bases/knowledge_base_utils.py +137 -0
  7. lfx/base/models/anthropic_constants.py +3 -1
  8. lfx/base/models/model_input_constants.py +1 -1
  9. lfx/base/vectorstores/vector_store_connection_decorator.py +1 -1
  10. lfx/components/agentql/agentql_api.py +1 -1
  11. lfx/components/agents/agent.py +62 -17
  12. lfx/components/agents/mcp_component.py +11 -1
  13. lfx/components/aiml/aiml.py +4 -1
  14. lfx/components/amazon/amazon_bedrock_converse.py +196 -0
  15. lfx/components/amazon/amazon_bedrock_model.py +5 -1
  16. lfx/components/azure/azure_openai.py +1 -1
  17. lfx/components/azure/azure_openai_embeddings.py +1 -1
  18. lfx/components/chroma/chroma.py +4 -2
  19. lfx/components/clickhouse/clickhouse.py +1 -1
  20. lfx/components/confluence/confluence.py +1 -1
  21. lfx/components/crewai/crewai.py +1 -0
  22. lfx/components/crewai/hierarchical_crew.py +1 -0
  23. lfx/components/crewai/hierarchical_task.py +1 -0
  24. lfx/components/crewai/sequential_crew.py +1 -0
  25. lfx/components/crewai/sequential_task.py +1 -0
  26. lfx/components/crewai/sequential_task_agent.py +1 -0
  27. lfx/components/data/api_request.py +13 -3
  28. lfx/components/data/csv_to_data.py +1 -0
  29. lfx/components/data/file.py +71 -25
  30. lfx/components/data/json_to_data.py +1 -0
  31. lfx/components/datastax/astra_db.py +2 -1
  32. lfx/components/datastax/astra_vectorize.py +3 -5
  33. lfx/components/datastax/astradb_tool.py +5 -1
  34. lfx/components/datastax/astradb_vectorstore.py +8 -1
  35. lfx/components/deactivated/chat_litellm_model.py +1 -1
  36. lfx/components/deactivated/metal.py +1 -1
  37. lfx/components/docling/docling_inline.py +23 -9
  38. lfx/components/elastic/elasticsearch.py +1 -1
  39. lfx/components/elastic/opensearch.py +1 -1
  40. lfx/components/embeddings/similarity.py +1 -0
  41. lfx/components/embeddings/text_embedder.py +1 -0
  42. lfx/components/firecrawl/firecrawl_crawl_api.py +1 -1
  43. lfx/components/firecrawl/firecrawl_extract_api.py +1 -1
  44. lfx/components/firecrawl/firecrawl_map_api.py +1 -1
  45. lfx/components/firecrawl/firecrawl_scrape_api.py +1 -1
  46. lfx/components/google/gmail.py +1 -0
  47. lfx/components/google/google_generative_ai_embeddings.py +1 -1
  48. lfx/components/helpers/memory.py +8 -6
  49. lfx/components/helpers/output_parser.py +1 -0
  50. lfx/components/helpers/store_message.py +1 -0
  51. lfx/components/huggingface/huggingface.py +3 -1
  52. lfx/components/huggingface/huggingface_inference_api.py +1 -1
  53. lfx/components/ibm/watsonx.py +1 -1
  54. lfx/components/ibm/watsonx_embeddings.py +1 -1
  55. lfx/components/icosacomputing/combinatorial_reasoner.py +1 -1
  56. lfx/components/input_output/chat.py +0 -27
  57. lfx/components/input_output/chat_output.py +3 -27
  58. lfx/components/knowledge_bases/__init__.py +34 -0
  59. lfx/components/knowledge_bases/ingestion.py +686 -0
  60. lfx/components/knowledge_bases/retrieval.py +256 -0
  61. lfx/components/langchain_utilities/langchain_hub.py +1 -1
  62. lfx/components/langwatch/langwatch.py +1 -1
  63. lfx/components/logic/conditional_router.py +40 -3
  64. lfx/components/logic/data_conditional_router.py +1 -0
  65. lfx/components/logic/flow_tool.py +2 -1
  66. lfx/components/logic/pass_message.py +1 -0
  67. lfx/components/logic/sub_flow.py +2 -1
  68. lfx/components/milvus/milvus.py +1 -1
  69. lfx/components/olivya/olivya.py +1 -1
  70. lfx/components/processing/alter_metadata.py +1 -0
  71. lfx/components/processing/combine_text.py +1 -0
  72. lfx/components/processing/create_data.py +1 -0
  73. lfx/components/processing/data_to_dataframe.py +1 -0
  74. lfx/components/processing/extract_key.py +1 -0
  75. lfx/components/processing/filter_data.py +1 -0
  76. lfx/components/processing/filter_data_values.py +1 -0
  77. lfx/components/processing/json_cleaner.py +1 -0
  78. lfx/components/processing/merge_data.py +1 -0
  79. lfx/components/processing/message_to_data.py +1 -0
  80. lfx/components/processing/parse_data.py +1 -0
  81. lfx/components/processing/parse_dataframe.py +1 -0
  82. lfx/components/processing/parse_json_data.py +1 -0
  83. lfx/components/processing/python_repl_core.py +2 -2
  84. lfx/components/processing/regex.py +1 -0
  85. lfx/components/processing/select_data.py +1 -0
  86. lfx/components/processing/structured_output.py +7 -3
  87. lfx/components/processing/update_data.py +1 -0
  88. lfx/components/prototypes/__init__.py +8 -7
  89. lfx/components/qdrant/qdrant.py +1 -1
  90. lfx/components/redis/redis_chat.py +1 -1
  91. lfx/components/tools/__init__.py +0 -6
  92. lfx/components/tools/calculator.py +2 -1
  93. lfx/components/tools/python_code_structured_tool.py +1 -0
  94. lfx/components/tools/python_repl.py +2 -1
  95. lfx/components/tools/search_api.py +2 -1
  96. lfx/components/tools/serp_api.py +2 -1
  97. lfx/components/tools/tavily_search_tool.py +1 -0
  98. lfx/components/tools/wikidata_api.py +2 -1
  99. lfx/components/tools/wikipedia_api.py +2 -1
  100. lfx/components/tools/yahoo_finance.py +2 -1
  101. lfx/components/twelvelabs/video_embeddings.py +1 -1
  102. lfx/components/upstash/upstash.py +1 -1
  103. lfx/components/vectorstores/astradb_graph.py +8 -1
  104. lfx/components/vectorstores/local_db.py +1 -0
  105. lfx/components/vectorstores/weaviate.py +1 -1
  106. lfx/components/wolframalpha/wolfram_alpha_api.py +1 -1
  107. lfx/components/zep/zep.py +2 -1
  108. lfx/custom/attributes.py +1 -0
  109. lfx/custom/validate.py +1 -1
  110. lfx/graph/graph/base.py +61 -4
  111. lfx/inputs/inputs.py +1 -0
  112. lfx/log/logger.py +31 -11
  113. lfx/schema/message.py +6 -1
  114. lfx/schema/schema.py +4 -0
  115. lfx/services/__init__.py +3 -0
  116. lfx/services/mcp_composer/__init__.py +6 -0
  117. lfx/services/mcp_composer/factory.py +16 -0
  118. lfx/services/mcp_composer/service.py +599 -0
  119. lfx/services/schema.py +1 -0
  120. lfx/services/settings/auth.py +18 -15
  121. lfx/services/settings/base.py +38 -0
  122. lfx/services/settings/constants.py +4 -1
  123. lfx/services/settings/feature_flags.py +0 -1
  124. lfx/template/frontend_node/base.py +2 -0
  125. lfx/utils/image.py +1 -1
  126. {lfx_nightly-0.1.12.dev14.dist-info → lfx_nightly-0.1.12.dev16.dist-info}/METADATA +1 -1
  127. {lfx_nightly-0.1.12.dev14.dist-info → lfx_nightly-0.1.12.dev16.dist-info}/RECORD +129 -121
  128. lfx/components/datastax/astradb.py +0 -1285
  129. {lfx_nightly-0.1.12.dev14.dist-info → lfx_nightly-0.1.12.dev16.dist-info}/WHEEL +0 -0
  130. {lfx_nightly-0.1.12.dev14.dist-info → lfx_nightly-0.1.12.dev16.dist-info}/entry_points.txt +0 -0
@@ -200,6 +200,18 @@ class Settings(BaseSettings):
200
200
  backend_only: bool = False
201
201
  """If set to True, Langflow will not serve the frontend."""
202
202
 
203
+ # CORS Settings
204
+ cors_origins: list[str] | str = "*"
205
+ """Allowed origins for CORS. Can be a list of origins or '*' for all origins.
206
+ Default is '*' for backward compatibility. In production, specify exact origins."""
207
+ cors_allow_credentials: bool = True
208
+ """Whether to allow credentials in CORS requests.
209
+ Default is True for backward compatibility. In v2.0, this will be changed to False when using wildcard origins."""
210
+ cors_allow_methods: list[str] | str = "*"
211
+ """Allowed HTTP methods for CORS requests."""
212
+ cors_allow_headers: list[str] | str = "*"
213
+ """Allowed headers for CORS requests."""
214
+
203
215
  # Telemetry
204
216
  do_not_track: bool = False
205
217
  """If set to True, Langflow will not track telemetry."""
@@ -263,6 +275,10 @@ class Settings(BaseSettings):
263
275
  mcp_server_enable_progress_notifications: bool = False
264
276
  """If set to False, Langflow will not send progress notifications in the MCP server."""
265
277
 
278
+ # MCP Composer
279
+ mcp_composer_enabled: bool = True
280
+ """If set to False, Langflow will not start the MCP Composer service."""
281
+
266
282
  # Public Flow Settings
267
283
  public_flow_cleanup_interval: int = Field(default=3600, gt=600)
268
284
  """The interval in seconds at which public temporary flows will be cleaned up.
@@ -284,6 +300,18 @@ class Settings(BaseSettings):
284
300
  update_starter_projects: bool = True
285
301
  """If set to True, Langflow will update starter projects."""
286
302
 
303
+ @field_validator("cors_origins", mode="before")
304
+ @classmethod
305
+ def validate_cors_origins(cls, value):
306
+ """Convert comma-separated string to list if needed."""
307
+ if isinstance(value, str) and value != "*":
308
+ if "," in value:
309
+ # Convert comma-separated string to list
310
+ return [origin.strip() for origin in value.split(",")]
311
+ # Convert single origin to list for consistency
312
+ return [value]
313
+ return value
314
+
287
315
  @field_validator("use_noop_database", mode="before")
288
316
  @classmethod
289
317
  def set_use_noop_database(cls, value):
@@ -497,6 +525,16 @@ class Settings(BaseSettings):
497
525
  logger.debug(f"Updated {key}")
498
526
  logger.debug(f"{key}: {getattr(self, key)}")
499
527
 
528
+ @property
529
+ def voice_mode_available(self) -> bool:
530
+ """Check if voice mode is available by testing webrtcvad import."""
531
+ try:
532
+ import webrtcvad # noqa: F401
533
+ except ImportError:
534
+ return False
535
+ else:
536
+ return True
537
+
500
538
  @classmethod
501
539
  @override
502
540
  def settings_customise_sources( # type: ignore[misc]
@@ -1,5 +1,8 @@
1
+ from pydantic import SecretStr
2
+
1
3
  DEFAULT_SUPERUSER = "langflow"
2
- DEFAULT_SUPERUSER_PASSWORD = "langflow"
4
+ DEFAULT_SUPERUSER_PASSWORD = SecretStr("langflow")
5
+
3
6
  VARIABLES_TO_GET_FROM_ENVIRONMENT = [
4
7
  "COMPOSIO_API_KEY",
5
8
  "OPENAI_API_KEY",
@@ -3,7 +3,6 @@ from pydantic_settings import BaseSettings
3
3
 
4
4
  class FeatureFlags(BaseSettings):
5
5
  mvp_components: bool = False
6
- mcp_composer: bool = True
7
6
 
8
7
  class Config:
9
8
  env_prefix = "LANGFLOW_FEATURE_"
@@ -55,6 +55,8 @@ class FrontendNode(BaseModel):
55
55
  """Whether the frontend node is in beta."""
56
56
  legacy: bool = False
57
57
  """Whether the frontend node is legacy."""
58
+ replacement: list[str] | None = None
59
+ """Replacement for the frontend node when it is deprecated."""
58
60
  error: str | None = None
59
61
  """Error message for the frontend node."""
60
62
  edited: bool = False
lfx/utils/image.py CHANGED
@@ -64,7 +64,7 @@ def create_image_content_dict(image_path: str | Path, mime_type: str | None = No
64
64
  mime_type: MIME type of the image. If None, will be auto-detected
65
65
 
66
66
  Returns:
67
- Content dictionary with type, source_type, and url fields
67
+ Content dictionary with type and image_url fields
68
68
 
69
69
  Raises:
70
70
  FileNotFoundError: If the image file doesn't exist
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lfx-nightly
3
- Version: 0.1.12.dev14
3
+ Version: 0.1.12.dev16
4
4
  Summary: Langflow Executor - A lightweight CLI tool for executing and serving Langflow AI flows
5
5
  Author-email: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
6
6
  Requires-Python: <3.14,>=3.10