diff --git a/docs/docs/Components/components-agents.md b/docs/docs/Components/components-agents.md index d3b660a42..059a2ed11 100644 --- a/docs/docs/Components/components-agents.md +++ b/docs/docs/Components/components-agents.md @@ -9,9 +9,9 @@ Agent components define the behavior and capabilities of AI agents in your flow. Agents use LLMs as a reasoning engine to decide which of the connected tool components to use to solve a problem. -Tools in agentic functions are, essentially, functions that the agent can call to perform tasks or access external resources. -A function is wrapped as a `Tool` object, with a common interface the agent understands. -Agents become aware of tools through tool registration, where the agent is provided a list of available tools, typically at agent initialization. The `Tool` object's description tells the agent what the tool can do. +Tools in agentic functions are essentially functions that the agent can call to perform tasks or access external resources. +A function is wrapped as a `Tool` object with a common interface the agent understands. +Agents become aware of tools through tool registration where the agent is provided a list of available tools typically at agent initialization. The `Tool` object's description tells the agent what the tool can do. The agent then uses a connected LLM to reason through the problem to decide which tool is best for the job. @@ -21,7 +21,7 @@ The [simple agent starter project](/starter-projects-simple-agent) uses an [agen ![Simple agent starter flow](/img/starter-flow-simple-agent.png) -For a multi-agent example, see [Create a problem-solving agent](/agents-tool-calling-agent-component). +For a multi-agent example see, [Create a problem-solving agent](/agents-tool-calling-agent-component). ## Agent component {#agent-component} @@ -31,300 +31,389 @@ The component includes an LLM model integration, a system message prompt, and a For more information on this component, see the [tool calling agent documentation](/agents-tool-calling-agent-component). -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |------|------|-------------| -| agent_llm | Dropdown | The provider of the language model that the agent will use to generate responses. Options include OpenAI and other providers, or Custom. | -| system_prompt | String | System Prompt: Initial instructions and context provided to guide the agent's behavior. | -| tools | List | List of tools available for the agent to use. | +| agent_llm | Dropdown | The provider of the language model that the agent uses to generate responses. Options include OpenAI and other providers or Custom. | +| system_prompt | String | The system prompt provides initial instructions and context to guide the agent's behavior. | +| tools | List | The list of tools available for the agent to use. | | input_value | String | The input task or question for the agent to process. | -| add_current_date_tool | Boolean | If true, adds a tool to the agent that returns the current date. | -| memory | Memory | Optional memory configuration for maintaining conversation history. | -| max_iterations | Integer | Maximum number of iterations the agent can perform. | -| handle_parsing_errors | Boolean | Whether to handle parsing errors during agent execution. | -| verbose | Boolean | Enables verbose output for detailed logging. | +| add_current_date_tool | Boolean | When true this adds a tool to the agent that returns the current date. | +| memory | Memory | An optional memory configuration for maintaining conversation history. | +| max_iterations | Integer | The maximum number of iterations the agent can perform. | +| handle_parsing_errors | Boolean | This determines whether to handle parsing errors during agent execution. | +| verbose | Boolean | This enables verbose output for detailed logging. | -### Outputs +**Outputs** | Name | Type | Description | |------|------|-------------| | response | Message | The agent's response to the given input task. | -## CSV Agent +
-This component creates a CSV agent from a CSV file and LLM. +## Legacy components -### Inputs +**Legacy** components are available for use but are no longer supported. -| Name | Type | Description | -|------|------|-------------| -| llm | LanguageModel | Language model to use for the agent | -| path | File | Path to the CSV file | -| agent_type | String | Type of agent to create (zero-shot-react-description, openai-functions, or openai-tools) | - -### Outputs - -| Name | Type | Description | -|------|------|-------------| -| agent | AgentExecutor | CSV agent instance | - -## CrewAI Agent - -This component represents an Agent of CrewAI, allowing for the creation of specialized AI agents with defined roles, goals, and capabilities within a crew. - -For more information, see the [CrewAI documentation](https://docs.crewai.com/core-concepts/Agents/). - -### Inputs - -| Name | Display Name | Info | -|------|--------------|------| -| role | Role | The role of the agent | -| goal | Goal | The objective of the agent | -| backstory | Backstory | The backstory of the agent | -| tools | Tools | Tools at agent's disposal | -| llm | Language Model | Language model that will run the agent | -| memory | Memory | Whether the agent should have memory or not | -| verbose | Verbose | Enables verbose output | -| allow_delegation | Allow Delegation | Whether the agent is allowed to delegate tasks to other agents | -| allow_code_execution | Allow Code Execution | Whether the agent is allowed to execute code | -| kwargs | kwargs | Additional keyword arguments for the agent | - -### Outputs - -| Name | Display Name | Info | -|------|--------------|------| -| output | Agent | The constructed CrewAI Agent object | - -## Hierarchical Crew - -This component represents a group of agents, managing how they should collaborate and the tasks they should perform in a hierarchical structure. This component allows for the creation of a crew with a manager overseeing the task execution. - -For more information, see the [CrewAI documentation](https://docs.crewai.com/how-to/Hierarchical/). - -### Inputs - -| Name | Display Name | Info | -|------|--------------|------| -| agents | Agents | List of Agent objects representing the crew members | -| tasks | Tasks | List of HierarchicalTask objects representing the tasks to be executed | -| manager_llm | Manager LLM | Language model for the manager agent (optional) | -| manager_agent | Manager Agent | Specific agent to act as the manager (optional) | -| verbose | Verbose | Enables verbose output for detailed logging | -| memory | Memory | Specifies the memory configuration for the crew | -| use_cache | Use Cache | Enables caching of results | -| max_rpm | Max RPM | Sets the maximum requests per minute | -| share_crew | Share Crew | Determines if the crew information is shared among agents | -| function_calling_llm | Function Calling LLM | Specifies the language model for function calling | - -### Outputs - -| Name | Display Name | Info | -|------|--------------|------| -| crew | Crew | The constructed Crew object with hierarchical task execution | - -## JSON Agent +### JSON Agent This component creates a JSON agent from a JSON or YAML file and an LLM. -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |------|------|-------------| -| llm | LanguageModel | Language model to use for the agent | -| path | File | Path to the JSON or YAML file | +| llm | LanguageModel | The language model to use for the agent. | +| path | File | The path to the JSON or YAML file. | -### Outputs +**Outputs** | Name | Type | Description | |------|------|-------------| -| agent | AgentExecutor | JSON agent instance | +| agent | AgentExecutor | The JSON agent instance. | -## OpenAI Tools Agent +
-This component creates an OpenAI Tools Agent using LangChain. +### Vector Store Agent -For more information, see the [LangChain documentation](https://python.langchain.com/v0.1/docs/modules/agents/agent_types/openai_tools/). +This component creates a Vector Store Agent using LangChain. -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |------|------|-------------| -| llm | LanguageModel | Language model to use for the agent (must be tool-enabled) | -| system_prompt | String | System prompt for the agent | -| user_prompt | String | User prompt template (must contain 'input' key) | -| chat_history | List[Data] | Optional chat history for the agent | -| tools | List[Tool] | List of tools available to the agent | +| llm | LanguageModel | The language model to use for the agent. | +| vectorstore | VectorStoreInfo | The vector store information for the agent to use. | -### Outputs +**Outputs** | Name | Type | Description | |------|------|-------------| -| agent | AgentExecutor | OpenAI Tools Agent instance | +| agent | AgentExecutor | The Vector Store Agent instance. | -## OpenAPI Agent +
-This component creates an OpenAPI Agent to interact with APIs defined by OpenAPI specifications. +### Vector Store Router Agent -For more information, see the LangChain documentation on OpenAPI Agents. +This component creates a Vector Store Router Agent using LangChain. -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |------|------|-------------| -| llm | LanguageModel | Language model to use for the agent | -| path | File | Path to the OpenAPI specification file (JSON or YAML) | -| allow_dangerous_requests | Boolean | Whether to allow potentially dangerous API requests | +| llm | LanguageModel | The language model to use for the agent. | +| vectorstores | List[VectorStoreInfo] | The list of vector store information for the agent to route between. | -### Outputs +**Outputs** | Name | Type | Description | |------|------|-------------| -| agent | AgentExecutor | OpenAPI Agent instance | +| agent | AgentExecutor | The Vector Store Router Agent instance. | -## SQL Agent +
-This component creates a SQL Agent to interact with SQL databases. +## Moved components -### Inputs +The following components are available under **Bundles**. + +### CrewAI Agent + +This component represents an Agent of CrewAI allowing for the creation of specialized AI agents with defined roles goals and capabilities within a crew. + +For more information, see the [CrewAI documentation](https://docs.crewai.com/core-concepts/Agents/). + +
+Parameters + +**Inputs** + +| Name | Display Name | Info | +|------|--------------|------| +| role | Role | The role of the agent. | +| goal | Goal | The objective of the agent. | +| backstory | Backstory | The backstory of the agent. | +| tools | Tools | The tools at the agent's disposal. | +| llm | Language Model | The language model that runs the agent. | +| memory | Memory | This determines whether the agent should have memory or not. | +| verbose | Verbose | This enables verbose output. | +| allow_delegation | Allow Delegation | This determines whether the agent is allowed to delegate tasks to other agents. | +| allow_code_execution | Allow Code Execution | This determines whether the agent is allowed to execute code. | +| kwargs | kwargs | Additional keyword arguments for the agent. | + +**Outputs** + +| Name | Display Name | Info | +|------|--------------|------| +| output | Agent | The constructed CrewAI Agent object. | + +
+ +### Hierarchical Crew + +This component represents a group of agents managing how they should collaborate and the tasks they should perform in a hierarchical structure. This component allows for the creation of a crew with a manager overseeing the task execution. + +For more information, see the [CrewAI documentation](https://docs.crewai.com/how-to/Hierarchical/). + +
+Parameters + +**Inputs** + +| Name | Display Name | Info | +|------|--------------|------| +| agents | Agents | The list of Agent objects representing the crew members. | +| tasks | Tasks | The list of HierarchicalTask objects representing the tasks to be executed. | +| manager_llm | Manager LLM | The language model for the manager agent. | +| manager_agent | Manager Agent | The specific agent to act as the manager. | +| verbose | Verbose | This enables verbose output for detailed logging. | +| memory | Memory | The memory configuration for the crew. | +| use_cache | Use Cache | This enables caching of results. | +| max_rpm | Max RPM | This sets the maximum requests per minute. | +| share_crew | Share Crew | This determines if the crew information is shared among agents. | +| function_calling_llm | Function Calling LLM | The language model for function calling. | + +**Outputs** + +| Name | Display Name | Info | +|------|--------------|------| +| crew | Crew | The constructed Crew object with hierarchical task execution. | + +
+ +### CSV Agent + +This component creates a CSV agent from a CSV file and LLM. + +
+Parameters + +**Inputs** | Name | Type | Description | |------|------|-------------| -| llm | LanguageModel | Language model to use for the agent | -| database_uri | String | URI of the SQL database to connect to | -| extra_tools | List[Tool] | Additional tools to provide to the agent (optional) | +| llm | LanguageModel | The language model to use for the agent. | +| path | File | The path to the CSV file. | +| agent_type | String | The type of agent to create. | -### Outputs +**Outputs** | Name | Type | Description | |------|------|-------------| -| agent | AgentExecutor | SQL Agent instance | +| agent | AgentExecutor | The CSV agent instance. | -## Sequential Crew +
+ +### OpenAI Tools Agent + +This component creates an OpenAI Tools Agent. + +
+Parameters + +**Inputs** + +| Name | Type | Description | +|------|------|-------------| +| llm | LanguageModel | The language model to use. | +| tools | List of Tools | The tools to give the agent access to. | +| system_prompt | String | The system prompt to provide context to the agent. | +| input_value | String | The user's input to the agent. | +| memory | Memory | The memory for the agent to use for context persistence. | +| max_iterations | Integer | The maximum number of iterations to allow the agent to execute. | +| verbose | Boolean | This determines whether to print out the agent's intermediate steps. | +| handle_parsing_errors | Boolean | This determines whether to handle parsing errors in the agent. | + +**Outputs** + +| Name | Type | Description | +|------|------|-------------| +| agent | AgentExecutor | The OpenAI Tools agent instance. | +| output | String | The output from executing the agent on the input. | + +
+ +### OpenAPI Agent + +This component creates an agent for interacting with OpenAPI services. + +
+Parameters + +**Inputs** + +| Name | Type | Description | +|------|------|-------------| +| llm | LanguageModel | The language model to use. | +| openapi_spec | String | The OpenAPI specification for the service. | +| base_url | String | The base URL for the API. | +| headers | Dict | The optional headers for API requests. | +| agent_executor_kwargs | Dict | The optional parameters for the agent executor. | + +**Outputs** + +| Name | Type | Description | +|------|------|-------------| +| agent | AgentExecutor | The OpenAPI agent instance. | + +
+ +### Sequential Crew This component represents a group of agents with tasks that are executed sequentially. This component allows for the creation of a crew that performs tasks in a specific order. For more information, see the [CrewAI documentation](https://docs.crewai.com/how-to/Sequential/). -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| -| tasks | Tasks | List of SequentialTask objects representing the tasks to be executed | -| verbose | Verbose | Enables verbose output for detailed logging | -| memory | Memory | Specifies the memory configuration for the crew | -| use_cache | Use Cache | Enables caching of results | -| max_rpm | Max RPM | Sets the maximum requests per minute | -| share_crew | Share Crew | Determines if the crew information is shared among agents | -| function_calling_llm | Function Calling LLM | Specifies the language model for function calling | +| tasks | Tasks | The list of SequentialTask objects representing the tasks to be executed. | +| verbose | Verbose | This enables verbose output for detailed logging. | +| memory | Memory | The memory configuration for the crew. | +| use_cache | Use Cache | This enables caching of results. | +| max_rpm | Max RPM | This sets the maximum requests per minute. | +| share_crew | Share Crew | This determines if the crew information is shared among agents. | +| function_calling_llm | Function Calling LLM | The language model for function calling. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| -| crew | Crew | The constructed Crew object with sequential task execution | +| crew | Crew | The constructed Crew object with sequential task execution. | -## Sequential task agent +
-This component creates a CrewAI Task and its associated Agent, allowing for the definition of sequential tasks with specific agent roles and capabilities. +### Sequential task agent + +This component creates a CrewAI Task and its associated Agent allowing for the definition of sequential tasks with specific agent roles and capabilities. For more information, see the [CrewAI documentation](https://docs.crewai.com/how-to/Sequential/). -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| -| role | Role | The role of the agent | -| goal | Goal | The objective of the agent | -| backstory | Backstory | The backstory of the agent | -| tools | Tools | Tools at agent's disposal | -| llm | Language Model | Language model that will run the agent | -| memory | Memory | Whether the agent should have memory or not | -| verbose | Verbose | Enables verbose output | -| allow_delegation | Allow Delegation | Whether the agent is allowed to delegate tasks to other agents | -| allow_code_execution | Allow Code Execution | Whether the agent is allowed to execute code | -| agent_kwargs | Agent kwargs | Additional kwargs for the agent | -| task_description | Task Description | Descriptive text detailing task's purpose and execution | -| expected_output | Expected Task Output | Clear definition of expected task outcome | -| async_execution | Async Execution | Boolean flag indicating asynchronous task execution | -| previous_task | Previous Task | The previous task in the sequence (for chaining) | +| role | Role | The role of the agent. | +| goal | Goal | The objective of the agent. | +| backstory | Backstory | The backstory of the agent. | +| tools | Tools | The tools at the agent's disposal. | +| llm | Language Model | The language model that runs the agent. | +| memory | Memory | This determines whether the agent should have memory or not. | +| verbose | Verbose | This enables verbose output. | +| allow_delegation | Allow Delegation | This determines whether the agent is allowed to delegate tasks to other agents. | +| allow_code_execution | Allow Code Execution | This determines whether the agent is allowed to execute code. | +| agent_kwargs | Agent kwargs | The additional kwargs for the agent. | +| task_description | Task Description | The descriptive text detailing the task's purpose and execution. | +| expected_output | Expected Task Output | The clear definition of the expected task outcome. | +| async_execution | Async Execution | The boolean flag indicating asynchronous task execution. | +| previous_task | Previous Task | The previous task in the sequence for chaining. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| -| task_output | Sequential Task | List of SequentialTask objects representing the created tasks | +| task_output | Sequential Task | The list of SequentialTask objects representing the created tasks. | -## Tool Calling Agent +
-This component creates a Tool Calling Agent using LangChain. +### SQL Agent -### Inputs +This component creates an agent for interacting with SQL databases. + +
+Parameters + +**Inputs** | Name | Type | Description | |------|------|-------------| -| llm | LanguageModel | Language model to use for the agent | -| system_prompt | String | System prompt for the agent | -| user_prompt | String | User prompt template (must contain 'input' key) | -| chat_history | List[Data] | Optional chat history for the agent | -| tools | List[Tool] | List of tools available to the agent | +| llm | LanguageModel | The language model to use. | +| database | Database | The SQL database connection. | +| top_k | Integer | The number of results to return from a SELECT query. | +| use_tools | Boolean | This determines whether to use tools for query execution. | +| return_intermediate_steps | Boolean | This determines whether to return the agent's intermediate steps. | +| max_iterations | Integer | The maximum number of iterations to run the agent. | +| max_execution_time | Integer | The maximum execution time in seconds. | +| early_stopping_method | String | The method to use for early stopping. | +| verbose | Boolean | This determines whether to print the agent's thoughts. | -### Outputs +**Outputs** | Name | Type | Description | |------|------|-------------| -| agent | AgentExecutor | Tool Calling Agent instance | +| agent | AgentExecutor | The SQL agent instance. | -## Vector Store Agent +
-This component creates a Vector Store Agent using LangChain. +### Tool Calling Agent -### Inputs +This component creates an agent for structured tool calling with various language models. + +
+Parameters + +**Inputs** | Name | Type | Description | |------|------|-------------| -| llm | LanguageModel | Language model to use for the agent | -| vectorstore | VectorStoreInfo | Vector store information for the agent to use | +| llm | LanguageModel | The language model to use. | +| tools | List[Tool] | The list of tools available to the agent. | +| system_message | String | The system message to use for the agent. | +| return_intermediate_steps | Boolean | This determines whether to return the agent's intermediate steps. | +| max_iterations | Integer | The maximum number of iterations to run the agent. | +| max_execution_time | Integer | The maximum execution time in seconds. | +| early_stopping_method | String | The method to use for early stopping. | +| verbose | Boolean | This determines whether to print the agent's thoughts. | -### Outputs +**Outputs** | Name | Type | Description | |------|------|-------------| -| agent | AgentExecutor | Vector Store Agent instance | +| agent | AgentExecutor | The tool calling agent instance. | -## Vector Store Router Agent +
-This component creates a Vector Store Router Agent using LangChain. - -### Inputs - -| Name | Type | Description | -|------|------|-------------| -| llm | LanguageModel | Language model to use for the agent | -| vectorstores | List[VectorStoreInfo] | List of vector store information for the agent to route between | - -### Outputs - -| Name | Type | Description | -|------|------|-------------| -| agent | AgentExecutor | Vector Store Router Agent instance | - -## XML Agent +### XML Agent This component creates an XML Agent using LangChain. The agent uses XML formatting for tool instructions to the Language Model. -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |------|------|-------------| -| llm | LanguageModel | Language model to use for the agent | -| user_prompt | String | Custom prompt template for the agent (includes XML formatting instructions) | -| tools | List[Tool] | List of tools available to the agent | +| llm | LanguageModel | The language model to use for the agent. | +| user_prompt | String | The custom prompt template for the agent with XML formatting instructions. | +| tools | List[Tool] | The list of tools available to the agent. | -### Outputs +**Outputs** | Name | Type | Description | |------|------|-------------| -| agent | AgentExecutor | XML Agent instance | \ No newline at end of file +| agent | AgentExecutor | The XML Agent instance. | + +
\ No newline at end of file diff --git a/docs/docs/Components/components-data.md b/docs/docs/Components/components-data.md index d30e3ad8c..cb28bdbc6 100644 --- a/docs/docs/Components/components-data.md +++ b/docs/docs/Components/components-data.md @@ -46,32 +46,10 @@ The equivalent call in this example is `curl -v https://dummy-json.mock.beecepto 5. Click **Playground**, and then click **Run Flow**. Your request returns a list of blog posts in the `result` field. -### Filter API request data +
+Parameters -The **API Request** component retrieved a list of JSON objects in the `result` field. -For this example, you will use the **Lambda Filter** to extract the desired data nested within the `result` field. - -1. Connect a **Lambda Filter** to the API request component, and a **Language model** to the **Lambda Filter**. This example connects a **Groq** model component. -2. In the **Groq** model component, add your **Groq** API key. -3. To filter the data, in the **Lambda filter** component, in the **Instructions** field, use natural language to describe how the data should be filtered. -For this example, enter: -``` -I want to explode the result column out into a Data object -``` -:::tip -Avoid punctuation in the **Instructions** field, as it can cause errors. -::: -4. To run the flow, in the **Lambda Filter** component, click . -5. To inspect the filtered data, in the **Lambda Filter** component, click . -The result is a structured DataFrame. -```text -| userId | id | title | body | link | comment_count | -|---|----|-------|------|------|---------------| -| 1 | 1 | Introduction to Artificial Intelligence | Learn the basics of AI ...| https://example.com/article1 | 8 | -| 2 | 2 | Web Development with React | Build modern web applications ...| https://example.com/article2 | 12 | -``` - -### Inputs +**Inputs** | Name | Display Name | Info | |------|--------------|------| @@ -84,39 +62,45 @@ The result is a structured DataFrame. | headers | Headers | The headers to send with the request as a dictionary. | | timeout | Timeout | The timeout to use for the request. | | follow_redirects | Follow Redirects | Whether to follow http redirects. | -| save_to_file | Save to File | Save the API response to a temporary file | +| save_to_file | Save to File | Save the API response to a temporary file. | | include_httpx_metadata | Include HTTPx Metadata | Include properties such as `headers`, `status_code`, `response_headers`, and `redirection_history` in the output. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| -| data | Data | The result of the API requests. Returns a Data object containing source URL and results. | +| data | Data | The result of the API requests. Returns a Data object containing source URL and results. | | dataframe | DataFrame | Converts the API response data into a tabular DataFrame format. | +
+ ## Directory This component recursively loads files from a directory, with options for file types, depth, and concurrency. -### Inputs +
+Parameters + +**Inputs** | Input | Type | Description | | ------------------ | ---------------- | -------------------------------------------------- | -| path | MessageTextInput | Path to the directory to load files from | -| types | MessageTextInput | File types to load (leave empty to load all types) | -| depth | IntInput | Depth to search for files | -| max_concurrency | IntInput | Maximum concurrency for loading files | -| load_hidden | BoolInput | If true, hidden files are loaded | -| recursive | BoolInput | If true, the search is recursive | -| silent_errors | BoolInput | If true, errors do not raise an exception | -| use_multithreading | BoolInput | If true, multithreading is used | +| path | MessageTextInput | The path to the directory to load files from. | +| types | MessageTextInput | The file types to load (leave empty to load all types). | +| depth | IntInput | The depth to search for files. | +| max_concurrency | IntInput | The maximum concurrency for loading files. | +| load_hidden | BoolInput | If true, hidden files are loaded. | +| recursive | BoolInput | If true, the search is recursive. | +| silent_errors | BoolInput | If true, errors do not raise an exception. | +| use_multithreading | BoolInput | If true, multithreading is used. | - -### Outputs +**Outputs** | Output | Type | Description | | ------ | ---------- | ----------------------------------- | -| data | List[Data] | Loaded file data from the directory | +| data | List[Data] | The loaded file data from the directory. | + +
## File @@ -132,13 +116,16 @@ The loaded file name appears in the component. The default maximum supported file size is 100 MB. To modify this value, see [--max-file-size-upload](/environment-variables#LANGFLOW_MAX_FILE_SIZE_UPLOAD). -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| -| path | Files | Path to file(s) to load. Supports individual files or bundled archives. | -| file_path | Server File Path | Data object with a `file_path` property pointing to the server file or a Message object with a path to the file. Supersedes 'Path' but supports the same file types. | -| separator | Separator | Specify the separator to use between multiple outputs in Message format. | +| path | Files | The path to files to load. Supports individual files or bundled archives. | +| file_path | Server File Path | A Data object with a `file_path` property pointing to the server file or a Message object with a path to the file. Supersedes 'Path' but supports the same file types. | +| separator | Separator | The separator to use between multiple outputs in Message format. | | silent_errors | Silent Errors | If true, errors do not raise an exception. | | delete_server_file_after_processing | Delete Server File After Processing | If true, the Server File Path is deleted after processing. | | ignore_unsupported_extensions | Ignore Unsupported Extensions | If true, files with unsupported extensions are not processed. | @@ -146,14 +133,15 @@ To modify this value, see [--max-file-size-upload](/environment-variables#LANGFL | use_multithreading | [Deprecated] Use Multithreading | Set 'Processing Concurrency' greater than `1` to enable multithreading. This option is deprecated. | | concurrency_multithreading | Processing Concurrency | When multiple files are being processed, the number of files to process concurrently. Default is 1. Values greater than 1 enable parallel processing for 2 or more files. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| -| data | Data | Parsed content of the file as a [Data](/concepts-objects) object. | -| dataframe | DataFrame | File content as a [DataFrame](/concepts-objects#dataframe-object) object. | -| message | Message | File content as a [Message](/concepts-objects#message-object) object. | +| data | Data | The parsed content of the file as a [Data](/concepts-objects) object. | +| dataframe | DataFrame | The file content as a [DataFrame](/concepts-objects#dataframe-object) object. | +| message | Message | The file content as a [Message](/concepts-objects#message-object) object. | +
### Supported File Types @@ -180,90 +168,14 @@ Archive formats (for bundling multiple files): - `.bz2` - Bzip2 compressed files - `.gz` - Gzip compressed files -## Gmail Loader - -:::info -Google components are available in the **Components** menu under **Bundles**. -For more information, see [Integrate Google OAuth with Langflow](/integrations-setup-google-oauth-langflow). -::: - -This component loads emails from Gmail using provided credentials and filters. - -For more on creating a service account JSON, see [Service Account JSON](https://developers.google.com/identity/protocols/oauth2/service-account). - -### Inputs - -| Input | Type | Description | -| ----------- | ---------------- | ------------------------------------------------------------------------------------ | -| json_string | SecretStrInput | JSON string containing OAuth 2.0 access token information for service account access | -| label_ids | MessageTextInput | Comma-separated list of label IDs to filter emails | -| max_results | MessageTextInput | Maximum number of emails to load | - -### Outputs - -| Output | Type | Description | -| ------ | ---- | ----------------- | -| data | Data | Loaded email data | - -## Google Drive Loader - -:::info -Google components are available in the **Components** menu under **Bundles**. -For more information, see [Integrate Google OAuth with Langflow](/integrations-setup-google-oauth-langflow). -::: - -This component loads documents from Google Drive using provided credentials and a single document ID. - -For more on creating a service account JSON, see [Service Account JSON](https://developers.google.com/identity/protocols/oauth2/service-account). - -### Inputs - -| Input | Type | Description | -| ----------- | ---------------- | ------------------------------------------------------------------------------------ | -| json_string | SecretStrInput | JSON string containing OAuth 2.0 access token information for service account access | -| document_id | MessageTextInput | Single Google Drive document ID | - -### Outputs - -| Output | Type | Description | -| ------ | ---- | -------------------- | -| docs | Data | Loaded document data | - -## Google Drive Search - -:::info -Google components are available in the **Components** menu under **Bundles**. -For more information, see [Integrate Google OAuth with Langflow](/integrations-setup-google-oauth-langflow). -::: - -This component searches Google Drive files using provided credentials and query parameters. - -For more on creating a service account JSON, see [Service Account JSON](https://developers.google.com/identity/protocols/oauth2/service-account). - -### Inputs - -| Input | Type | Description | -| -------------- | ---------------- | ------------------------------------------------------------------------------------ | -| token_string | SecretStrInput | JSON string containing OAuth 2.0 access token information for service account access | -| query_item | DropdownInput | The field to query | -| valid_operator | DropdownInput | Operator to use in the query | -| search_term | MessageTextInput | The value to search for in the specified query item | -| query_string | MessageTextInput | The query string used for searching (can be edited manually) | - -### Outputs - -| Output | Type | Description | -| ---------- | --------- | ----------------------------------------------- | -| doc_urls | List[str] | URLs of the found documents | -| doc_ids | List[str] | IDs of the found documents | -| doc_titles | List[str] | Titles of the found documents | -| Data | Data | Document titles and URLs in a structured format | - ## SQL Query This component executes SQL queries on a specified database. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| @@ -273,12 +185,14 @@ This component executes SQL queries on a specified database. | passthrough | Passthrough | If an error occurs, return the query instead of raising an exception. | | add_error | Add Error | Add the error to the result. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| | result | Result | The result of the SQL query execution. | +
+ ## URL This component fetches content from one or more URLs, processes the content, and returns it in various formats. It supports output in plain text, raw HTML, or JSON, with options for cleaning and separating multiple outputs. @@ -317,22 +231,27 @@ Result: Peruvian writer and Nobel Prize in Literature laureate Mario Vargas Llosa (pictured) dies at the age of 89. ``` -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| | urls | URLs | Enter one or more URLs. URLs are automatically validated and cleaned. | -| format | Output Format | Output Format. Use **Text** to extract text from the HTML, **Raw HTML** for the raw HTML content, or **JSON** to extract JSON from the HTML. | -| separator | Separator | Specify the separator to use between multiple outputs. Default for **Text** is `\n\n`. Default for **Raw HTML** is `\n\n`. | +| format | Output Format | The output format. Use **Text** to extract text from the HTML, **Raw HTML** for the raw HTML content, or **JSON** to extract JSON from the HTML. | +| separator | Separator | The separator to use between multiple outputs. Default for **Text** is `\n\n`. Default for **Raw HTML** is `\n\n`. | | clean_extra_whitespace | Clean Extra Whitespace | Whether to clean excessive blank lines in the text output. Only applies to `Text` format. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| -| data | Data | List of [Data](/concepts-objects) objects containing fetched content and metadata. | -| text | Text | Fetched content as formatted text, with applied separators and cleaning. | -| dataframe | DataFrame | Content formatted as a [DataFrame](/concepts-objects#dataframe-object) object. | +| data | Data | A list of [Data](/concepts-objects) objects containing fetched content and metadata. | +| text | Text | The fetched content as formatted text, with applied separators and cleaning. | +| dataframe | DataFrame | The content formatted as a [DataFrame](/concepts-objects#dataframe-object) object. | + +
## Webhook @@ -361,7 +280,10 @@ This mode passes the webhook's data as a string for the **Chat Output** componen 7. Open the **Playground**. Your JSON data is posted to the **Chat Output** component, which indicates that the webhook component is correctly triggering the flow. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Description | |------|--------------|-------------| @@ -369,8 +291,93 @@ Your JSON data is posted to the **Chat Output** component, which indicates that | curl | cURL | The cURL command template for making requests to this webhook. | | endpoint | Endpoint | The endpoint URL where this webhook receives requests. | -### Outputs +**Outputs** | Name | Display Name | Description | |------|--------------|-------------| | output_data | Data | Outputs processed data from the webhook input, and returns an empty [Data](/concepts-objects) object if no input is provided. If the input is not valid JSON, the component wraps it in a `payload` object. | + +
+ +## Legacy components + +Legacy components are available for use but are no longer supported. + +### Gmail Loader + +This component loads emails from Gmail using provided credentials and filters. + +For more information about creating a service account JSON, see [Service Account JSON](https://developers.google.com/identity/protocols/oauth2/service-account). + +
+Parameters + +**Inputs** + +| Input | Type | Description | +| ----------- | ---------------- | ------------------------------------------------------------------------------------ | +| json_string | SecretStrInput | A JSON string containing OAuth 2.0 access token information for service account access. | +| label_ids | MessageTextInput | A comma-separated list of label IDs to filter emails. | +| max_results | MessageTextInput | The maximum number of emails to load. | + +**Outputs** + +| Output | Type | Description | +| ------ | ---- | ----------------- | +| data | Data | The loaded email data. | + +
+ +### Google Drive Loader + +This component loads documents from Google Drive using provided credentials and a single document ID. + +For more information about creating a service account JSON, see [Service Account JSON](https://developers.google.com/identity/protocols/oauth2/service-account). + +
+Parameters + +**Inputs** + +| Input | Type | Description | +| ----------- | ---------------- | ------------------------------------------------------------------------------------ | +| json_string | SecretStrInput | A JSON string containing OAuth 2.0 access token information for service account access. | +| document_id | MessageTextInput | A single Google Drive document ID. | + +**Outputs** + +| Output | Type | Description | +| ------ | ---- | -------------------- | +| docs | Data | The loaded document data. | + +
+ +### Google Drive Search + +This component searches Google Drive files using provided credentials and query parameters. + +For more information about creating a service account JSON, see [Service Account JSON](https://developers.google.com/identity/protocols/oauth2/service-account). + +
+Parameters + +**Inputs** + +| Input | Type | Description | +| -------------- | ---------------- | ------------------------------------------------------------------------------------ | +| token_string | SecretStrInput | A JSON string containing OAuth 2.0 access token information for service account access. | +| query_item | DropdownInput | The field to query. | +| valid_operator | DropdownInput | The operator to use in the query. | +| search_term | MessageTextInput | The value to search for in the specified query item. | +| query_string | MessageTextInput | The query string used for searching. | + +**Outputs** + +| Output | Type | Description | +| ---------- | --------- | ----------------------------------------------- | +| doc_urls | List[str] | The URLs of the found documents. | +| doc_ids | List[str] | The IDs of the found documents. | +| doc_titles | List[str] | The titles of the found documents. | +| Data | Data | The document titles and URLs in a structured format. | + +
\ No newline at end of file diff --git a/docs/docs/Components/components-embedding-models.md b/docs/docs/Components/components-embedding-models.md index 8c6801ef1..61f861e08 100644 --- a/docs/docs/Components/components-embedding-models.md +++ b/docs/docs/Components/components-embedding-models.md @@ -7,7 +7,7 @@ import Icon from "@site/src/components/icon"; # Embeddings models in Langflow -Embeddings models convert text into numerical vectors. These embeddings capture semantic meaning of the input text, and allow LLMs to understand context. +Embeddings models convert text into numerical vectors. These embeddings capture the semantic meaning of the input text, and allow LLMs to understand context. Refer to your specific component's documentation for more information on parameters. @@ -23,43 +23,53 @@ This embeddings component uses an OpenAI API key for authentication. Refer to yo This component generates embeddings using the [AI/ML API](https://docs.aimlapi.com/api-overview/embeddings). -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |------|------|-------------| -| model_name | String | The name of the AI/ML embedding model to use | -| aiml_api_key | SecretString | API key for authenticating with the AI/ML service | +| model_name | String | The name of the AI/ML embedding model to use. | +| aiml_api_key | SecretString | The API key required for authenticating with the AI/ML service. | -### Outputs +**Outputs** | Name | Type | Description | |------|------|-------------| -| embeddings | Embeddings | An instance of AIMLEmbeddingsImpl for generating embeddings | +| embeddings | Embeddings | An instance of `AIMLEmbeddingsImpl` for generating embeddings. | + +
## Amazon Bedrock Embeddings This component is used to load embedding models from [Amazon Bedrock](https://aws.amazon.com/bedrock/). -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |------|------|-------------| -| credentials_profile_name | String | Name of the AWS credentials profile in ~/.aws/credentials or ~/.aws/config, which has access keys or role information | -| model_id | String | ID of the model to call, e.g., `amazon.titan-embed-text-v1`. This is equivalent to the `modelId` property in the `list-foundation-models` API | -| endpoint_url | String | URL to set a specific service endpoint other than the default AWS endpoint | -| region_name | String | AWS region to use, e.g., `us-west-2`. Falls back to `AWS_DEFAULT_REGION` environment variable or region specified in ~/.aws/config if not provided | +| credentials_profile_name | String | The name of the AWS credentials profile in `~/.aws/credentials` or `~/.aws/config`, which has access keys or role information. | +| model_id | String | The ID of the model to call, such as `amazon.titan-embed-text-v1`. This is equivalent to the `modelId` property in the `list-foundation-models` API. | +| endpoint_url | String | The URL to set a specific service endpoint other than the default AWS endpoint. | +| region_name | String | The AWS region to use, such as `us-west-2`. Falls back to the `AWS_DEFAULT_REGION` environment variable or region specified in `~/.aws/config` if not provided. | -### Outputs +**Outputs** | Name | Type | Description | |------|------|-------------| -| embeddings | Embeddings | An instance for generating embeddings using Amazon Bedrock | +| embeddings | Embeddings | An instance for generating embeddings using Amazon Bedrock. | + +
## Astra DB vectorize :::important This component is deprecated as of Langflow version 1.1.2. -Instead, use the [Astra DB vector store component](/components-vector-stores#astra-db-vector-store) +Instead, use the [Astra DB vector store component](/components-vector-stores#astra-db-vector-store). ::: Connect this component to the **Embeddings** port of the [Astra DB vector store component](/components-vector-stores#astra-db-vector-store) to generate embeddings. @@ -67,115 +77,145 @@ Connect this component to the **Embeddings** port of the [Astra DB vector store This component requires that your Astra DB database has a collection that uses a vectorize embedding provider integration. For more information and instructions, see [Embedding Generation](https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html). -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| -| provider | Embedding Provider | The embedding provider to use | -| model_name | Model Name | The embedding model to use | +| provider | Embedding Provider | The embedding provider to use. | +| model_name | Model Name | The embedding model to use. | | authentication | Authentication | The name of the API key in Astra that stores your [vectorize embedding provider credentials](https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html#embedding-provider-authentication). (Not required if using an [Astra-hosted embedding provider](https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html#supported-embedding-providers).) | | provider_api_key | Provider API Key | As an alternative to `authentication`, directly provide your embedding provider credentials. | -| model_parameters | Model Parameters | Additional model parameters | +| model_parameters | Model Parameters | Additional model parameters. | -### Outputs +**Outputs** | Name | Type | Description | |------|------|-------------| -| embeddings | Embeddings | An instance for generating embeddings using Astra vectorize | | | +| embeddings | Embeddings | An instance for generating embeddings using Astra vectorize. | + +
## Azure OpenAI Embeddings This component generates embeddings using Azure OpenAI models. -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |------|------|-------------| -| Model | String | Name of the model to use (default: `text-embedding-3-small`) | -| Azure Endpoint | String | Your Azure endpoint, including the resource. Example: `https://example-resource.azure.openai.com/` | -| Deployment Name | String | The name of the deployment | -| API Version | String | The API version to use, options include various dates | -| API Key | String | The API key to access the Azure OpenAI service | +| Model | String | The name of the model to use. Default: `text-embedding-3-small`. | +| Azure Endpoint | String | Your Azure endpoint, including the resource, such as `https://example-resource.azure.openai.com/`. | +| Deployment Name | String | The name of the deployment. | +| API Version | String | The API version to use, with options including various dates. | +| API Key | String | The API key required to access the Azure OpenAI service. | -### Outputs +**Outputs** | Name | Type | Description | |------|------|-------------| -| embeddings | Embeddings | An instance for generating embeddings using Azure OpenAI | +| embeddings | Embeddings | An instance for generating embeddings using Azure OpenAI. | + +
## Cloudflare Workers AI Embeddings This component generates embeddings using [Cloudflare Workers AI models](https://developers.cloudflare.com/workers-ai/). -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| -| account_id | Cloudflare account ID |[Find your Cloudflare account ID](https://developers.cloudflare.com/fundamentals/setup/find-account-and-zone-ids/#find-account-id-workers-and-pages) | -| api_token | Cloudflare API token | [Create an API token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/) | -| model_name | Model Name | [List of supported models](https://developers.cloudflare.com/workers-ai/models/#text-embeddings) | -| strip_new_lines | Strip New Lines | Whether to strip new lines from the input text | -| batch_size | Batch Size | Number of texts to embed in each batch | -| api_base_url | Cloudflare API base URL | Base URL for the Cloudflare API | -| headers | Headers | Additional request headers | +| account_id | Cloudflare account ID | [Find your Cloudflare account ID](https://developers.cloudflare.com/fundamentals/setup/find-account-and-zone-ids/#find-account-id-workers-and-pages). | +| api_token | Cloudflare API token | [Create an API token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). | +| model_name | Model Name | [List of supported models](https://developers.cloudflare.com/workers-ai/models/#text-embeddings). | +| strip_new_lines | Strip New Lines | Whether to strip new lines from the input text. | +| batch_size | Batch Size | The number of texts to embed in each batch. | +| api_base_url | Cloudflare API base URL | The base URL for the Cloudflare API. | +| headers | Headers | Additional request headers. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| -| embeddings | Embeddings | An instance for generating embeddings using Cloudflare Workers | +| embeddings | Embeddings | An instance for generating embeddings using Cloudflare Workers. | + +
## Cohere Embeddings This component is used to load embedding models from [Cohere](https://cohere.com/). -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |------|------|-------------| -| cohere_api_key | String | API key required to authenticate with the Cohere service | -| model | String | Language model used for embedding text documents and performing queries (default: `embed-english-v2.0`) | -| truncate | Boolean | Whether to truncate the input text to fit within the model's constraints (default: `False`) | +| cohere_api_key | String | The API key required to authenticate with the Cohere service. | +| model | String | The language model used for embedding text documents and performing queries. Default: `embed-english-v2.0`. | +| truncate | Boolean | Whether to truncate the input text to fit within the model's constraints. Default: `False`. | -### Outputs +**Outputs** | Name | Type | Description | |------|------|-------------| -| embeddings | Embeddings | An instance for generating embeddings using Cohere | +| embeddings | Embeddings | An instance for generating embeddings using Cohere. | + +
## Embedding similarity This component computes selected forms of similarity between two embedding vectors. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| | embedding_vectors | Embedding Vectors | A list containing exactly two data objects with embedding vectors to compare. | | similarity_metric | Similarity Metric | Select the similarity metric to use. Options: "Cosine Similarity", "Euclidean Distance", "Manhattan Distance". | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| -| similarity_data | Similarity Data | Data object containing the computed similarity score and additional information. | +| similarity_data | Similarity Data | A data object containing the computed similarity score and additional information. | + +
## Google generative AI embeddings This component connects to Google's generative AI embedding service using the GoogleGenerativeAIEmbeddings class from the `langchain-google-genai` package. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| -| api_key | API Key | Secret API key for accessing Google's generative AI service (required) | -| model_name | Model Name | Name of the embedding model to use (default: "models/text-embedding-004") | +| api_key | API Key | The secret API key for accessing Google's generative AI service. Required. | +| model_name | Model Name | The name of the embedding model to use. Default: "models/text-embedding-004". | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| -| embeddings | Embeddings | Built GoogleGenerativeAIEmbeddings object | +| embeddings | Embeddings | The built GoogleGenerativeAIEmbeddings object. | + +
## Hugging Face Embeddings @@ -188,21 +228,26 @@ This component loads embedding models from HuggingFace. Use this component to generate embeddings using locally downloaded Hugging Face models. Ensure you have sufficient computational resources to run the models. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| -| Cache Folder | Cache Folder | Folder path to cache HuggingFace models | -| Encode Kwargs | Encoding Arguments | Additional arguments for the encoding process | -| Model Kwargs | Model Arguments | Additional arguments for the model | -| Model Name | Model Name | Name of the HuggingFace model to use | -| Multi Process | Multi-Process | Whether to use multiple processes | +| Cache Folder | Cache Folder | The folder path to cache HuggingFace models. | +| Encode Kwargs | Encoding Arguments | Additional arguments for the encoding process. | +| Model Kwargs | Model Arguments | Additional arguments for the model. | +| Model Name | Model Name | The name of the HuggingFace model to use. | +| Multi Process | Multi-Process | Whether to use multiple processes. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| -| embeddings | Embeddings | The generated embeddings | +| embeddings | Embeddings | The generated embeddings. | + +
## Hugging Face embeddings inference @@ -210,7 +255,10 @@ This component generates embeddings using [Hugging Face Inference API models](ht Use this component to create embeddings with Hugging Face's hosted models, or to connect to your own locally hosted models. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| @@ -218,12 +266,14 @@ Use this component to create embeddings with Hugging Face's hosted models, or to | API URL | API URL | The URL of the Hugging Face Inference API. | | Model Name | Model Name | The name of the model to use for embeddings. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| | embeddings | Embeddings | The generated embeddings. | +
+ ### Connect the Hugging Face component to a local embeddings model To run an embeddings inference locally, see the [HuggingFace documentation](https://huggingface.co/docs/text-embeddings-inference/local_cpu). @@ -265,81 +315,101 @@ The component supports several default models with the following vector dimensio The component automatically fetches and updates the list of available models from your watsonx.ai instance when you provide your API endpoint and credentials. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| -| url | watsonx API Endpoint | The base URL of the API.| +| url | watsonx API Endpoint | The base URL of the API. | | project_id | watsonx project id | The project ID for your watsonx.ai instance. | -| api_key | API Key | The API Key to use for the model.| -| model_name | Model Name | The name of the embedding model to use.| +| api_key | API Key | The API Key to use for the model. | +| model_name | Model Name | The name of the embedding model to use. | | truncate_input_tokens | Truncate Input Tokens | The maximum number of tokens to process. Default: `200`. | | input_text | Include the original text in the output | Determines if the original text is included in the output. Default: `True`. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| -| embeddings | Embeddings | An instance for generating embeddings using watsonx.ai | +| embeddings | Embeddings | An instance for generating embeddings using watsonx.ai. | + +
## LM Studio Embeddings This component generates embeddings using [LM Studio](https://lmstudio.ai/docs) models. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| -| model | Model | The LM Studio model to use for generating embeddings | -| base_url | LM Studio Base URL | The base URL for the LM Studio API | -| api_key | LM Studio API Key | API key for authentication with LM Studio | -| temperature | Model Temperature | Temperature setting for the model | +| model | Model | The LM Studio model to use for generating embeddings. | +| base_url | LM Studio Base URL | The base URL for the LM Studio API. | +| api_key | LM Studio API Key | The API key for authentication with LM Studio. | +| temperature | Model Temperature | The temperature setting for the model. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| -| embeddings | Embeddings | The generated embeddings | +| embeddings | Embeddings | The generated embeddings. | + +
## MistralAI This component generates embeddings using [MistralAI](https://docs.mistral.ai/) models. -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |------|------|-------------| -| model | String | The MistralAI model to use (default: "mistral-embed") | -| mistral_api_key | SecretString | API key for authenticating with MistralAI | -| max_concurrent_requests | Integer | Maximum number of concurrent API requests (default: 64) | -| max_retries | Integer | Maximum number of retry attempts for failed requests (default: 5) | -| timeout | Integer | Request timeout in seconds (default: 120) | -| endpoint | String | Custom API endpoint URL (default: `https://api.mistral.ai/v1/`) | +| model | String | The MistralAI model to use. Default: "mistral-embed". | +| mistral_api_key | SecretString | The API key for authenticating with MistralAI. | +| max_concurrent_requests | Integer | The maximum number of concurrent API requests. Default: 64. | +| max_retries | Integer | The maximum number of retry attempts for failed requests. Default: 5. | +| timeout | Integer | The request timeout in seconds. Default: 120. | +| endpoint | String | The custom API endpoint URL. Default: `https://api.mistral.ai/v1/`). | -### Outputs +**Outputs** | Name | Type | Description | |------|------|-------------| -| embeddings | Embeddings | MistralAIEmbeddings instance for generating embeddings | +| embeddings | Embeddings | A MistralAIEmbeddings instance for generating embeddings. | + +
## NVIDIA This component generates embeddings using [NVIDIA models](https://docs.nvidia.com). -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |------|------|-------------| -| model | String | The NVIDIA model to use for embeddings (e.g., `nvidia/nv-embed-v1`) | -| base_url | String | Base URL for the NVIDIA API (default: `https://integrate.api.nvidia.com/v1`) | -| nvidia_api_key | SecretString | API key for authenticating with NVIDIA's service | -| temperature | Float | Model temperature for embedding generation (default: `0.1`) | +| model | String | The NVIDIA model to use for embeddings, such as `nvidia/nv-embed-v1`. | +| base_url | String | The base URL for the NVIDIA API. Default: `https://integrate.api.nvidia.com/v1`. | +| nvidia_api_key | SecretString | The API key for authenticating with NVIDIA's service. | +| temperature | Float | The model temperature for embedding generation. Default: `0.1`. | -### Outputs +**Outputs** | Name | Type | Description | |------|------|-------------| -| embeddings | Embeddings | NVIDIAEmbeddings instance for generating embeddings | +| embeddings | Embeddings | A NVIDIAEmbeddings instance for generating embeddings. | + +
## Ollama embeddings @@ -360,97 +430,117 @@ For example, this flow connects a local Ollama server running a `all-minilm:late For more information, see the [Ollama documentation](https://ollama.com/). -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |------|------|-------------| -| Ollama Model | String | Name of the Ollama model to use (default: `llama2`) | -| Ollama Base URL | String | Base URL of the Ollama API (default: `http://localhost:11434`) | -| Model Temperature | Float | Temperature parameter for the model. Adjusts the randomness in the generated embeddings | +| Ollama Model | String | The name of the Ollama model to use. Default: `llama2`. | +| Ollama Base URL | String | The base URL of the Ollama API. Default: `http://localhost:11434`. | +| Model Temperature | Float | The temperature parameter for the model. Adjusts the randomness in the generated embeddings. | -### Outputs +**Outputs** | Name | Type | Description | |------|------|-------------| -| embeddings | Embeddings | An instance for generating embeddings using Ollama | +| embeddings | Embeddings | An instance for generating embeddings using Ollama. | + +
## OpenAI Embeddings This component is used to load embedding models from [OpenAI](https://openai.com/). -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |------|------|-------------| -| OpenAI API Key | String | The API key to use for accessing the OpenAI API | -| Default Headers | Dict | Default headers for the HTTP requests | -| Default Query | NestedDict | Default query parameters for the HTTP requests | -| Allowed Special | List | Special tokens allowed for processing (default: `[]`) | -| Disallowed Special | List | Special tokens disallowed for processing (default: `["all"]`) | -| Chunk Size | Integer | Chunk size for processing (default: `1000`) | -| Client | Any | HTTP client for making requests | -| Deployment | String | Deployment name for the model (default: `text-embedding-3-small`) | -| Embedding Context Length | Integer | Length of embedding context (default: `8191`) | -| Max Retries | Integer | Maximum number of retries for failed requests (default: `6`) | -| Model | String | Name of the model to use (default: `text-embedding-3-small`) | -| Model Kwargs | NestedDict | Additional keyword arguments for the model | -| OpenAI API Base | String | Base URL of the OpenAI API | -| OpenAI API Type | String | Type of the OpenAI API | -| OpenAI API Version | String | Version of the OpenAI API | -| OpenAI Organization | String | Organization associated with the API key | -| OpenAI Proxy | String | Proxy server for the requests | -| Request Timeout | Float | Timeout for the HTTP requests | -| Show Progress Bar | Boolean | Whether to show a progress bar for processing (default: `False`) | -| Skip Empty | Boolean | Whether to skip empty inputs (default: `False`) | -| TikToken Enable | Boolean | Whether to enable TikToken (default: `True`) | -| TikToken Model Name | String | Name of the TikToken model | +| OpenAI API Key | String | The API key to use for accessing the OpenAI API. | +| Default Headers | Dict | The default headers for the HTTP requests. | +| Default Query | NestedDict | The default query parameters for the HTTP requests. | +| Allowed Special | List | The special tokens allowed for processing. Default: `[]`. | +| Disallowed Special | List | The special tokens disallowed for processing. Default: `["all"]`. | +| Chunk Size | Integer | The chunk size for processing. Default: `1000`. | +| Client | Any | The HTTP client for making requests. | +| Deployment | String | The deployment name for the model. Default: `text-embedding-3-small`. | +| Embedding Context Length | Integer | The length of embedding context. Default: `8191`. | +| Max Retries | Integer | The maximum number of retries for failed requests. Default: `6`. | +| Model | String | The name of the model to use. Default: `text-embedding-3-small`. | +| Model Kwargs | NestedDict | Additional keyword arguments for the model. | +| OpenAI API Base | String | The base URL of the OpenAI API. | +| OpenAI API Type | String | The type of the OpenAI API. | +| OpenAI API Version | String | The version of the OpenAI API. | +| OpenAI Organization | String | The organization associated with the API key. | +| OpenAI Proxy | String | The proxy server for the requests. | +| Request Timeout | Float | The timeout for the HTTP requests. | +| Show Progress Bar | Boolean | Whether to show a progress bar for processing. Default: `False`. | +| Skip Empty | Boolean | Whether to skip empty inputs. Default: `False`. | +| TikToken Enable | Boolean | Whether to enable TikToken. Default: `True`. | +| TikToken Model Name | String | The name of the TikToken model. | -### Outputs +**Outputs** | Name | Type | Description | |------|------|-------------| -| embeddings | Embeddings | An instance for generating embeddings using OpenAI | +| embeddings | Embeddings | An instance for generating embeddings using OpenAI. | + +
## Text embedder This component generates embeddings for a given message using a specified embedding model. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| | embedding_model | Embedding Model | The embedding model to use for generating embeddings. | | message | Message | The message for which to generate embeddings. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| -| embeddings | Embedding Data | Data object containing the original text and its embedding vector. | +| embeddings | Embedding Data | A data object containing the original text and its embedding vector. | + +
## VertexAI Embeddings This component is a wrapper around [Google Vertex AI](https://cloud.google.com/vertex-ai) [Embeddings API](https://cloud.google.com/vertex-ai/docs/generative-ai/embeddings/get-text-embeddings). -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |------|------|-------------| -| credentials | Credentials | The default custom credentials to use | -| location | String | The default location to use when making API calls (default: `us-central1`) | -| max_output_tokens | Integer | Token limit determines the maximum amount of text output from one prompt (default: `128`) | -| model_name | String | The name of the Vertex AI large language model (default: `text-bison`) | -| project | String | The default GCP project to use when making Vertex API calls | -| request_parallelism | Integer | The amount of parallelism allowed for requests issued to VertexAI models (default: `5`) | -| temperature | Float | Tunes the degree of randomness in text generations. Should be a non-negative value (default: `0`) | -| top_k | Integer | How the model selects tokens for output, the next token is selected from the top `k` tokens (default: `40`) | -| top_p | Float | Tokens are selected from the most probable to least until the sum of their probabilities exceeds the top `p` value (default: `0.95`) | -| tuned_model_name | String | The name of a tuned model. If provided, `model_name` is ignored | -| verbose | Boolean | This parameter controls the level of detail in the output. When set to `True`, it prints internal states of the chain to help debug (default: `False`) | +| credentials | Credentials | The default custom credentials to use. | +| location | String | The default location to use when making API calls. Default: `us-central1`. | +| max_output_tokens | Integer | The token limit determines the maximum amount of text output from one prompt. Default: `128`. | +| model_name | String | The name of the Vertex AI large language model. Default: `text-bison`. | +| project | String | The default GCP project to use when making Vertex API calls. | +| request_parallelism | Integer | The amount of parallelism allowed for requests issued to VertexAI models. Default: `5`. | +| temperature | Float | Tunes the degree of randomness in text generations. Should be a non-negative value. Default: `0`. | +| top_k | Integer | How the model selects tokens for output. The next token is selected from the top `k` tokens. Default: `40`. | +| top_p | Float | Tokens are selected from the most probable to least until the sum of their probabilities exceeds the top `p` value. Default: `0.95`. | +| tuned_model_name | String | The name of a tuned model. If provided, `model_name` is ignored. | +| verbose | Boolean | This parameter controls the level of detail in the output. When set to `True`, it prints internal states of the chain to help debug. Default: `False`. | -### Outputs +**Outputs** | Name | Type | Description | |------|------|-------------| -| embeddings | Embeddings | An instance for generating embeddings using VertexAI | +| embeddings | Embeddings | An instance for generating embeddings using VertexAI. | + +
diff --git a/docs/docs/Components/components-helpers.md b/docs/docs/Components/components-helpers.md index e23139557..928d06524 100644 --- a/docs/docs/Components/components-helpers.md +++ b/docs/docs/Components/components-helpers.md @@ -52,53 +52,68 @@ record_number: {batch_index}, name: {text_input}, summary: {model_response} 8. To view your created DataFrame, in the **Parser** component, click . 9. Optionally, connect a **Chat Output** component, and open the **Playground** to see the output. -### Inputs +
+Parameters -| Name | Display Name | Type | Info | -|------|--------------|------|------| -| model | Language Model | HandleInput | Connect the 'Language Model' output from your LLM component here. Required. | -| system_message | System Message | MultilineInput | Multi-line system instruction for all rows in the DataFrame. | -| df | DataFrame | DataFrameInput | The DataFrame whose column is treated as text messages, as specified by 'column_name'. Required. | -| column_name | Column Name | MessageTextInput | The name of the DataFrame column to treat as text messages. Default='text'. Required. | -| enable_metadata | Enable Metadata | BoolInput | If True, add metadata to the output DataFrame. | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| model | HandleInput | Connect the 'Language Model' output from your LLM component here. Required. | +| system_message | MultilineInput | A multi-line system instruction for all rows in the DataFrame. | +| df | DataFrameInput | The DataFrame whose column is treated as text messages, as specified by 'column_name'. Required. | +| column_name | MessageTextInput | The name of the DataFrame column to treat as text messages. Default='text'. Required. | +| enable_metadata | BoolInput | If True, add metadata to the output DataFrame. | -| Name | Display Name | Method | Info | -|------|--------------|--------|------| -| batch_results | Batch Results | run_batch | A DataFrame with columns: 'text_input', 'model_response', 'batch_index', and optional 'metadata' containing processing information. | +**Outputs** + +| Name | Type | Description | +|------|------|-------------| +| batch_results | DataFrame | A DataFrame with columns: 'text_input', 'model_response', 'batch_index', and optional 'metadata' containing processing information. | + +
## Current date The Current Date component returns the current date and time in a selected timezone. This component provides a flexible way to obtain timezone-specific date and time information within a Langflow pipeline. -### Inputs +
+Parameters -| Name | Display Name | Info | -|------|--------------|------| -|timezone|Timezone|Select the timezone for the current date and time. +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| timezone | String | The timezone for the current date and time. | -| Name | Display Name | Info | -|------|--------------|------| -|current_date|Current Date|The resulting current date and time in the selected timezone. +**Outputs** + +| Name | Type | Description | +|------|------|-------------| +| current_date | String | The resulting current date and time in the selected timezone. | + +
## ID Generator This component generates a unique ID. -### Inputs +
+Parameters -| Name | Display Name | Info | -|------|--------------|------| -| unique_id| Value | The generated unique ID. | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| unique_id | String | The generated unique ID. | -| Name | Display Name | Info | -|------|--------------|------| -| id | ID | The generated unique ID. | +**Outputs** + +| Name | Type | Description | +|------|------|-------------| +| id | String | The generated unique ID. | + +
## Message history @@ -114,25 +129,30 @@ In this example, the **Message Store** component stores the complete chat histor For more information on configuring memory in Langflow, see [Memory](/memory). -### Inputs +
+Parameters -| Name | Display Name | Info | -|------|--------------|------| -| memory | External Memory | Retrieve messages from an external memory. If empty, it will use the Langflow tables. | -| sender | Sender Type | Filter by sender type. | -| sender_name | Sender Name | Filter by sender name. | -| n_messages | Number of Messages | Number of messages to retrieve. | -| session_id | Session ID | The session ID of the chat. If empty, the current session ID parameter will be used. | -| order | Order | Order of the messages. | -| template | Template | The template to use for formatting the data. It can contain the keys `{text}`, `{sender}` or any other key in the message data. | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| memory | Memory | Retrieve messages from an external memory. If empty, the Langflow tables are used. | +| sender | String | Filter by sender type. | +| sender_name | String | Filter by sender name. | +| n_messages | Integer | The number of messages to retrieve. | +| session_id | String | The session ID of the chat. If empty, the current session ID parameter is used. | +| order | String | The order of the messages. | +| template | String | The template to use for formatting the data. It can contain the keys `{text}`, `{sender}` or any other key in the message data. | -| Name | Display Name | Info | -|------|--------------|------| -| messages | Messages (Data) | Retrieved messages as Data objects. | -| messages_text | Messages (Text) | Retrieved messages formatted as text. | -| lc_memory | Memory | A constructed Langchain [ConversationBufferMemory](https://api.python.langchain.com/en/latest/memory/langchain.memory.buffer.ConversationBufferMemory.html) object | +**Outputs** + +| Name | Type | Description | +|------|------|-------------| +| messages | Data | The retrieved messages as Data objects. | +| messages_text | String | The retrieved messages formatted as text. | +| lc_memory | Memory | A constructed Langchain [ConversationBufferMemory](https://api.python.langchain.com/en/latest/memory/langchain.memory.buffer.ConversationBufferMemory.html) object. | + +
## Message store @@ -144,21 +164,26 @@ In this example, the **Message Store** component stores the complete chat histor For more information on configuring memory in Langflow, see [Memory](/memory). -### Inputs +
+Parameters -| Name | Display Name | Info | -|------|--------------|------| -| message | Message | The chat message to be stored. (Required) | -| memory | External Memory | The external memory to store the message. If empty, it will use the Langflow tables. | -| sender | Sender | The sender of the message. Can be Machine or User. If empty, the current sender parameter will be used. | -| sender_name | Sender Name | The name of the sender. Can be AI or User. If empty, the current sender parameter will be used. | -| session_id | Session ID | The session ID of the chat. If empty, the current session ID parameter will be used. | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| message | String | The chat message to be stored. (Required) | +| memory | Memory | The external memory to store the message. If empty, the Langflow tables are used. | +| sender | String | The sender of the message. Can be Machine or User. If empty, the current sender parameter is used. | +| sender_name | String | The name of the sender. Can be AI or User. If empty, the current sender parameter is used. | +| session_id | String | The session ID of the chat. If empty, the current session ID parameter is used. | -| Name | Display Name | Info | -|------|--------------|------| -| stored_messages | Stored Messages | The list of stored messages after the current message has been added. | +**Outputs** + +| Name | Type | Description | +|------|------|-------------| +| stored_messages | List[Data] | The list of stored messages after the current message has been added. | + +
## Structured output @@ -182,23 +207,27 @@ The **Parse DataFrame** component parses the structured output into a template f For example, the template `EBITDA: {EBITDA} , Net Income: {NET_INCOME} , GROSS_PROFIT: {GROSS_PROFIT}` presents the extracted values in the **Playground** as `EBITDA: 900 million , Net Income: 500 million , GROSS_PROFIT: 1.2 billion`. -### Inputs +
+Parameters -| Name | Display Name | Info | -|------|--------------|------| -| llm | Language Model | The language model to use to generate the structured output. | -| input_value | Input Message | The input message to the language model. | -| system_prompt | Format Instructions | Instructions to the language model for formatting the output. | -| schema_name | Schema Name | The name for the output data schema. | -| output_schema | Output Schema | Defines the structure and data types for the model's output.| -| multiple | Generate Multiple | [Deprecated] Always set to `True`. | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| llm | LanguageModel | The language model to use to generate the structured output. | +| input_value | String | The input message to the language model. | +| system_prompt | String | The instructions to the language model for formatting the output. | +| schema_name | String | The name for the output data schema. | +| output_schema | Table | The structure and data types for the model's output. | +| multiple | Boolean | [Deprecated] Always set to `True`. | -| Name | Display Name | Info | -|------|--------------|------| -| structured_output | Structured Output | The structured output is a Data object based on the defined schema. | -| structured_output_dataframe | DataFrame | The structured output converted to a [DataFrame](/concepts-objects#dataframe-object) format. | +**Outputs** + +| Name | Type | Description | +|------|------|-------------| +| structured_output | Data | The structured output is a Data object based on the defined schema. | + +
## Legacy components @@ -208,19 +237,24 @@ Legacy components are available for use but are no longer supported. This component dynamically creates a record with a specified number of fields. -#### Inputs +
+Parameters -| Name | Display Name | Info | -|------|--------------|------| -| n_fields | Number of Fields | Number of fields to be added to the record. | -| text_key | Text Key | Key used as text. | +**Inputs** -#### Outputs +| Name | Type | Description | +|------|------|-------------| +| n_fields | Integer | The number of fields to be added to the record. | +| text_key | String | The key used as text. | -| Name | Display Name | Info | -|------|--------------|------| +**Outputs** + +| Name | Type | Description | +|------|------|-------------| | list | List | The dynamically created list with the specified number of fields. | +
+ ### Output Parser This component transforms the output of a language model into a specified format. It supports CSV format parsing, which converts LLM responses into comma-separated lists using Langchain's `CommaSeparatedListOutputParser`. @@ -246,15 +280,20 @@ Please list three fruits. 4. The output parser converts this into a Python list: `["apple", "banana", "orange"]`. -#### Inputs +
+Parameters -| Name | Display Name | Info | -|------|--------------|------| -| parser_type | Parser | Select the parser type. Currently supports "CSV". | +**Inputs** -#### Outputs +| Name | Type | Description | +|------|------|-------------| +| parser_type | String | The parser type. Currently supports "CSV". | -| Name | Display Name | Info | -|------|--------------|------| -| format_instructions | Format Instructions | Pass to a prompt template to include formatting instructions for LLM responses. | -| output_parser | Output Parser | The constructed output parser that can be used to parse LLM responses. | \ No newline at end of file +**Outputs** + +| Name | Type | Description | +|------|------|-------------| +| format_instructions | String | Pass to a prompt template to include formatting instructions for LLM responses. | +| output_parser | Parser | The constructed output parser that can be used to parse LLM responses. | + +
\ No newline at end of file diff --git a/docs/docs/Components/components-io.md b/docs/docs/Components/components-io.md index 93540392b..fc6b4b856 100644 --- a/docs/docs/Components/components-io.md +++ b/docs/docs/Components/components-io.md @@ -23,7 +23,10 @@ This component collects user input as `Text` strings from the chat and wraps it It can optionally store the message in a chat history. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| @@ -37,12 +40,14 @@ It can optionally store the message in a chat history. |chat_icon|Icon|The icon of the message.| |text_color|Text Color|The text color of the name.| -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| |message|Message|The resulting chat message object with all specified properties.| +
+ ### Message method The `ChatInput` class provides an asynchronous method to create and store a `Message` object based on the input parameters. @@ -69,18 +74,22 @@ The **Text Input** component accepts a text string input and returns a `Message` The output does not appear in the **Playground**. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| |input_value|Text|The text/content to be passed as output.| -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| |text|Text|The resulting text message.| +
## Chat Output @@ -91,7 +100,10 @@ The component accepts the following input types. * [DataFrame](/concepts-objects#dataframe-object) * [Message](/concepts-objects#message-object) -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| @@ -106,12 +118,13 @@ The component accepts the following input types. |text_color|Text Color|The text color of the name.| |clean_data|Basic Clean Data|When enabled, `DataFrame` inputs are cleaned when converted to text. Cleaning removes empty rows, empty lines in cells, and multiple newlines.| -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| |message|Message|The resulting chat message object with all specified properties.| +
## Text Output @@ -119,18 +132,23 @@ The **Text Output** takes a single input of text and returns a [Message](/concep The output does not appear in the **Playground**. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| |input_value|Text|The text to be passed as output.| -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| |text|Text|The resulting text message.| +
+ ## Chat components example flow 1. To use the **Chat Input** and **Chat Output** components in a flow, connect them to components that accept or send the [Message](/concepts-objects#message-object) type. @@ -174,7 +192,7 @@ Click **Outputs** to view the sent message: ```text "outputs": "text_output": - "message": "To install Docker on a Mac with an M1 chip, you should use Docker Desktop for Mac, which is optimized for Apple Silicon. Here’s a step-by-step guide to installing Docker on your M1 Mac:\n\n1. + "message": "To install Docker on a Mac with an M1 chip, you should use Docker Desktop for Mac, which is optimized for Apple Silicon. Here's a step-by-step guide to installing Docker on your M1 Mac:\n\n1. ... "type": "text" ``` diff --git a/docs/docs/Components/components-loaders.md b/docs/docs/Components/components-loaders.md index 67b481412..275ecb61c 100644 --- a/docs/docs/Components/components-loaders.md +++ b/docs/docs/Components/components-loaders.md @@ -23,60 +23,75 @@ This loaded data informs the **Open AI** component's responses to your questions The Confluence component integrates with the Confluence wiki collaboration platform to load and process documents. It utilizes the ConfluenceLoader from LangChain to fetch content from a specified Confluence space. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | | --- | --- | --- | -| url | Site URL | The base URL of the Confluence Space (e.g., `https://company.atlassian.net/wiki`) | -| username | Username | Atlassian User E-mail (e.g., `email@example.com`) | -| api_key | API Key | Atlassian API Key (Create an API key at: [Atlassian](https://id.atlassian.com/manage-profile/security/api-tokens)) | -| space_key | Space Key | The key of the Confluence space to access | -| cloud | Use Cloud? | Whether to use Confluence Cloud (default: true) | -| content_format | Content Format | Specify content format (default: STORAGE) | -| max_pages | Max Pages | Maximum number of pages to retrieve (default: 1000) | +| url | Site URL | The base URL of the Confluence Space, for example https://company.atlassian.net/wiki. | +| username | Username | The Atlassian User E-mail, for example email@example.com. | +| api_key | API Key | The Atlassian API Key. Create an API key at [Atlassian](https://id.atlassian.com/manage-profile/security/api-tokens). | +| space_key | Space Key | The key of the Confluence space to access. | +| cloud | Use Cloud? | Whether to use Confluence Cloud. Default is true. | +| content_format | Content Format | The content format. Default is STORAGE. | +| max_pages | Max Pages | The maximum number of pages to retrieve. Default is 1000. | -### Outputs +**Outputs** | Name | Display Name | Info | | --- | --- | --- | -| data | Data | List of Data objects containing the loaded Confluence documents | +| data | Data | A list of Data objects containing the loaded Confluence documents. | + +
## GitLoader The GitLoader component uses the GitLoader from LangChain to fetch and load documents from a specified Git repository. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | | --- | --- | --- | -| repo_path | Repository Path | The local path to the Git repository | -| clone_url | Clone URL | The URL to clone the Git repository from (optional) | -| branch | Branch | The branch to load files from (default: 'main') | -| file_filter | File Filter | Patterns to filter files (e.g., '.py' to include only .py files, '!.py' to exclude .py files) | -| content_filter | Content Filter | A regex pattern to filter files based on their content | +| repo_path | Repository Path | The local path to the Git repository. | +| clone_url | Clone URL | The URL to clone the Git repository from. This field is optional. | +| branch | Branch | The branch to load files from. Default is main. | +| file_filter | File Filter | The patterns to filter files. Use .py to include only Python files, or !.py to exclude Python files. | +| content_filter | Content Filter | A regex pattern to filter files based on their content. | -### Outputs +**Outputs** | Name | Display Name | Info | | --- | --- | --- | -| data | Data | List of Data objects containing the loaded Git repository documents | +| data | Data | A list of Data objects containing the loaded Git repository documents. | + +
## Unstructured This component uses the [Unstructured.io](https://unstructured.io/) Serverless API to load and parse files into a list of structured [Data](/concepts-objects) objects. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | | --- | --- | --- | -| file | File | The path to the file to be parsed (supported types are listed [here](https://docs.unstructured.io/api-reference/api-services/overview#supported-file-types)) | -| api_key | API Key | Unstructured.io Serverless API Key | -| api_url | Unstructured.io API URL | Optional URL for the Unstructured API | -| chunking_strategy | Chunking Strategy | Strategy for chunking the document (options: "", "basic", "by_title", "by_page", "by_similarity") | -| unstructured_args | Additional Arguments | Optional dictionary of additional arguments for the Unstructured.io API | +| file | File | The path to the file to be parsed. Supported types are listed in the [Unstructured documentation](https://docs.unstructured.io/api-reference/api-services/overview#supported-file-types). | +| api_key | API Key | The Unstructured.io Serverless API Key. | +| api_url | Unstructured.io API URL | The URL for the Unstructured API. This field is optional. | +| chunking_strategy | Chunking Strategy | The strategy for chunking the document. Options include basic, by_title, by_page, and by_similarity. | +| unstructured_args | Additional Arguments | A dictionary of additional arguments for the Unstructured.io API. This field is optional. | -### Outputs +**Outputs** | Name | Display Name | Info | | --- | --- | --- | -| data | Data | List of Data objects containing the parsed content from the input file | +| data | Data | A list of Data objects containing the parsed content from the input file. | + +
diff --git a/docs/docs/Components/components-logic.md b/docs/docs/Components/components-logic.md index 9965482bb..448ab2543 100644 --- a/docs/docs/Components/components-logic.md +++ b/docs/docs/Components/components-logic.md @@ -21,7 +21,7 @@ This is represented in Langflow by connecting the Parse Data component's **Data ![Sample Flow looping summarizer](/img/loop-text-summarizer.png) -The output will look similar to this: +The output is similar to this: ```text Document Summary Total Pages Processed @@ -83,24 +83,29 @@ AI A new message has been received and added to the Urgent queue. Please review it at your earliest convenience. ``` -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |----------------|----------|-------------------------------------------------------------------| -| input_text | String | The primary text input for the operation. | -| match_text | String | The text input to compare against. | -| operator | Dropdown | The operator to compare texts. Options: "equals", "not equals", "contains", "starts with", "ends with", "regex". Default: "equals". | -| case_sensitive | Boolean | If true, the comparison is case sensitive. This setting is ignored for regex comparison. Default: false. | -| message | Message | The message to pass through either route. | -| max_iterations | Integer | The maximum number of iterations for the conditional router. Default: 10. | -| default_route | Dropdown | The default route to take when max iterations are reached. Options: "true_result" or "false_result". Default: "false_result". | +| input_text | String | The primary text input for the operation. | +| match_text | String | The text to compare against. | +| operator | Dropdown | The operator used to compare texts. Options include equals, not equals, contains, starts with, ends with, and regex. The default is equals. | +| case_sensitive | Boolean | When set to true, the comparison is case sensitive. This setting does not apply to regex comparison. The default is false. | +| message | Message | The message to pass through either route. | +| max_iterations | Integer | The maximum number of iterations allowed for the conditional router. The default is 10. | +| default_route | Dropdown | The route to take when max iterations are reached. Options include true_result or false_result. The default is false_result. | -### Outputs +**Outputs** | Name | Type | Description | |--------------|---------|--------------------------------------------| -| true_result | Message | The output when the condition is true. | -| false_result | Message | The output when the condition is false. | +| true_result | Message | The output produced when the condition is true. | +| false_result | Message | The output produced when the condition is false. | + +
### Operator Behavior @@ -119,18 +124,22 @@ All options respect the `case_sensitive` setting except **regex**. This component listens for a notification and retrieves its associated state. -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |------|--------|------------------------------------------------| -| name | String | The name of the notification to listen for. | +| name | String | The name of the notification to listen for. | -### Outputs +**Outputs** | Name | Type | Description | |--------|------|--------------------------------------------| | output | Data | The state associated with the notification. | +
## Loop @@ -152,53 +161,68 @@ In this example, the data is loaded into **Chroma DB**. Follow along with this step-by-step video guide for creating this flow and adding agentic RAG: [Mastering the Loop Component & Agentic RAG in Langflow](https://www.youtube.com/watch?v=9Wx7WODSKTo). -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |------|-----------|------------------------------------------------------| -| data | Data/List | The initial list of Data objects to iterate over. | +| data | Data/List | The initial list of Data objects to process. | -### Outputs +**Outputs** | Name | Type | Description | |------|---------|-------------------------------------------------------| -| item | Data | Outputs one item at a time from the data list. | -| done | Data | Triggered when iteration complete, returns aggregated results. | +| item | Data | The current item being processed from the data list. | +| done | Data | The aggregated results after all items are processed. | + +
## Notify This component generates a notification for the Listen component to use. -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |--------|---------|-------------------------------------------------------------------| -| name | String | The name of the notification. | -| data | Data | The data to store in the notification. | -| append | Boolean | If true, the record will be appended to the existing notification.| +| name | String | The name of the notification. | +| data | Data | The data to store in the notification. | +| append | Boolean | When set to true, the record is added to the existing notification. | -### Outputs +**Outputs** | Name | Type | Description | |--------|------|-----------------------------------------| -| output | Data | The data stored in the notification. | +| output | Data | The data stored in the notification. | + +
## Pass message This component forwards the input message, unchanged. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| -| input_message | Input Message | The message to be passed forward. | -| ignored_message | Ignored Message | A second message to be ignored. Used as a workaround for continuity. | +| input_message | Input Message | The message to forward. | +| ignored_message | Ignored Message | A second message that is ignored. Used as a workaround for continuity. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| -| output_message | Output Message | The forwarded input message. | +| output_message | Output Message | The forwarded message from the input. | + +
## Run flow @@ -218,7 +242,10 @@ Your flow should now look like this: ![Run Flow component](/img/component-run-flow.png) 5. Run the flow. The Agent uses the Run Flow component as a tool to run the selected sub-flow. -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |-------------------|----------|----------------------------------------------------------------| @@ -226,15 +253,17 @@ Your flow should now look like this: | flow_tweak_data | Dict | Dictionary of tweaks to customize the flow's behavior. | | dynamic inputs | Various | Additional inputs that are generated based on the selected flow. | -### Outputs +**Outputs** | Name | Type | Description | |--------------|-------------|---------------------------------------------------------------| | run_outputs | A `List` of types `Data`, `Message,` or `DataFrame` | All outputs are generated from running the flow. | +
+ ## Legacy components -Legacy components are available to use but no longer supported. +**Legacy** components are available for use but are no longer supported. ### Data Conditional Router diff --git a/docs/docs/Components/components-memories.md b/docs/docs/Components/components-memories.md index eeaa57ea7..c06bcdba3 100644 --- a/docs/docs/Components/components-memories.md +++ b/docs/docs/Components/components-memories.md @@ -23,110 +23,134 @@ The **Store Message** helper component stores chat memories as [Data](/concepts- This component creates an `AstraDBChatMessageHistory` instance, which stores and retrieves chat messages using Astra DB, a cloud-native database service. -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |------------------|---------------|-----------------------------------------------------------------------| -| collection_name | String | Name of the Astra DB collection for storing messages. Required. | -| token | SecretString | Authentication token for Astra DB access. Required. | -| api_endpoint | SecretString | API endpoint URL for the Astra DB service. Required. | -| namespace | String | Optional namespace within Astra DB for the collection. | -| session_id | MessageText | Chat session ID. Uses current session ID if not provided. | +| collection_name | String | The name of the Astra DB collection for storing messages. Required. | +| token | SecretString | The authentication token for Astra DB access. Required. | +| api_endpoint | SecretString | The API endpoint URL for the Astra DB service. Required. | +| namespace | String | The optional namespace within Astra DB for the collection. | +| session_id | MessageText | The chat session ID. Uses the current session ID if not provided. | -### Outputs +**Outputs** | Name | Type | Description | |-----------------|-------------------------|-----------------------------------------------------------| | message_history | BaseChatMessageHistory | An instance of AstraDBChatMessageHistory for the session. | +
+ ## CassandraChatMemory Component This component creates a `CassandraChatMessageHistory` instance, enabling storage and retrieval of chat messages using Apache Cassandra or DataStax Astra DB. -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |----------------|---------------|-------------------------------------------------------------------------------| -| database_ref | MessageText | Contact points for Cassandra or Astra DB database ID. Required. | -| username | MessageText | Username for Cassandra (leave empty for Astra DB). | -| token | SecretString | Password for Cassandra or token for Astra DB. Required. | -| keyspace | MessageText | Keyspace in Cassandra or namespace in Astra DB. Required. | -| table_name | MessageText | Name of the table or collection for storing messages. Required. | -| session_id | MessageText | Unique identifier for the chat session. Optional. | -| cluster_kwargs | Dictionary | Additional keyword arguments for Cassandra cluster configuration. Optional. | +| database_ref | MessageText | The contact points for the Cassandra database or Astra DB database ID. Required. | +| username | MessageText | The username for Cassandra. Leave empty for Astra DB. | +| token | SecretString | The password for Cassandra or the token for Astra DB. Required. | +| keyspace | MessageText | The keyspace in Cassandra or namespace in Astra DB. Required. | +| table_name | MessageText | The name of the table or collection for storing messages. Required. | +| session_id | MessageText | The unique identifier for the chat session. Optional. | +| cluster_kwargs | Dictionary | Additional keyword arguments for the Cassandra cluster configuration. Optional. | -### Outputs +**Outputs** | Name | Type | Description | |-----------------|-------------------------|--------------------------------------------------------------| -| message_history | BaseChatMessageHistory | An instance of CassandraChatMessageHistory for the session. | +| message_history | BaseChatMessageHistory | An instance of CassandraChatMessageHistory for the session. | + +
## Mem0 Chat Memory The Mem0 Chat Memory component retrieves and stores chat messages using Mem0 memory storage. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| -| mem0_config | Mem0 Configuration | Configuration dictionary for initializing Mem0 memory instance. | +| mem0_config | Mem0 Configuration | The configuration dictionary for initializing the Mem0 memory instance. | | ingest_message | Message to Ingest | The message content to be ingested into Mem0 memory. | -| existing_memory | Existing Memory Instance | Optional existing Mem0 memory instance. | -| user_id | User ID | Identifier for the user associated with the messages. | -| search_query | Search Query | Input text for searching related memories in Mem0. | -| mem0_api_key | Mem0 API Key | API key for Mem0 platform (leave empty to use the local version). | -| metadata | Metadata | Additional metadata to associate with the ingested message. | -| openai_api_key | OpenAI API Key | API key for OpenAI. This item is required if you use OpenAI embeddings without a provided configuration. | +| existing_memory | Existing Memory Instance | An optional existing Mem0 memory instance. | +| user_id | User ID | The identifier for the user associated with the messages. | +| search_query | Search Query | The input text for searching related memories in Mem0. | +| mem0_api_key | Mem0 API Key | The API key for the Mem0 platform. Leave empty to use the local version. | +| metadata | Metadata | The additional metadata to associate with the ingested message. | +| openai_api_key | OpenAI API Key | The API key for OpenAI. Required when using OpenAI embeddings without a provided configuration. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| | memory | Mem0 Memory | The resulting Mem0 Memory object after ingesting data. | | search_results | Search Results | The search results from querying Mem0 memory. | +
## Redis Chat Memory This component retrieves and stores chat messages from Redis. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| -| host | hostname | IP address or hostname. | -| port | port | Redis Port Number. | -| database | database | Redis database. | -| username | Username | The Redis user name. | -| password | Password | The password for username. | -| key_prefix | Key prefix | Key prefix. | -| session_id | Session ID | Session ID for the message. | +| host | hostname | The IP address or hostname. | +| port | port | The Redis Port Number. | +| database | database | The Redis database. | +| username | Username | The Redis username. | +| password | Password | The password for the username. | +| key_prefix | Key prefix | The key prefix. | +| session_id | Session ID | The session ID for the message. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| -| memory | Memory | The Redis chat message history object | +| memory | Memory | The Redis chat message history object. | + +
## Legacy components -**Legacy** components are available to use but no longer supported. +**Legacy** components are available for use but are no longer supported. ### ZepChatMemory Component This component creates a `ZepChatMessageHistory` instance, enabling storage and retrieval of chat messages using Zep, a memory server for Large Language Models (LLMs). -#### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |---------------|---------------|-----------------------------------------------------------| -| url | MessageText | URL of the Zep instance. Required. | -| api_key | SecretString | API Key for authentication with the Zep instance. | -| api_base_path | Dropdown | API version to use. Options: "api/v1" or "api/v2". | -| session_id | MessageText | Unique identifier for the chat session. Optional. | +| url | MessageText | The URL of the Zep instance. Required. | +| api_key | SecretString | The API Key for authentication with the Zep instance. | +| api_base_path | Dropdown | The API version to use. Options include api/v1 or api/v2. | +| session_id | MessageText | The unique identifier for the chat session. Optional. | -#### Outputs +**Outputs** | Name | Type | Description | |-----------------|-------------------------|-------------------------------------------------------| -| message_history | BaseChatMessageHistory | An instance of ZepChatMessageHistory for the session. | \ No newline at end of file +| message_history | BaseChatMessageHistory | An instance of ZepChatMessageHistory for the session. | + +
\ No newline at end of file diff --git a/docs/docs/Components/components-models.md b/docs/docs/Components/components-models.md index 258ba9c5a..fb76589c5 100644 --- a/docs/docs/Components/components-models.md +++ b/docs/docs/Components/components-models.md @@ -27,167 +27,202 @@ This component creates a ChatOpenAI model instance using the AIML API. For more information, see [AIML documentation](https://docs.aimlapi.com/). -### Inputs +
+Parameters -| Name | Type | Description | -|--------------|-------------|---------------------------------------------------------------------------------------------| -| max_tokens | Integer | The maximum number of tokens to generate. Set to 0 for unlimited tokens. Range: 0-128000. | -| model_kwargs | Dictionary | Additional keyword arguments for the model. | -| model_name | String | The name of the AIML model to use. Options are predefined in `AIML_CHAT_MODELS`. | -| aiml_api_base| String | The base URL of the AIML API. Defaults to `https://api.aimlapi.com`. | -| api_key | SecretString| The AIML API Key to use for the model. | -| temperature | Float | Controls randomness in the output. Default: `0.1`. | -| seed | Integer | Controls reproducibility of the job. | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| max_tokens | Integer | The maximum number of tokens to generate. Set to 0 for unlimited tokens. Range: 0-128000. | +| model_kwargs | Dictionary | Additional keyword arguments for the model. | +| model_name | String | The name of the AIML model to use. Options are predefined in `AIML_CHAT_MODELS`. | +| aiml_api_base | String | The base URL of the AIML API. Defaults to `https://api.aimlapi.com`. | +| api_key | SecretString | The AIML API Key to use for the model. | +| temperature | Float | Controls randomness in the output. Default: `0.1`. | +| seed | Integer | Controls reproducibility of the job. | -| Name | Type | Description | -|-------|---------------|------------------------------------------------------------------| +**Outputs** + +| Name | Type | Description | +|------|------|-------------| | model | LanguageModel | An instance of ChatOpenAI configured with the specified parameters. | +
+ ## Amazon Bedrock This component generates text using Amazon Bedrock LLMs. For more information, see [Amazon Bedrock documentation](https://docs.aws.amazon.com/bedrock). -### Inputs +
+Parameters -| Name | Type | Description | -|------------------------|--------------|-------------------------------------------------------------------------------------| -| model_id | String | The ID of the Amazon Bedrock model to use. Options include various models. | -| aws_access_key | SecretString | AWS Access Key for authentication. | -| aws_secret_key | SecretString | AWS Secret Key for authentication. | -| credentials_profile_name | String | Name of the AWS credentials profile to use (advanced). | -| region_name | String | AWS region name. Default: `us-east-1`. | -| model_kwargs | Dictionary | Additional keyword arguments for the model (advanced). | -| endpoint_url | String | Custom endpoint URL for the Bedrock service (advanced). | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| model_id | String | The ID of the Amazon Bedrock model to use. Options include various models. | +| aws_access_key | SecretString | AWS Access Key for authentication. | +| aws_secret_key | SecretString | AWS Secret Key for authentication. | +| credentials_profile_name | String | Name of the AWS credentials profile to use (advanced). | +| region_name | String | AWS region name. Default: `us-east-1`. | +| model_kwargs | Dictionary | Additional keyword arguments for the model (advanced). | +| endpoint_url | String | Custom endpoint URL for the Bedrock service (advanced). | -| Name | Type | Description | -|-------|---------------|-------------------------------------------------------------------| +**Outputs** + +| Name | Type | Description | +|------|------|-------------| | model | LanguageModel | An instance of ChatBedrock configured with the specified parameters. | +
+ ## Anthropic This component allows the generation of text using Anthropic Chat and Language models. For more information, see the [Anthropic documentation](https://docs.anthropic.com/en/docs/welcome). -### Inputs +
+Parameters -| Name | Type | Description | -|---------------------|-------------|----------------------------------------------------------------------------------------| -| max_tokens | Integer | The maximum number of tokens to generate. Set to 0 for unlimited tokens. Default: `4096`.| -| model | String | The name of the Anthropic model to use. Options include various Claude 3 models. | -| anthropic_api_key | SecretString| Your Anthropic API key for authentication. | -| temperature | Float | Controls randomness in the output. Default: `0.1`. | -| anthropic_api_url | String | Endpoint of the Anthropic API. Defaults to `https://api.anthropic.com` if not specified (advanced). | -| prefill | String | Prefill text to guide the model's response (advanced). | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| max_tokens | Integer | The maximum number of tokens to generate. Set to 0 for unlimited tokens. Default: `4096`. | +| model | String | The name of the Anthropic model to use. Options include various Claude 3 models. | +| anthropic_api_key | SecretString | Your Anthropic API key for authentication. | +| temperature | Float | Controls randomness in the output. Default: `0.1`. | +| anthropic_api_url | String | Endpoint of the Anthropic API. Defaults to `https://api.anthropic.com` if not specified (advanced). | +| prefill | String | Prefill text to guide the model's response (advanced). | -| Name | Type | Description | -|-------|---------------|------------------------------------------------------------------| +**Outputs** + +| Name | Type | Description | +|------|------|-------------| | model | LanguageModel | An instance of ChatAnthropic configured with the specified parameters. | +
+ ## Azure OpenAI This component generates text using Azure OpenAI LLM. For more information, see the [Azure OpenAI documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/). -### Inputs +
+Parameters -| Name | Display Name | Info | -|---------------------|---------------------|---------------------------------------------------------------------------------| -| Model Name | Model Name | Specifies the name of the Azure OpenAI model to be used for text generation. | -| Azure Endpoint | Azure Endpoint | Your Azure endpoint, including the resource. | -| Deployment Name | Deployment Name | Specifies the name of the deployment. | -| API Version | API Version | Specifies the version of the Azure OpenAI API to be used. | -| API Key | API Key | Your Azure OpenAI API key. | -| Temperature | Temperature | Specifies the sampling temperature. Defaults to `0.7`. | -| Max Tokens | Max Tokens | Specifies the maximum number of tokens to generate. Defaults to `1000`. | -| Input Value | Input Value | Specifies the input text for text generation. | -| Stream | Stream | Specifies whether to stream the response from the model. Defaults to `False`. | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| Model Name | String | Specifies the name of the Azure OpenAI model to be used for text generation. | +| Azure Endpoint | String | Your Azure endpoint, including the resource. | +| Deployment Name | String | Specifies the name of the deployment. | +| API Version | String | Specifies the version of the Azure OpenAI API to be used. | +| API Key | SecretString | Your Azure OpenAI API key. | +| Temperature | Float | Specifies the sampling temperature. Defaults to `0.7`. | +| Max Tokens | Integer | Specifies the maximum number of tokens to generate. Defaults to `1000`. | +| Input Value | String | Specifies the input text for text generation. | +| Stream | Boolean | Specifies whether to stream the response from the model. Defaults to `False`. | -| Name | Type | Description | -|-------|---------------|------------------------------------------------------------------| +**Outputs** + +| Name | Type | Description | +|------|------|-------------| | model | LanguageModel | An instance of AzureOpenAI configured with the specified parameters. | +
+ ## Cohere This component generates text using Cohere's language models. For more information, see the [Cohere documentation](https://cohere.ai/). -### Inputs +
+Parameters -| Name | Display Name | Info | -|---------------------|--------------------|----------------------------------------------------------| -| Cohere API Key | Cohere API Key | Your Cohere API key. | -| Max Tokens | Max Tokens | Specifies the maximum number of tokens to generate. Defaults to `256`. | -| Temperature | Temperature | Specifies the sampling temperature. Defaults to `0.75`. | -| Input Value | Input Value | Specifies the input text for text generation. | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| Cohere API Key | SecretString | Your Cohere API key. | +| Max Tokens | Integer | Specifies the maximum number of tokens to generate. Defaults to `256`. | +| Temperature | Float | Specifies the sampling temperature. Defaults to `0.75`. | +| Input Value | String | Specifies the input text for text generation. | -| Name | Type | Description | -|-------|---------------|------------------------------------------------------------------| +**Outputs** + +| Name | Type | Description | +|------|------|-------------| | model | LanguageModel | An instance of the Cohere model configured with the specified parameters. | +
+ ## DeepSeek This component generates text using DeepSeek's language models. For more information, see the [DeepSeek documentation](https://api-docs.deepseek.com/). -### Inputs +
+Parameters -| Name | Type | Description | -|----------------|---------------|-----------------------------------------------------------------| -| max_tokens | Integer | Maximum number of tokens to generate. Set to `0` for unlimited. Range: `0-128000`. | -| model_kwargs | Dictionary | Additional keyword arguments for the model. | -| json_mode | Boolean | If `True`, outputs JSON regardless of passing a schema. | -| model_name | String | The DeepSeek model to use. Default: `deepseek-chat`. | -| api_base | String | Base URL for API requests. Default: `https://api.deepseek.com`. | -| api_key | SecretString | Your DeepSeek API key for authentication. | -| temperature | Float | Controls randomness in responses. Range: `[0.0, 2.0]`. Default: `1.0`. | -| seed | Integer | Number initialized for random number generation. Use the same seed integer for more reproducible results, and use a different seed number for more random results. | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| max_tokens | Integer | Maximum number of tokens to generate. Set to `0` for unlimited. Range: `0-128000`. | +| model_kwargs | Dictionary | Additional keyword arguments for the model. | +| json_mode | Boolean | If `True`, outputs JSON regardless of passing a schema. | +| model_name | String | The DeepSeek model to use. Default: `deepseek-chat`. | +| api_base | String | Base URL for API requests. Default: `https://api.deepseek.com`. | +| api_key | SecretString | Your DeepSeek API key for authentication. | +| temperature | Float | Controls randomness in responses. Range: `[0.0, 2.0]`. Default: `1.0`. | +| seed | Integer | Number initialized for random number generation. Use the same seed integer for more reproducible results, and use a different seed number for more random results. | -| Name | Type | Description | -|-------|---------------|------------------------------------------------------------------| +**Outputs** + +| Name | Type | Description | +|------|------|-------------| | model | LanguageModel | An instance of ChatOpenAI configured with the specified parameters. | +
+ ## Google Generative AI This component generates text using Google's Generative AI models. For more information, see the [Google Generative AI documentation](https://cloud.google.com/vertex-ai/docs/). -### Inputs +
+Parameters -| Name | Display Name | Info | -|---------------------|--------------------|-----------------------------------------------------------------------| -| Google API Key | Google API Key | Your Google API key to use for the Google Generative AI. | -| Model | Model | The name of the model to use, such as `"gemini-pro"`. | -| Max Output Tokens | Max Output Tokens | The maximum number of tokens to generate. | -| Temperature | Temperature | Run inference with this temperature. | -| Top K | Top K | Consider the set of top K most probable tokens. | -| Top P | Top P | The maximum cumulative probability of tokens to consider when sampling. | -| N | N | Number of chat completions to generate for each prompt. | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| Google API Key | SecretString | Your Google API key to use for the Google Generative AI. | +| Model | String | The name of the model to use, such as `"gemini-pro"`. | +| Max Output Tokens | Integer | The maximum number of tokens to generate. | +| Temperature | Float | Run inference with this temperature. | +| Top K | Integer | Consider the set of top K most probable tokens. | +| Top P | Float | The maximum cumulative probability of tokens to consider when sampling. | +| N | Integer | Number of chat completions to generate for each prompt. | -| Name | Type | Description | -|-------|---------------|------------------------------------------------------------------| +**Outputs** + +| Name | Type | Description | +|------|------|-------------| | model | LanguageModel | An instance of ChatGoogleGenerativeAI configured with the specified parameters. | +
+ ## Groq This component generates text using Groq's language models. @@ -210,24 +245,29 @@ The responses include a list of sources. For more information, see the [Groq documentation](https://groq.com/). -### Inputs +
+Parameters -| Name | Type | Description | -|----------------|---------------|-----------------------------------------------------------------| -| groq_api_key | SecretString | API key for the Groq API. | -| groq_api_base | String | Base URL path for API requests. Default: `https://api.groq.com`. | -| max_tokens | Integer | The maximum number of tokens to generate. | -| temperature | Float | Controls randomness in the output. Range: `[0.0, 1.0]`. Default: `0.1`. | -| n | Integer | Number of chat completions to generate for each prompt. | -| model_name | String | The name of the Groq model to use. Options are dynamically fetched from the Groq API. | +**Inputs** + +| Name | Type | Description | +|------|------|-------------| +| groq_api_key | SecretString | API key for the Groq API. | +| groq_api_base | String | Base URL path for API requests. Default: `https://api.groq.com`. | +| max_tokens | Integer | The maximum number of tokens to generate. | +| temperature | Float | Controls randomness in the output. Range: `[0.0, 1.0]`. Default: `0.1`. | +| n | Integer | Number of chat completions to generate for each prompt. | +| model_name | String | The name of the Groq model to use. Options are dynamically fetched from the Groq API. | | tool_mode_enabled | Bool | If enabled, the component only displays models that work with tools. | -### Outputs +**Outputs** -| Name | Type | Description | -|-------|---------------|------------------------------------------------------------------| +| Name | Type | Description | +|------|------|-------------| | model | LanguageModel | An instance of ChatGroq configured with the specified parameters. | +
+ ## Hugging Face API This component sends requests to the Hugging Face API to generate text using the model specified in the **Model ID** field. @@ -248,24 +288,29 @@ In this example based on the [Basic prompting flow](/starter-projects-basic-prom For more information, see the [Hugging Face documentation](https://huggingface.co/). -### Inputs +
+Parameters -| Name | Type | Description | -|----------------|---------------|-----------------------------------------------------------------| -| model_id | String | The model ID from Hugging Face Hub. For example, "gpt2", "facebook/bart-large". | -| huggingfacehub_api_token | SecretString | Your Hugging Face API token for authentication. | -| temperature | Float | Controls randomness in the output. Range: [0.0, 1.0]. Default: 0.7. | -| max_new_tokens | Integer | Maximum number of tokens to generate. Default: 512. | -| top_p | Float | Nucleus sampling parameter. Range: [0.0, 1.0]. Default: 0.95. | -| top_k | Integer | Top-k sampling parameter. Default: 50. | -| model_kwargs | Dictionary | Additional keyword arguments to pass to the model. | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| model_id | String | The model ID from Hugging Face Hub. For example, "gpt2", "facebook/bart-large". | +| huggingfacehub_api_token | SecretString | Your Hugging Face API token for authentication. | +| temperature | Float | Controls randomness in the output. Range: [0.0, 1.0]. Default: 0.7. | +| max_new_tokens | Integer | Maximum number of tokens to generate. Default: 512. | +| top_p | Float | Nucleus sampling parameter. Range: [0.0, 1.0]. Default: 0.95. | +| top_k | Integer | Top-k sampling parameter. Default: 50. | +| model_kwargs | Dictionary | Additional keyword arguments to pass to the model. | -| Name | Type | Description | -|-------|---------------|------------------------------------------------------------------| +**Outputs** + +| Name | Type | Description | +|------|------|-------------| | model | LanguageModel | An instance of HuggingFaceHub configured with the specified parameters. | +
+ ## IBM watsonx.ai This component generates text using [IBM watsonx.ai](https://www.ibm.com/watsonx) foundation models. @@ -279,133 +324,158 @@ An example flow looks like the following: The values for **API endpoint**, **Project ID**, **API key**, and **Model Name** are found in your IBM watsonx.ai deployment. For more information, see the [Langchain documentation](https://python.langchain.com/docs/integrations/chat/ibm_watsonx/). -### Inputs +
+Parameters -| Name | Type | Description | -|---------------------|---------------|------------------------------------------------------------------| -| url | String | The base URL of the watsonx API. | -| project_id | String | Your watsonx Project ID. | -| api_key | SecretString | Your IBM watsonx API Key. | -| model_name | String | The name of the watsonx model to use. Options are dynamically fetched from the API. | -| max_tokens | Integer | The maximum number of tokens to generate. Default: `1000`. | -| stop_sequence | String | The sequence where generation should stop. | -| temperature | Float | Controls randomness in the output. Default: `0.1`. | -| top_p | Float | Controls nucleus sampling, which limits the model to tokens whose probability is below the `top_p` value. Range: Default: `0.9`. | -| frequency_penalty | Float | Controls frequency penalty. A positive value decreases the probability of repeating tokens, and a negative value increases the probability. Range: Default: `0.5`. | -| presence_penalty | Float | Controls presence penalty. A positive value increases the likelihood of new topics being introduced. Default: `0.3`. | -| seed | Integer | A random seed for the model. Default: `8`. | -| logprobs | Boolean | Whether to return log probabilities of output tokens or not. Default: `True`. | -| top_logprobs | Integer | The number of most likely tokens to return at each position. Default: `3`. | -| logit_bias | String | A JSON string of token IDs to bias or suppress. | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| url | String | The base URL of the watsonx API. | +| project_id | String | Your watsonx Project ID. | +| api_key | SecretString | Your IBM watsonx API Key. | +| model_name | String | The name of the watsonx model to use. Options are dynamically fetched from the API. | +| max_tokens | Integer | The maximum number of tokens to generate. Default: `1000`. | +| stop_sequence | String | The sequence where generation should stop. | +| temperature | Float | Controls randomness in the output. Default: `0.1`. | +| top_p | Float | Controls nucleus sampling, which limits the model to tokens whose probability is below the `top_p` value. Range: Default: `0.9`. | +| frequency_penalty | Float | Controls frequency penalty. A positive value decreases the probability of repeating tokens, and a negative value increases the probability. Range: Default: `0.5`. | +| presence_penalty | Float | Controls presence penalty. A positive value increases the likelihood of new topics being introduced. Default: `0.3`. | +| seed | Integer | A random seed for the model. Default: `8`. | +| logprobs | Boolean | Whether to return log probabilities of output tokens or not. Default: `True`. | +| top_logprobs | Integer | The number of most likely tokens to return at each position. Default: `3`. | +| logit_bias | String | A JSON string of token IDs to bias or suppress. | -| Name | Type | Description | -|-------|---------------|------------------------------------------------------------------| +**Outputs** + +| Name | Type | Description | +|------|------|-------------| | model | LanguageModel | An instance of [ChatWatsonx](https://python.langchain.com/docs/integrations/chat/ibm_watsonx/) configured with the specified parameters. | +
+ ## Language model This component generates text using either OpenAI or Anthropic language models. Use this component as a drop-in replacement for LLM models to switch between different model providers and models. -Instead of swapping out model components when you want to try a different provider, like switching between OpenAI and Anthropic components, change the provider dropdown in this single component. This makes it easier to experiment with and compare different models while keeping the rest of your flow intact. +Instead of swapping out model components when you want to try a different provider, like switching between OpenAI and Anthropic components, change the provider dropdown in this single component. This makes it easier to experiment with and compare different models while keeping the rest of your flow intact. For more information, see the [OpenAI documentation](https://platform.openai.com/docs) and [Anthropic documentation](https://docs.anthropic.com/). -### Inputs +
+Parameters -| Name | Type | Description | -|---------------------|--------------|-----------------------------------------------------------------------------------------------| -| provider | String | The model provider to use. Options: "OpenAI", "Anthropic". Default: "OpenAI". | -| model_name | String | The name of the model to use. Options depend on the selected provider. | -| api_key | SecretString | The API Key for authentication with the selected provider. | -| input_value | String | The input text to send to the model. | -| system_message | String | A system message that helps set the behavior of the assistant (advanced). | -| stream | Boolean | Whether to stream the response. Default: `False` (advanced). | -| temperature | Float | Controls randomness in responses. Range: `[0.0, 1.0]`. Default: `0.1` (advanced). | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| provider | String | The model provider to use. Options: "OpenAI", "Anthropic". Default: "OpenAI". | +| model_name | String | The name of the model to use. Options depend on the selected provider. | +| api_key | SecretString | The API Key for authentication with the selected provider. | +| input_value | String | The input text to send to the model. | +| system_message | String | A system message that helps set the behavior of the assistant (advanced). | +| stream | Boolean | Whether to stream the response. Default: `False` (advanced). | +| temperature | Float | Controls randomness in responses. Range: `[0.0, 1.0]`. Default: `0.1` (advanced). | -| Name | Type | Description | -|-------|---------------|------------------------------------------------------------------| +**Outputs** + +| Name | Type | Description | +|------|------|-------------| | model | LanguageModel | An instance of ChatOpenAI or ChatAnthropic configured with the specified parameters. | +
+ ## LMStudio This component generates text using LM Studio's local language models. For more information, see [LM Studio documentation](https://lmstudio.ai/). -### Inputs +
+Parameters -| Name | Type | Description | -|----------------|---------------|-----------------------------------------------------------------| -| base_url | String | The URL where LM Studio is running. Default: `"http://localhost:1234"`. | -| max_tokens | Integer | Maximum number of tokens to generate in the response. Default: `512`. | -| temperature | Float | Controls randomness in the output. Range: `[0.0, 2.0]`. Default: `0.7`. | -| top_p | Float | Controls diversity via nucleus sampling. Range: `[0.0, 1.0]`. Default: `1.0`. | -| stop | List[String] | List of strings that will stop generation when encountered (advanced). | -| stream | Boolean | Whether to stream the response. Default: `False`. | -| presence_penalty | Float | Penalizes repeated tokens. Range: `[-2.0, 2.0]`. Default: `0.0`. | -| frequency_penalty | Float | Penalizes frequent tokens. Range: `[-2.0, 2.0]`. Default: `0.0`. | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| base_url | String | The URL where LM Studio is running. Default: `"http://localhost:1234"`. | +| max_tokens | Integer | Maximum number of tokens to generate in the response. Default: `512`. | +| temperature | Float | Controls randomness in the output. Range: `[0.0, 2.0]`. Default: `0.7`. | +| top_p | Float | Controls diversity via nucleus sampling. Range: `[0.0, 1.0]`. Default: `1.0`. | +| stop | List[String] | List of strings that stop generation when encountered. | +| stream | Boolean | Whether to stream the response. Default: `False`. | +| presence_penalty | Float | Penalizes repeated tokens. Range: `[-2.0, 2.0]`. Default: `0.0`. | +| frequency_penalty | Float | Penalizes frequent tokens. Range: `[-2.0, 2.0]`. Default: `0.0`. | -| Name | Type | Description | -|-------|---------------|------------------------------------------------------------------| +**Outputs** + +| Name | Type | Description | +|------|------|-------------| | model | LanguageModel | An instance of LMStudio configured with the specified parameters. | +
+ ## Maritalk This component generates text using Maritalk LLMs. For more information, see [Maritalk documentation](https://www.maritalk.com/). -### Inputs +
+Parameters -| Name | Type | Description | -|----------------|---------------|-----------------------------------------------------------------| -| max_tokens | Integer | The maximum number of tokens to generate. Set to `0` for unlimited tokens. Default: `512`. | -| model_name | String | The name of the Maritalk model to use. Options: `sabia-2-small`, `sabia-2-medium`. Default: `sabia-2-small`. | -| api_key | SecretString | The Maritalk API Key to use for authentication. | -| temperature | Float | Controls randomness in the output. Range: `[0.0, 1.0]`. Default: `0.5`. | -| endpoint_url | String | The Maritalk API endpoint. Default: `https://api.maritalk.com`. | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| max_tokens | Integer | The maximum number of tokens to generate. Set to `0` for unlimited tokens. Default: `512`. | +| model_name | String | The name of the Maritalk model to use. Options: `sabia-2-small`, `sabia-2-medium`. Default: `sabia-2-small`. | +| api_key | SecretString | The Maritalk API Key to use for authentication. | +| temperature | Float | Controls randomness in the output. Range: `[0.0, 1.0]`. Default: `0.5`. | +| endpoint_url | String | The Maritalk API endpoint. Default: `https://api.maritalk.com`. | -| Name | Type | Description | -|-------|---------------|------------------------------------------------------------------| +**Outputs** + +| Name | Type | Description | +|------|------|-------------| | model | LanguageModel | An instance of ChatMaritalk configured with the specified parameters. | +
+ ## Mistral This component generates text using MistralAI LLMs. For more information, see [Mistral AI documentation](https://docs.mistral.ai/). -### Inputs +
+Parameters -| Name | Type | Description | -|---------------------|--------------|-----------------------------------------------------------------------------------------------| -| max_tokens | Integer | The maximum number of tokens to generate. Set to 0 for unlimited tokens (advanced). | -| model_name | String | The name of the Mistral AI model to use. Options include `open-mixtral-8x7b`, `open-mixtral-8x22b`, `mistral-small-latest`, `mistral-medium-latest`, `mistral-large-latest`, and `codestral-latest`. Default: `codestral-latest`. | -| mistral_api_base | String | The base URL of the Mistral API. Defaults to `https://api.mistral.ai/v1` (advanced). | -| api_key | SecretString | The Mistral API Key to use for authentication. | -| temperature | Float | Controls randomness in the output. Default: 0.5. | -| max_retries | Integer | Maximum number of retries for API calls. Default: 5 (advanced). | -| timeout | Integer | Timeout for API calls in seconds. Default: 60 (advanced). | -| max_concurrent_requests | Integer | Maximum number of concurrent API requests. Default: 3 (advanced). | -| top_p | Float | Nucleus sampling parameter. Default: 1 (advanced). | -| random_seed | Integer | Seed for random number generation. Default: 1 (advanced). | -| safe_mode | Boolean | Enables safe mode for content generation (advanced). | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| max_tokens | Integer | The maximum number of tokens to generate. Set to 0 for unlimited tokens (advanced). | +| model_name | String | The name of the Mistral AI model to use. Options include `open-mixtral-8x7b`, `open-mixtral-8x22b`, `mistral-small-latest`, `mistral-medium-latest`, `mistral-large-latest`, and `codestral-latest`. Default: `codestral-latest`. | +| mistral_api_base | String | The base URL of the Mistral API. Defaults to `https://api.mistral.ai/v1` (advanced). | +| api_key | SecretString | The Mistral API Key to use for authentication. | +| temperature | Float | Controls randomness in the output. Default: 0.5. | +| max_retries | Integer | Maximum number of retries for API calls. Default: 5 (advanced). | +| timeout | Integer | Timeout for API calls in seconds. Default: 60 (advanced). | +| max_concurrent_requests | Integer | Maximum number of concurrent API requests. Default: 3 (advanced). | +| top_p | Float | Nucleus sampling parameter. Default: 1 (advanced). | +| random_seed | Integer | Seed for random number generation. Default: 1 (advanced). | +| safe_mode | Boolean | Enables safe mode for content generation (advanced). | -| Name | Type | Description | -|--------|---------------|-----------------------------------------------------| -| model | LanguageModel | An instance of ChatMistralAI configured with the specified parameters. | +**Outputs** + +| Name | Type | Description | +|------|------|-------------| +| model | LanguageModel | An instance of ChatMistralAI configured with the specified parameters. | + +
## Novita AI @@ -413,46 +483,56 @@ This component generates text using Novita AI's language models. For more information, see [Novita AI documentation](https://novita.ai/docs/model-api/reference/llm/llm.html?utm_source=github_langflow&utm_medium=github_readme&utm_campaign=link). -### Inputs +
+Parameters -| Name | Type | Description | -|---------------------|---------------|------------------------------------------------------------------| -| api_key | SecretString | Your Novita AI API Key. | -| model | String | The id of the Novita AI model to use. | -| max_tokens | Integer | The maximum number of tokens to generate. Set to 0 for unlimited tokens. | -| temperature | Float | Controls randomness in the output. Range: [0.0, 1.0]. Default: 0.7. | -| top_p | Float | Controls the nucleus sampling. Range: [0.0, 1.0]. Default: 1.0. | -| frequency_penalty | Float | Controls the frequency penalty. Range: [0.0, 2.0]. Default: 0.0. | -| presence_penalty | Float | Controls the presence penalty. Range: [0.0, 2.0]. Default: 0.0. | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| api_key | SecretString | Your Novita AI API Key. | +| model | String | The id of the Novita AI model to use. | +| max_tokens | Integer | The maximum number of tokens to generate. Set to 0 for unlimited tokens. | +| temperature | Float | Controls randomness in the output. Range: [0.0, 1.0]. Default: 0.7. | +| top_p | Float | Controls the nucleus sampling. Range: [0.0, 1.0]. Default: 1.0. | +| frequency_penalty | Float | Controls the frequency penalty. Range: [0.0, 2.0]. Default: 0.0. | +| presence_penalty | Float | Controls the presence penalty. Range: [0.0, 2.0]. Default: 0.0. | -| Name | Type | Description | -|-------|---------------|------------------------------------------------------------------| +**Outputs** + +| Name | Type | Description | +|------|------|-------------| | model | LanguageModel | An instance of Novita AI model configured with the specified parameters. | +
+ ## NVIDIA This component generates text using NVIDIA LLMs. For more information, see [NVIDIA AI documentation](https://developer.nvidia.com/generative-ai). -### Inputs +
+Parameters -| Name | Type | Description | -|---------------------|--------------|-----------------------------------------------------------------------------------------------| -| max_tokens | Integer | The maximum number of tokens to generate. Set to `0` for unlimited tokens (advanced). | -| model_name | String | The name of the NVIDIA model to use. Default: `mistralai/mixtral-8x7b-instruct-v0.1`. | -| base_url | String | The base URL of the NVIDIA API. Default: `https://integrate.api.nvidia.com/v1`. | -| nvidia_api_key | SecretString | The NVIDIA API Key for authentication. | -| temperature | Float | Controls randomness in the output. Default: `0.1`. | -| seed | Integer | The seed controls the reproducibility of the job (advanced). Default: `1`. | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| max_tokens | Integer | The maximum number of tokens to generate. Set to `0` for unlimited tokens (advanced). | +| model_name | String | The name of the NVIDIA model to use. Default: `mistralai/mixtral-8x7b-instruct-v0.1`. | +| base_url | String | The base URL of the NVIDIA API. Default: `https://integrate.api.nvidia.com/v1`. | +| nvidia_api_key | SecretString | The NVIDIA API Key for authentication. | +| temperature | Float | Controls randomness in the output. Default: `0.1`. | +| seed | Integer | The seed controls the reproducibility of the job (advanced). Default: `1`. | -| Name | Type | Description | -|--------|---------------|-----------------------------------------------------| -| model | LanguageModel | An instance of ChatNVIDIA configured with the specified parameters. | +**Outputs** + +| Name | Type | Description | +|------|------|-------------| +| model | LanguageModel | An instance of ChatNVIDIA configured with the specified parameters. | + +
## Ollama @@ -471,44 +551,53 @@ The default base URL is `http://127.0.0.1:11434`. For more information, see the [Ollama documentation](https://ollama.com/). -### Inputs +
+Parameters -| Name | Display Name | Info | -|---------------------|---------------|---------------------------------------------| -| Base URL | Base URL | Endpoint of the Ollama API. | -| Model Name | Model Name | The model name to use. | -| Temperature | Temperature | Controls the creativity of model responses. | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| Base URL | String | Endpoint of the Ollama API. | +| Model Name | String | The model name to use. | +| Temperature | Float | Controls the creativity of model responses. | -| Name | Type | Description | -|-------|---------------|------------------------------------------------------------------| +**Outputs** + +| Name | Type | Description | +|------|------|-------------| | model | LanguageModel | An instance of an Ollama model configured with the specified parameters. | +
+ ## OpenAI This component generates text using OpenAI's language models. For more information, see [OpenAI documentation](https://beta.openai.com/docs/). -### Inputs +
+Parameters -| Name | Type | Description | -|---------------------|---------------|------------------------------------------------------------------| -| api_key | SecretString | Your OpenAI API Key. | -| model | String | The name of the OpenAI model to use. Options include "gpt-3.5-turbo" and "gpt-4". | -| max_tokens | Integer | The maximum number of tokens to generate. Set to 0 for unlimited tokens. | -| temperature | Float | Controls randomness in the output. Range: [0.0, 1.0]. Default: 0.7. | -| top_p | Float | Controls the nucleus sampling. Range: [0.0, 1.0]. Default: 1.0. | -| frequency_penalty | Float | Controls the frequency penalty. Range: [0.0, 2.0]. Default: 0.0. | -| presence_penalty | Float | Controls the presence penalty. Range: [0.0, 2.0]. Default: 0.0. | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| api_key | SecretString | Your OpenAI API Key. | +| model | String | The name of the OpenAI model to use. Options include "gpt-3.5-turbo" and "gpt-4". | +| max_tokens | Integer | The maximum number of tokens to generate. Set to 0 for unlimited tokens. | +| temperature | Float | Controls randomness in the output. Range: [0.0, 1.0]. Default: 0.7. | +| top_p | Float | Controls the nucleus sampling. Range: [0.0, 1.0]. Default: 1.0. | +| frequency_penalty | Float | Controls the frequency penalty. Range: [0.0, 2.0]. Default: 0.0. | +| presence_penalty | Float | Controls the presence penalty. Range: [0.0, 2.0]. Default: 0.0. | -| Name | Type | Description | -|-------|---------------|------------------------------------------------------------------| +**Outputs** + +| Name | Type | Description | +|------|------|-------------| | model | LanguageModel | An instance of OpenAI model configured with the specified parameters. | +
## OpenRouter @@ -516,48 +605,57 @@ This component generates text using OpenRouter's unified API for multiple AI mod For more information, see [OpenRouter documentation](https://openrouter.ai/docs). -### Inputs +
+Parameters -| Name | Type | Description | -|-------------|---------------|------------------------------------------------------------------| -| api_key | SecretString | Your OpenRouter API key for authentication. | -| site_url | String | Your site URL for OpenRouter rankings (advanced). | -| app_name | String | Your app name for OpenRouter rankings (advanced). | -| provider | String | The AI model provider to use. | -| model_name | String | The specific model to use for chat completion. | -| temperature | Float | Controls randomness in the output. Range: [0.0, 2.0]. Default: 0.7. | -| max_tokens | Integer | The maximum number of tokens to generate (advanced). | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| api_key | SecretString | Your OpenRouter API key for authentication. | +| site_url | String | Your site URL for OpenRouter rankings (advanced). | +| app_name | String | Your app name for OpenRouter rankings (advanced). | +| provider | String | The AI model provider to use. | +| model_name | String | The specific model to use for chat completion. | +| temperature | Float | Controls randomness in the output. Range: [0.0, 2.0]. Default: 0.7. | +| max_tokens | Integer | The maximum number of tokens to generate (advanced). | -| Name | Type | Description | -|-------|---------------|------------------------------------------------------------------| +**Outputs** + +| Name | Type | Description | +|------|------|-------------| | model | LanguageModel | An instance of ChatOpenAI configured with the specified parameters. | +
+ ## Perplexity This component generates text using Perplexity's language models. For more information, see [Perplexity documentation](https://perplexity.ai/). -### Inputs +
+Parameters -| Name | Type | Description | -|---------------------|--------------|-----------------------------------------------------------------------------------------------| -| model_name | String | The name of the Perplexity model to use. Options include various Llama 3.1 models. | -| max_output_tokens | Integer | The maximum number of tokens to generate. | -| api_key | SecretString | The Perplexity API Key for authentication. | -| temperature | Float | Controls randomness in the output. Default: 0.75. | -| top_p | Float | The maximum cumulative probability of tokens to consider when sampling (advanced). | -| n | Integer | Number of chat completions to generate for each prompt (advanced). | -| top_k | Integer | Number of top tokens to consider for top-k sampling. Must be positive (advanced). | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| model_name | String | The name of the Perplexity model to use. Options include various Llama 3.1 models. | +| max_output_tokens | Integer | The maximum number of tokens to generate. | +| api_key | SecretString | The Perplexity API Key for authentication. | +| temperature | Float | Controls randomness in the output. Default: 0.75. | +| top_p | Float | The maximum cumulative probability of tokens to consider when sampling (advanced). | +| n | Integer | Number of chat completions to generate for each prompt (advanced). | +| top_k | Integer | Number of top tokens to consider for top-k sampling. Must be positive (advanced). | -| Name | Type | Description | -|--------|---------------|-----------------------------------------------------| -| model | LanguageModel | An instance of ChatPerplexity configured with the specified parameters. | +**Outputs** +| Name | Type | Description | +|------|------|-------------| +| model | LanguageModel | An instance of ChatPerplexity configured with the specified parameters. | + +
## Qianfan @@ -571,48 +669,58 @@ This component generates text using SambaNova LLMs. For more information, see [Sambanova Cloud documentation](https://cloud.sambanova.ai/). -### Inputs +
+Parameters -| Name | Type | Description | -|---------------------|---------------|------------------------------------------------------------------| -| sambanova_url | String | Base URL path for API requests. Default: `https://api.sambanova.ai/v1/chat/completions`. | -| sambanova_api_key | SecretString | Your SambaNova API Key. | -| model_name | String | The name of the Sambanova model to use. Options include various Llama models. | -| max_tokens | Integer | The maximum number of tokens to generate. Set to 0 for unlimited tokens. | -| temperature | Float | Controls randomness in the output. Range: [0.0, 1.0]. Default: 0.07. | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| sambanova_url | String | Base URL path for API requests. Default: `https://api.sambanova.ai/v1/chat/completions`. | +| sambanova_api_key | SecretString | Your SambaNova API Key. | +| model_name | String | The name of the Sambanova model to use. Options include various Llama models. | +| max_tokens | Integer | The maximum number of tokens to generate. Set to 0 for unlimited tokens. | +| temperature | Float | Controls randomness in the output. Range: [0.0, 1.0]. Default: 0.07. | -| Name | Type | Description | -|-------|---------------|------------------------------------------------------------------| +**Outputs** + +| Name | Type | Description | +|------|------|-------------| | model | LanguageModel | An instance of SambaNova model configured with the specified parameters. | +
+ ## VertexAI This component generates text using Vertex AI LLMs. For more information, see [Google Vertex AI documentation](https://cloud.google.com/vertex-ai). -### Inputs +
+Parameters -| Name | Type | Description | -|---------------------|--------------|-----------------------------------------------------------------------------------------------| -| credentials | File | JSON credentials file. Leave empty to fallback to environment variables. File type: JSON. | -| model_name | String | The name of the Vertex AI model to use. Default: "gemini-1.5-pro". | -| project | String | The project ID (advanced). | -| location | String | The location for the Vertex AI API. Default: "us-central1" (advanced). | -| max_output_tokens | Integer | The maximum number of tokens to generate (advanced). | -| max_retries | Integer | Maximum number of retries for API calls. Default: 1 (advanced). | -| temperature | Float | Controls randomness in the output. Default: 0.0. | -| top_k | Integer | The number of highest probability vocabulary tokens to keep for top-k-filtering (advanced). | -| top_p | Float | The cumulative probability of parameter highest probability vocabulary tokens to keep for nucleus sampling. Default: 0.95 (advanced). | -| verbose | Boolean | Whether to print verbose output. Default: False (advanced). | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| credentials | File | JSON credentials file. Leave empty to fall back to environment variables. File type: JSON. | +| model_name | String | The name of the Vertex AI model to use. Default: "gemini-1.5-pro". | +| project | String | The project ID (advanced). | +| location | String | The location for the Vertex AI API. Default: "us-central1" (advanced). | +| max_output_tokens | Integer | The maximum number of tokens to generate (advanced). | +| max_retries | Integer | Maximum number of retries for API calls. Default: 1 (advanced). | +| temperature | Float | Controls randomness in the output. Default: 0.0. | +| top_k | Integer | The number of highest probability vocabulary tokens to keep for top-k-filtering (advanced). | +| top_p | Float | The cumulative probability of parameter highest probability vocabulary tokens to keep for nucleus sampling. Default: 0.95 (advanced). | +| verbose | Boolean | Whether to print verbose output. Default: False (advanced). | -| Name | Type | Description | -|--------|---------------|-----------------------------------------------------| -| model | LanguageModel | An instance of ChatVertexAI configured with the specified parameters. | +**Outputs** + +| Name | Type | Description | +|------|------|-------------| +| model | LanguageModel | An instance of ChatVertexAI configured with the specified parameters. | + +
## xAI @@ -620,23 +728,28 @@ This component generates text using xAI models like [Grok](https://x.ai/grok). For more information, see the [xAI documentation](https://x.ai/). -### Inputs +
+Parameters -| Name | Type | Description | -|----------------|---------------|-----------------------------------------------------------------| -| max_tokens | Integer | Maximum number of tokens to generate. Set to `0` for unlimited. Range: `0-128000`. | -| model_kwargs | Dictionary | Additional keyword arguments for the model. | -| json_mode | Boolean | If `True`, outputs JSON regardless of passing a schema. | -| model_name | String | The xAI model to use. Default: `grok-2-latest`. | -| base_url | String | Base URL for API requests. Default: `https://api.x.ai/v1`. | -| api_key | SecretString | Your xAI API key for authentication. | -| temperature | Float | Controls randomness in the output. Range: `[0.0, 2.0]`. Default: `0.1`. | -| seed | Integer | Controls reproducibility of the job. | +**Inputs** -### Outputs +| Name | Type | Description | +|------|------|-------------| +| max_tokens | Integer | Maximum number of tokens to generate. Set to `0` for unlimited. Range: `0-128000`. | +| model_kwargs | Dictionary | Additional keyword arguments for the model. | +| json_mode | Boolean | If `True`, outputs JSON regardless of passing a schema. | +| model_name | String | The xAI model to use. Default: `grok-2-latest`. | +| base_url | String | Base URL for API requests. Default: `https://api.x.ai/v1`. | +| api_key | SecretString | Your xAI API key for authentication. | +| temperature | Float | Controls randomness in the output. Range: `[0.0, 2.0]`. Default: `0.1`. | +| seed | Integer | Controls reproducibility of the job. | -| Name | Type | Description | -|-------|---------------|------------------------------------------------------------------| +**Outputs** + +| Name | Type | Description | +|------|------|-------------| | model | LanguageModel | An instance of ChatOpenAI configured with the specified parameters. | +
+ diff --git a/docs/docs/Components/components-processing.md b/docs/docs/Components/components-processing.md index bf51acb1f..7270e97cd 100644 --- a/docs/docs/Components/components-processing.md +++ b/docs/docs/Components/components-processing.md @@ -13,7 +13,7 @@ The **Split Text** processing component in this flow splits the incoming [Data]( The component offers control over chunk size, overlap, and separator, which affect context and granularity in vector store retrieval results. -![A vector store ingesting documents](/img/vector-store-document-ingestion.png) +![](/img/vector-store-document-ingestion.png) ## Combine data @@ -25,18 +25,23 @@ This component combines multiple data sources into a single unified [Data](/conc The component iterates through the input list of data objects, merging them into a single data object. If the input list is empty, it returns an empty data object. If there's only one input data object, it returns that object unchanged. The merging process uses the addition operator to combine data objects. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| | data | Data | A list of data objects to be merged. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| | merged_data | Merged Data | A single [Data](/concepts-objects#data-object) object containing the combined information from all input data objects. | +
+ ## Combine text This component concatenates two text sources into a single text chunk using a specified delimiter. @@ -60,19 +65,24 @@ start second text Here's the second part. We'll see how combining text works. ``` -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| | first_text | First Text | The first text input to concatenate. | | second_text | Second Text | The second text input to concatenate. | -| delimiter | Delimiter | A string used to separate the two text inputs. Defaults to a space. | +| delimiter | Delimiter | A string used to separate the two text inputs. The default is a space. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| -|message |Message |A [Message](/concepts-objects#message-object) object containing the combined text. +| message | Message | A Message object containing the combined text. | + +
## DataFrame operations @@ -134,28 +144,32 @@ This component can perform the following operations on Pandas [DataFrame](https: | Sort | Sorts DataFrame by column | column_name, ascending | | Tail | Returns last n rows | num_rows | -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| | df | DataFrame | The input DataFrame to operate on. | -| operation | Operation | Select the DataFrame operation to perform. Options: Add Column, Drop Column, Filter, Head, Rename Column, Replace Value, Select Columns, Sort, Tail | +| operation | Operation | The DataFrame operation to perform. Options include Add Column, Drop Column, Filter, Head, Rename Column, Replace Value, Select Columns, Sort, and Tail. | | column_name | Column Name | The column name to use for the operation. | | filter_value | Filter Value | The value to filter rows by. | | ascending | Sort Ascending | Whether to sort in ascending order. | | new_column_name | New Column Name | The new column name when renaming or adding a column. | | new_column_value | New Column Value | The value to populate the new column with. | -| columns_to_select | Columns to Select | List of column names to select. | -| num_rows | Number of Rows | Number of rows to return (for head/tail). Default: 5 | +| columns_to_select | Columns to Select | A list of column names to select. | +| num_rows | Number of Rows | The number of rows to return for head/tail operations. The default is 5. | | replace_value | Value to Replace | The value to replace in the column. | | replacement_value | Replacement Value | The value to replace with. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| | output | DataFrame | The resulting DataFrame after the operation. | +
## Data to DataFrame @@ -212,17 +226,22 @@ curl -X POST "http://127.0.0.1:7860/api/v1/webhook/YOUR_FLOW_ID" \ | Kalani Smith - Employee Profile | {'Name': 'Kalani Smith', 'Role': 'Designer', 'Department': 'Design'} | ``` -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| | data_list | Data or Data List | One or multiple Data objects to transform into a DataFrame. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| -| dataframe | DataFrame | A DataFrame built from each Data object's fields plus a 'text' column. | +| dataframe | DataFrame | A DataFrame built from each Data object's fields plus a text column. | + +
## Filter data @@ -232,18 +251,23 @@ This component is in **Beta** as of Langflow version 1.1.3, and is not yet fully This component filters a [Data](/concepts-objects#data-object) object based on a list of keys. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| -| data | Data | Data object to filter. | -| filter_criteria | Filter Criteria | List of keys to filter by. | +| data | Data | The Data object to filter. | +| filter_criteria | Filter Criteria | A list of keys to filter by. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| -| filtered_data | Filtered Data | A new [Data](/concepts-objects#data-object) object containing only the key-value pairs that match the filter criteria. | +| filtered_data | Filtered Data | A new Data object containing only the key-value pairs that match the filter criteria. | + +
## Filter values @@ -253,20 +277,24 @@ This component is in **Beta** as of Langflow version 1.1.3, and is not yet fully The Filter values component filters a list of data items based on a specified key, filter value, and comparison operator. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| | input_data | Input data | The list of data items to filter. | -| filter_key | Filter Key | The key to filter on, for example, 'route'. | -| filter_value | Filter Value | The value to filter by, for example, 'CMIP'. | +| filter_key | Filter Key | The key to filter on. | +| filter_value | Filter Value | The value to filter by. | | operator | Comparison Operator | The operator to apply for comparing the values. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| | filtered_data | Filtered data | The resulting list of filtered data items. | +
## Lambda filter @@ -280,59 +308,73 @@ The connected LLM creates a filter based on the instructions, and successfully e ![](/img/component-lambda-filter.png) -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| | data | Data | The structured data to filter or transform using a Lambda function. | | llm | Language Model | The connection port for a [Model](/components-models) component. | -| filter_instruction | Instructions | Natural language instructions for how to filter or transform the data using a Lambda function, such as `Filter the data to only include items where the 'status' is 'active'.` | +| filter_instruction | Instructions | The natural language instructions for how to filter or transform the data using a Lambda function, such as `Filter the data to only include items where the 'status' is 'active'`. | | sample_size | Sample Size | For large datasets, the number of characters to sample from the dataset head and tail. | | max_size | Max Size | The number of characters for the data to be considered "large", which triggers sampling by the `sample_size` value. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| | filtered_data | Filtered Data | The filtered or transformed [Data object](/concepts-objects#data-object). | | dataframe | DataFrame | The filtered data as a [DataFrame](/concepts-objects#dataframe-object). | +
+ ## LLM router This component routes requests to the most appropriate LLM based on OpenRouter model specifications. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| -| models | Language Models | List of LLMs to route between | -| input_value | Input | The input message to be routed | -| judge_llm | Judge LLM | LLM that will evaluate and select the most appropriate model | -| optimization | Optimization | Optimization preference (quality/speed/cost/balanced) | +| models | Language Models | A list of LLMs to route between. | +| input_value | Input | The input message to be routed. | +| judge_llm | Judge LLM | The LLM that evaluates and selects the most appropriate model. | +| optimization | Optimization | The optimization preference between quality, speed, cost, or balanced. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| -| output | Output | The response from the selected model | -| selected_model | Selected Model | Name of the chosen model | +| output | Output | The response from the selected model. | +| selected_model | Selected Model | The name of the chosen model. | + +
## Message to data This component converts [Message](/concepts-objects#message-object) objects to [Data](/concepts-objects#data-object) objects. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| -| message | Message | The [Message](/concepts-objects#message-object) object to convert to a [Data](/concepts-objects#data-object) object. | +| message | Message | The Message object to convert to a Data object. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| -| data | Data | The converted [Data](/concepts-objects#data-object) object. | +| data | Data | The converted Data object. | +
## Parser @@ -371,22 +413,131 @@ For example, to present a table of employees in Markdown: For an additional example of using the **Parser** component to format a DataFrame from a **Structured Output** component, see the **Market Research** template flow. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| -| mode | Mode | Tab selection between "Parser" and "Stringify" modes. "Stringify" converts input to a string instead of using a template. | -| pattern | Template | Template for formatting using variables in curly brackets. For DataFrames, use column names, such as `Name: {Name}`. For Data objects, use `{text}`. | -| input_data | Data or DataFrame | The input to parse - accepts either a DataFrame or Data object. | -| sep | Separator | String used to separate rows/items. Default: newline. | -| clean_data | Clean Data | When stringify is enabled, cleans data by removing empty rows and lines. | +| mode | Mode | The tab selection between "Parser" and "Stringify" modes. "Stringify" converts input to a string instead of using a template. | +| pattern | Template | The template for formatting using variables in curly brackets. For DataFrames, use column names, such as `Name: {Name}`. For Data objects, use `{text}`. | +| input_data | Data or DataFrame | The input to parse. Accepts either a DataFrame or Data object. | +| sep | Separator | The string used to separate rows or items. The default is a newline. | +| clean_data | Clean Data | When stringify is enabled, this option cleans data by removing empty rows and lines. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| | parsed_text | Parsed Text | The resulting formatted text as a [Message](/concepts-objects#message-object) object. | +
+ +## Regex extractor + +This component extracts patterns from text using regular expressions. It can be used to find and extract specific patterns or information from text data. + +To use this component in a flow: + +1. Connect the **Regex Extractor** to a **URL** component and a **Chat Output** component. + +![Regex extractor connected to url component](/img/component-url-regex.png) + +2. In the **Regex Extractor** tool, enter a pattern to extract text from the **URL** component's raw output. +This example extracts the first paragraph from the "In the News" section of `https://en.wikipedia.org/wiki/Main_Page`: +``` +In the news\s*\n(.*?)(?=\n\n) +``` + +Result: +``` +Peruvian writer and Nobel Prize in Literature laureate Mario Vargas Llosa (pictured) dies at the age of 89. +``` + +## Save to File + +This component saves [DataFrames, Data, or Messages](/concepts-objects) to various file formats. + +1. To use this component in a flow, connect a component that outputs [DataFrames, Data, or Messages](/concepts-objects) to the **Save to File** component's input. +The following example connects a **Webhook** component to two **Save to File** components to demonstrate the different outputs. + +![Two Save-to File components connected to a webhook](/img/component-save-to-file.png) + +2. In the **Save to File** component's **Input Type** field, select the expected input type. +This example expects **Data** from the **Webhook**. +3. In the **File Format** field, select the file type for your saved file. +This example uses `.md` in one **Save to File** component, and `.xlsx` in another. +4. In the **File Path** field, enter the path for your saved file. +This example uses `./output/employees.xlsx` and `./output/employees.md` to save the files in a directory relative to where Langflow is running. +The component accepts both relative and absolute paths, and creates any necessary directories if they don't exist. +:::tip +If you enter a format in the `file_path` that is not accepted, the component appends the proper format to the file. +For example, if the selected `file_format` is `csv`, and you enter `file_path` as `./output/test.txt`, the file is saved as `./output/test.txt.csv` so the file is not corrupted. +::: +5. Send a POST request to the **Webhook** containing your JSON data. +Replace `YOUR_FLOW_ID` with your flow ID. +This example uses the default Langflow server address. +```text +curl -X POST "http://127.0.0.1:7860/api/v1/webhook/YOUR_FLOW_ID" \ +-H 'Content-Type: application/json' \ +-d '{ + "Name": ["Alex Cruz", "Kalani Smith", "Noam Johnson"], + "Role": ["Developer", "Designer", "Manager"], + "Department": ["Engineering", "Design", "Management"] +}' +``` +6. In your local filesystem, open the `outputs` directory. +You should see two files created from the data you've sent: one in `.xlsx` for structured spreadsheets, and one in Markdown. +```text +| Name | Role | Department | +|:-------------|:----------|:-------------| +| Alex Cruz | Developer | Engineering | +| Kalani Smith | Designer | Design | +| Noam Johnson | Manager | Management | +``` + +### File input format options + +For `DataFrame` and `Data` inputs, the component can create: + - `csv` + - `excel` + - `json` + - `markdown` + - `pdf` + +For `Message` inputs, the component can create: + - `txt` + - `json` + - `markdown` + - `pdf` + +
+Parameters + +**Inputs** + +| Name | Display Name | Info | +|------|--------------|------| +| input_text | Input Text | The text to analyze and extract patterns from. | +| pattern | Regex Pattern | The regular expression pattern to match in the text. | +| input_type | Input Type | The type of input to save. | +| df | DataFrame | The DataFrame to save. | +| data | Data | The Data object to save. | +| message | Message | The Message to save. | +| file_format | File Format | The file format to save the input in. | +| file_path | File Path | The full file path including filename and extension. | + +**Outputs** + +| Name | Display Name | Info | +|------|--------------|------| +| data | Data | A list of extracted matches as Data objects. | +| text | Message | The extracted matches formatted as a Message object. | +| confirmation | Confirmation | The confirmation message after saving the file. | + +
+ ## Split text This component splits text into chunks based on specified criteria. It's ideal for chunking data to be tokenized and embedded into vector databases. @@ -438,65 +589,80 @@ Second chunk: "elligence", "body": "Learn the basics of Artif" Third chunk: "s of Artificial Intelligence and its applications" ``` -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| -| data_inputs | Input Documents | The data to split.The component accepts [Data](/concepts-objects#data-object) or [DataFrame](/concepts-objects#dataframe-object) objects. | +| data_inputs | Input Documents | The data to split. The component accepts [Data](/concepts-objects#data-object) or [DataFrame](/concepts-objects#dataframe-object) objects. | | chunk_overlap | Chunk Overlap | The number of characters to overlap between chunks. Default: `200`. | | chunk_size | Chunk Size | The maximum number of characters in each chunk. Default: `1000`. | | separator | Separator | The character to split on. Default: `newline`. | -| text_key | Text Key | The key to use for the text column (advanced). Default: `text`. | +| text_key | Text Key | The key to use for the text column. Default: `text`. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| -| chunks | Chunks | List of split text chunks as [Data](/concepts-objects#data-object) objects. | -| dataframe | DataFrame | List of split text chunks as [DataFrame](/concepts-objects#dataframe-object) objects. | +| chunks | Chunks | A list of split text chunks as [Data](/concepts-objects#data-object) objects. | +| dataframe | DataFrame | A list of split text chunks as [DataFrame](/concepts-objects#dataframe-object) objects. | + +
## Update data This component dynamically updates or appends data with specified fields. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| -| old_data | Data | The records to update | -| number_of_fields | Number of Fields | Number of fields to add (max 15) | -| text_key | Text Key | Key for text content | -| text_key_validator | Text Key Validator | Validates text key presence | +| old_data | Data | The records to update. | +| number_of_fields | Number of Fields | The number of fields to add. The maximum is 15. | +| text_key | Text Key | The key for text content. | +| text_key_validator | Text Key Validator | Validates the text key presence. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| -| data | Data | Updated [Data](/concepts-objects#data-object) objects. | +| data | Data | The updated Data objects. | + +
## Legacy components -**Legacy** components are available to use but no longer supported. +**Legacy** components are available for use but are no longer supported. ### Alter metadata This component modifies metadata of input objects. It can add new metadata, update existing metadata, and remove specified metadata fields. The component works with both [Message](/concepts-objects#message-object) and [Data](/concepts-objects#data-object) objects, and can also create a new Data object from user-provided text. -#### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| | input_value | Input | Objects to which Metadata should be added | -| text_in | User Text | Text input; the value will be in the 'text' attribute of the [Data](/concepts-objects#data-object) object. Empty text entries are ignored. | +| text_in | User Text | Text input; the value is contained in the 'text' attribute of the [Data](/concepts-objects#data-object) object. Empty text entries are ignored. | | metadata | Metadata | Metadata to add to each object | | remove_fields | Fields to Remove | Metadata fields to remove | -#### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| | data | Data | List of Input objects, each with added metadata | +
+ ### Create data :::important @@ -505,46 +671,47 @@ This component is in **Legacy**, which means it is no longer in active developme This component dynamically creates a [Data](/concepts-objects#data-object) object with a specified number of fields. -#### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| | number_of_fields | Number of Fields | The number of fields to be added to the record. | | text_key | Text Key | Key that identifies the field to be used as the text content. | | text_key_validator | Text Key Validator | If enabled, checks if the given `Text Key` is present in the given `Data`. | -#### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| | data | Data | A [Data](/concepts-objects#data-object) object created with the specified fields and text key. | -### Data to message +
-:::important -This component is in **Legacy**, which means it is no longer in active development as of Langflow version 1.3. -Instead, use the [Parser](#parser) component. -::: +### JSON cleaner -:::important -Prior to Langflow version 1.1.3, this component was named **Parse Data**. -::: +The JSON cleaner component cleans JSON strings to ensure they are fully compliant with the JSON specification. -The ParseData component converts data objects into plain text using a specified template. -This component transforms structured data into human-readable text formats, allowing for customizable output through the use of templates. +
+Parameters -#### Inputs +**Inputs** | Name | Display Name | Info | |------|--------------|------| -| data | Data | The data to convert to text. | -| template | Template | The template to use for formatting the data. It can contain the keys `{text}`, `{data}`, or any other key in the data. | -| sep | Separator | The separator to use between multiple data items. | +| json_str | JSON String | The JSON string to be cleaned. This can be a raw, potentially malformed JSON string produced by language models or other sources that may not fully comply with JSON specifications. | +| remove_control_chars | Remove Control Characters | If set to True, this option removes control characters (ASCII characters 0-31 and 127) from the JSON string. This can help eliminate invisible characters that might cause parsing issues or make the JSON invalid. | +| normalize_unicode | Normalize Unicode | When enabled, this option normalizes Unicode characters in the JSON string to their canonical composition form (NFC). This ensures consistent representation of Unicode characters across different systems and prevents potential issues with character encoding. | +| validate_json | Validate JSON | If set to True, this option attempts to parse the JSON string to ensure it is well-formed before applying the final repair operation. It raises a ValueError if the JSON is invalid, allowing for early detection of major structural issues in the JSON. | -#### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| -| text | Text | The resulting formatted text string as a [Message](/concepts-objects#message-object) object. | +| output | Cleaned JSON String | The resulting cleaned, repaired, and validated JSON string that fully complies with the JSON specification. | + +
### Parse DataFrame @@ -555,7 +722,10 @@ Instead, use the [Parser](#parser) component. This component converts DataFrames into plain text using templates. -#### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| @@ -563,12 +733,14 @@ This component converts DataFrames into plain text using templates. | template | Template | Template for formatting (use `{column_name}` placeholders). | | sep | Separator | String to join rows in output. | -#### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| | text | Text | All rows combined into single text. | +
+ ### Parse JSON :::important @@ -577,19 +749,24 @@ This component is in **Legacy**, which means it is no longer in active developme This component converts and extracts JSON fields using JQ queries. -#### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| | input_value | Input | Data object to filter ([Message](/concepts-objects#message-object) or [Data](/concepts-objects#data-object)). | | query | JQ Query | JQ Query to filter the data | -#### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| | filtered_data | Filtered Data | Filtered data as list of [Data](/concepts-objects#data-object) objects. | +
+ ### Select data :::important @@ -598,15 +775,20 @@ This component is in **Legacy**, which means it is no longer in active developme This component selects a single [Data](/concepts-objects#data-object) item from a list. -#### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| | data_list | Data List | List of data to select from | | data_index | Data Index | Index of the data to select | -#### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| | selected_data | Selected Data | The selected [Data](/concepts-objects#data-object) object. | + +
diff --git a/docs/docs/Components/components-prompts.md b/docs/docs/Components/components-prompts.md index 908327e34..112a96151 100644 --- a/docs/docs/Components/components-prompts.md +++ b/docs/docs/Components/components-prompts.md @@ -32,33 +32,47 @@ Answer the question When variables are added to a prompt template, new fields are automatically created in the component. These fields can be connected to receive text input from other components to automate prompting, or to output instructions to other components. An example of prompts controlling agents behavior is available in the [sequential tasks agent starter flow](/sequential-agent). -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |----------|--------------|-------------------------------------------------------------------| | template | Template | Create a prompt template with dynamic variables. | -### Outputs +**Outputs** | Name | Display Name | Info | |--------|----------------|--------------------------------------------------------| | prompt | Prompt Message | The built prompt message returned by the `build_prompt` method. | +
+ ## Langchain Hub Prompt Template +:::important +This component is available in the **Components** menu under **Bundles**. +::: + This component fetches prompts from the [Langchain Hub](https://docs.smith.langchain.com/old/category/prompt-hub). When a prompt is loaded, the component generates input fields for custom variables. For example, the default prompt "efriis/my-first-prompt" generates fields for `profession` and `question`. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |--------------------|---------------------------|------------------------------------------| | langchain_api_key | Your LangChain API Key | The LangChain API Key to use. | | langchain_hub_prompt| LangChain Hub Prompt | The LangChain Hub prompt to use. | -### Outputs +**Outputs** | Name | Display Name | Info | |--------|--------------|-------------------------------------------------------------------| | prompt | Build Prompt | The built prompt message returned by the `build_prompt` method. | + +
diff --git a/docs/docs/Components/components-vector-stores.md b/docs/docs/Components/components-vector-stores.md index 46664a103..de9dbdf4b 100644 --- a/docs/docs/Components/components-vector-stores.md +++ b/docs/docs/Components/components-vector-stores.md @@ -35,7 +35,10 @@ This component implements a Vector Store using Astra DB with search capabilities For more information, see the [DataStax documentation](https://docs.datastax.com/en/astra-db-serverless/databases/create-database.html). -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| @@ -47,7 +50,7 @@ For more information, see the [DataStax documentation](https://docs.datastax.com | keyspace | Keyspace | An optional keyspace within Astra DB to use for the collection. | | embedding_choice | Embedding Model or Astra Vectorize | Choose an embedding model or use Astra vectorize. | | embedding_model | Embedding Model | Specify the embedding model. Not required for Astra vectorize collections. | -| number_of_results | Number of Search Results | The number of search results to return (default: `4`). | +| number_of_results | Number of Search Results | The number of search results to return. Default:`4`. | | search_type | Search Type | The search type to use. The options are `Similarity`, `Similarity with score threshold`, and `MMR (Max Marginal Relevance)`. | | search_score_threshold | Search Score Threshold | The minimum similarity score threshold for search results when using the `Similarity with score threshold` option. | | advanced_search_filter | Search Metadata Filter | An optional dictionary of filters to apply to the search query. | @@ -57,13 +60,15 @@ For more information, see the [DataStax documentation](https://docs.datastax.com | ignore_invalid_documents | Ignore Invalid Documents | A boolean flag to determine whether to ignore invalid documents at runtime. | | astradb_vectorstore_kwargs | AstraDBVectorStore Parameters | An optional dictionary of additional parameters for the AstraDBVectorStore. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| -| vector_store | Vector Store | Astra DB vector store instance configured with the specified parameters. | +| vector_store | Vector Store | The Astra DB vector store instance configured with the specified parameters. | | search_results | Search Results | The results of the similarity search as a list of [Data](/concepts-objects#data-object) objects. | +
+ ### Generate embeddings The **Astra DB Vector Store** component offers two methods for generating embeddings. @@ -137,99 +142,113 @@ For more information, see the [DataStax documentation](https://docs.datastax.com This component implements a Vector Store using AstraDB with graph capabilities. For more information, see the [Astra DB Serverless documentation](https://docs.datastax.com/en/astra-db-serverless/tutorials/graph-rag.html). -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| -| collection_name | Collection Name | The name of the collection within AstraDB where the vectors will be stored (required) | -| token | Astra DB Application Token | Authentication token for accessing AstraDB (required) | -| api_endpoint | API Endpoint | API endpoint URL for the AstraDB service (required) | -| search_input | Search Input | Query string for similarity search | -| ingest_data | Ingest Data | Data to be ingested into the vector store | -| namespace | Namespace | Optional namespace within AstraDB to use for the collection | -| embedding | Embedding Model | Embedding model to use | -| metric | Metric | Distance metric for vector comparisons (options: "cosine", "euclidean", "dot_product") | -| setup_mode | Setup Mode | Configuration mode for setting up the vector store (options: "Sync", "Async", "Off") | -| pre_delete_collection | Pre Delete Collection | Boolean flag to determine whether to delete the collection before creating a new one | -| number_of_results | Number of Results | Number of results to return in similarity search (default: 4) | -| search_type | Search Type | Search type to use (options: "Similarity", "Graph Traversal", "Hybrid") | -| traversal_depth | Traversal Depth | Maximum depth for graph traversal searches (default: 1) | -| search_score_threshold | Search Score Threshold | Minimum similarity score threshold for search results | -| search_filter | Search Metadata Filter | Optional dictionary of filters to apply to the search query | +| collection_name | Collection Name | The name of the collection within AstraDB where the vectors are stored. Required. | +| token | Astra DB Application Token | Authentication token for accessing AstraDB. Required. | +| api_endpoint | API Endpoint | API endpoint URL for the AstraDB service. Required. | +| search_input | Search Input | Query string for similarity search. | +| ingest_data | Ingest Data | Data to be ingested into the vector store. | +| namespace | Namespace | Optional namespace within AstraDB to use for the collection. | +| embedding | Embedding Model | Embedding model to use. | +| metric | Metric | Distance metric for vector comparisons. The options are "cosine", "euclidean", "dot_product". | +| setup_mode | Setup Mode | Configuration mode for setting up the vector store. The options are "Sync", "Async", "Off". | +| pre_delete_collection | Pre Delete Collection | Boolean flag to determine whether to delete the collection before creating a new one. | +| number_of_results | Number of Results | Number of results to return in similarity search. Default: 4. | +| search_type | Search Type | Search type to use. The options are "Similarity", "Graph Traversal", "Hybrid". | +| traversal_depth | Traversal Depth | Maximum depth for graph traversal searches. Default: 1. | +| search_score_threshold | Search Score Threshold | Minimum similarity score threshold for search results. | +| search_filter | Search Metadata Filter | Optional dictionary of filters to apply to the search query. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| -| vector_store | Vector Store | Astra DB graph vector store instance configured with the specified parameters. | -| search_results | Search Results | The results of the similarity search as a list of `Data` objects. | +| vector_store | Vector Store | The Graph RAG vector store instance configured with the specified parameters. | +| search_results | Search Results | The results of the similarity search as a list of [Data](/concepts-objects#data-object) objects. | +
## Cassandra This component creates a Cassandra Vector Store with search capabilities. For more information, see the [Cassandra documentation](https://cassandra.apache.org/doc/latest/cassandra/vector-search/overview.html). -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |------|------|-------------| -| database_ref | String | Contact points for the database or AstraDB database ID | -| username | String | Username for the database (leave empty for AstraDB) | -| token | SecretString | User password for the database or AstraDB token | -| keyspace | String | Table Keyspace or AstraDB namespace | -| table_name | String | Name of the table or AstraDB collection | -| ttl_seconds | Integer | Time-to-live for added texts | -| batch_size | Integer | Number of data to process in a single batch | -| setup_mode | String | Configuration mode for setting up the Cassandra table | -| cluster_kwargs | Dict | Additional keyword arguments for the Cassandra cluster | -| search_query | String | Query for similarity search | -| ingest_data | Data | Data to be ingested into the vector store | -| embedding | Embeddings | Embedding function to use | -| number_of_results | Integer | Number of results to return in search | -| search_type | String | Type of search to perform | -| search_score_threshold | Float | Minimum similarity score for search results | -| search_filter | Dict | Metadata filters for search query | -| body_search | String | Document textual search terms | -| enable_body_search | Boolean | Flag to enable body search | +| database_ref | String | Contact points for the database or AstraDB database ID. | +| username | String | Username for the database (leave empty for AstraDB). | +| token | SecretString | User password for the database or AstraDB token. | +| keyspace | String | Table Keyspace or AstraDB namespace. | +| table_name | String | Name of the table or AstraDB collection. | +| ttl_seconds | Integer | Time-to-live for added texts. | +| batch_size | Integer | Number of data to process in a single batch. | +| setup_mode | String | Configuration mode for setting up the Cassandra table. | +| cluster_kwargs | Dict | Additional keyword arguments for the Cassandra cluster. | +| search_query | String | Query for similarity search. | +| ingest_data | Data | Data to be ingested into the vector store. | +| embedding | Embeddings | Embedding function to use. | +| number_of_results | Integer | Number of results to return in search. | +| search_type | String | Type of search to perform. | +| search_score_threshold | Float | Minimum similarity score for search results. | +| search_filter | Dict | Metadata filters for search query. | +| body_search | String | Document textual search terms. | +| enable_body_search | Boolean | Flag to enable body search. | -### Outputs +**Outputs** | Name | Type | Description | |------|------|-------------| -| vector_store | Cassandra | A Cassandra vector store instance configured with the specified parameters. | +| vector_store | Cassandra | The Cassandra vector store instance configured with the specified parameters. | | search_results | List[Data] | The results of the similarity search as a list of `Data` objects. | +
+ ## Cassandra Graph Vector Store This component implements a Cassandra Graph Vector Store with search capabilities. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| -| database_ref | Contact Points / Astra Database ID | Contact points for the database or AstraDB database ID (required) | -| username | Username | Username for the database (leave empty for AstraDB) | -| token | Password / AstraDB Token | User password for the database or AstraDB token (required) | -| keyspace | Keyspace | Table Keyspace or AstraDB namespace (required) | -| table_name | Table Name | The name of the table or AstraDB collection where vectors will be stored (required) | -| setup_mode | Setup Mode | Configuration mode for setting up the Cassandra table (options: "Sync", "Off", default: "Sync") | -| cluster_kwargs | Cluster arguments | Optional dictionary of additional keyword arguments for the Cassandra cluster | -| search_query | Search Query | Query string for similarity search | -| ingest_data | Ingest Data | Data to be ingested into the vector store (list of Data objects) | -| embedding | Embedding | Embedding model to use | -| number_of_results | Number of Results | Number of results to return in similarity search (default: 4) | -| search_type | Search Type | Search type to use (options: "Traversal", "MMR traversal", "Similarity", "Similarity with score threshold", "MMR (Max Marginal Relevance)", default: "Traversal") | -| depth | Depth of traversal | The maximum depth of edges to traverse (for "Traversal" or "MMR traversal" search types, default: 1) | -| search_score_threshold | Search Score Threshold | Minimum similarity score threshold for search results (for "Similarity with score threshold" search type) | -| search_filter | Search Metadata Filter | Optional dictionary of filters to apply to the search query | +| database_ref | Contact Points / Astra Database ID | The contact points for the database or AstraDB database ID. Required. | +| username | Username | The username for the database. Leave this field empty for AstraDB. | +| token | Password / AstraDB Token | The user password for the database or AstraDB token. Required. | +| keyspace | Keyspace | The table Keyspace or AstraDB namespace. Required. | +| table_name | Table Name | The name of the table or AstraDB collection where vectors are stored. Required. | +| setup_mode | Setup Mode | The configuration mode for setting up the Cassandra table. The options are "Sync" or "Off". Default: "Sync". | +| cluster_kwargs | Cluster arguments | An optional dictionary of additional keyword arguments for the Cassandra cluster. | +| search_query | Search Query | The query string for similarity search. | +| ingest_data | Ingest Data | The list of data to be ingested into the vector store. | +| embedding | Embedding | The embedding model to use. | +| number_of_results | Number of Results | The number of results to return in similarity search. Default: 4. | +| search_type | Search Type | The search type to use. The options are "Traversal", "MMR traversal", "Similarity", "Similarity with score threshold", or "MMR (Max Marginal Relevance)". Default: "Traversal". | +| depth | Depth of traversal | The maximum depth of edges to traverse. Used for "Traversal" or "MMR traversal" search types. Default: 1. | +| search_score_threshold | Search Score Threshold | The minimum similarity score threshold for search results. Used for "Similarity with score threshold" search types. | +| search_filter | Search Metadata Filter | An optional dictionary of filters to apply to the search query. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| -| vector_store | Vector Store | A Cassandra Graph vector store instance configured with the specified parameters. | -| search_results | Search Results | The results of the similarity search as a list of `Data` objects. | +| vector_store | Vector Store | The Cassandra Graph vector store instance configured with the specified parameters. | +| search_results | Search Results | The results of the similarity search as a list of [Data](/concepts-objects#data-object) objects. | + +
## Chroma DB @@ -255,92 +274,107 @@ Your input is converted to vector data and compared to the stored vectors in a v For more information, see the [Chroma documentation](https://docs.trychroma.com/). -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |------------------------------|---------------|--------------------------------------------------| | collection_name | String | The name of the Chroma collection. Default: "langflow". | | persist_directory | String | The directory to persist the Chroma database. | | search_query | String | The query to search for in the vector store. | -| ingest_data | Data | The data to ingest into the vector store (list of Data objects). | +| ingest_data | Data | The data to ingest into the vector store (list of `Data` objects). | | embedding | Embeddings | The embedding function to use for the vector store. | -| chroma_server_cors_allow_origins | String | CORS allow origins for the Chroma server. | -| chroma_server_host | String | Host for the Chroma server. | -| chroma_server_http_port | Integer | HTTP port for the Chroma server. | -| chroma_server_grpc_port | Integer | gRPC port for the Chroma server. | +| chroma_server_cors_allow_origins | String | The CORS allow origins for the Chroma server. | +| chroma_server_host | String | The host for the Chroma server. | +| chroma_server_http_port | Integer | The HTTP port for the Chroma server. | +| chroma_server_grpc_port | Integer | The gRPC port for the Chroma server. | | chroma_server_ssl_enabled | Boolean | Enable SSL for the Chroma server. | | allow_duplicates | Boolean | Allow duplicate documents in the vector store. | -| search_type | String | Type of search to perform: "Similarity" or "MMR". | -| number_of_results | Integer | Number of results to return from the search. Default: 10. | -| limit | Integer | Limit the number of records to compare when Allow Duplicates is False. | +| search_type | String | The type of search to perform: "Similarity" or "MMR". | +| number_of_results | Integer | The number of results to return from the search. Default: `10`. | +| limit | Integer | The limit of the number of records to compare when `Allow Duplicates` is `False`. | -### Outputs +**Outputs** | Name | Type | Description | |----------------|---------------|--------------------------------| -| vector_store | Chroma | Chroma vector store instance | -| search_results | List[Data] | Results of similarity search | +| vector_store | Chroma | The Chroma vector store instance. | +| search_results | List[Data] | The results of the similarity search as a list of [Data](/concepts-objects#data-object) objects. | + +
## Clickhouse This component implements a Clickhouse Vector Store with search capabilities. -For more information, see the [CLickhouse Documentation](https://clickhouse.com/docs/en/intro). +For more information, see the [Clickhouse Documentation](https://clickhouse.com/docs/en/intro). -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| -| host | hostname | Clickhouse server hostname (required, default: "localhost") | -| port | port | Clickhouse server port (required, default: 8123) | -| database | database | Clickhouse database name (required) | -| table | Table name | Clickhouse table name (required) | -| username | The ClickHouse user name. | Username for authentication (required) | -| password | The password for username. | Password for authentication (required) | -| index_type | index_type | Type of the index (options: "annoy", "vector_similarity", default: "annoy") | -| metric | metric | Metric to compute distance (options: "angular", "euclidean", "manhattan", "hamming", "dot", default: "angular") | -| secure | Use https/TLS | Overrides inferred values from the interface or port arguments (default: false) | -| index_param | Param of the index | Index parameters (default: "'L2Distance',100") | -| index_query_params | index query params | Additional index query parameters | -| search_query | Search Query | Query string for similarity search | -| ingest_data | Ingest Data | Data to be ingested into the vector store | -| embedding | Embedding | Embedding model to use | -| number_of_results | Number of Results | Number of results to return in similarity search (default: 4) | -| score_threshold | Score threshold | Threshold for similarity scores | +| host | hostname | The Clickhouse server hostname. Required. Default: "localhost". | +| port | port | The Clickhouse server port. Required. Default: 8123. | +| database | database | The Clickhouse database name. Required. | +| table | Table name | The Clickhouse table name. Required. | +| username | The ClickHouse user name. | Username for authentication. Required. | +| password | The password for username. | Password for authentication. Required. | +| index_type | index_type | Type of the index. The options are "annoy" and "vector_similarity". Default: "annoy". | +| metric | metric | Metric to compute distance. The options are "angular", "euclidean", "manhattan", "hamming", "dot". Default: "angular". | +| secure | Use https/TLS | Overrides inferred values from the interface or port arguments. Default: false. | +| index_param | Param of the index | Index parameters. Default: "'L2Distance',100". | +| index_query_params | index query params | Additional index query parameters. | +| search_query | Search Query | The query string for similarity search. | +| ingest_data | Ingest Data | The data to be ingested into the vector store. | +| embedding | Embedding | The embedding model to use. | +| number_of_results | Number of Results | The number of results to return in similarity search. Default: 4. | +| score_threshold | Score threshold | The threshold for similarity scores. | -### Outputs +**Outputs** | Name | Display Name | Info | |------|--------------|------| -| vector_store | Vector Store | Built Clickhouse vector store | -| search_results | Search Results | Results of the similarity search as a list of Data objects | +| vector_store | Vector Store | The Clickhouse vector store. | +| search_results | Search Results | The results of the similarity search as a list of Data objects. | + +
## Couchbase This component creates a Couchbase Vector Store with search capabilities. For more information, see the [Couchbase documentation](https://docs.couchbase.com/home/index.html). -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |-------------------------|---------------|--------------------------------------------------| -| couchbase_connection_string | SecretString | Couchbase Cluster connection string (required). | -| couchbase_username | String | Couchbase username (required). | -| couchbase_password | SecretString | Couchbase password (required). | -| bucket_name | String | Name of the Couchbase bucket (required). | -| scope_name | String | Name of the Couchbase scope (required). | -| collection_name | String | Name of the Couchbase collection (required). | -| index_name | String | Name of the Couchbase index (required). | +| couchbase_connection_string | SecretString | Couchbase Cluster connection string. Required. | +| couchbase_username | String | Couchbase username. Required. | +| couchbase_password | SecretString | Couchbase password. Required. | +| bucket_name | String | Name of the Couchbase bucket. Required. | +| scope_name | String | Name of the Couchbase scope. Required. | +| collection_name | String | Name of the Couchbase collection. Required. | +| index_name | String | Name of the Couchbase index. Required. | | search_query | String | The query to search for in the vector store. | -| ingest_data | Data | The data to ingest into the vector store (list of Data objects). | +| ingest_data | Data | The list of data to ingest into the vector store. | | embedding | Embeddings | The embedding function to use for the vector store. | -| number_of_results | Integer | Number of results to return from the search. Default: 4 (advanced). | +| number_of_results | Integer | Number of results to return from the search. Default: 4. | -### Outputs +**Outputs** | Name | Type | Description | |----------------|------------------------|--------------------------------| | vector_store | CouchbaseVectorStore | A Couchbase vector store instance configured with the specified parameters. | +
+ ## Local DB The **Local DB** component is Langflow's enhanced version of Chroma DB. @@ -357,77 +391,93 @@ The **Retrieve** mode can query your **Chroma DB** collections. For more information, see the [Chroma documentation](https://docs.trychroma.com/). -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |------|------|-------------| | collection_name | String | The name of the Chroma collection. Default: "langflow". | -| persist_directory | String | Custom base directory to save the vector store. Collections will be stored under `{directory}/vector_stores/{collection_name}`. If not specified, it will use your system's cache folder. | +| persist_directory | String | Custom base directory to save the vector store. Collections are stored under `{directory}/vector_stores/{collection_name}`. If not specified, it will use your system's cache folder. | | existing_collections | String | Select a previously created collection to search through its stored data. | | embedding | Embeddings | The embedding function to use for the vector store. | | allow_duplicates | Boolean | If false, will not add documents that are already in the Vector Store. | | search_type | String | Type of search to perform: "Similarity" or "MMR". | -| ingest_data | Data/DataFrame | Data to store. It will be embedded and indexed for semantic search. | +| ingest_data | Data/DataFrame | Data to store. It is embedded and indexed for semantic search. | | search_query | String | Enter text to search for similar content in the selected collection. | | number_of_results | Integer | Number of results to return. Default: 10. | | limit | Integer | Limit the number of records to compare when Allow Duplicates is False. | -### Outputs +**Outputs** | Name | Type | Description | |------|------|-------------| | vector_store | Chroma | A local Chroma vector store instance configured with the specified parameters. | -| search_results | List[Data](/concepts-objects#data-object) | Results of similarity search. | +| search_results | List[Data](/concepts-objects#data-object) | The results of the similarity search as a list of [Data](/concepts-objects#data-object) objects. | + +
## Elasticsearch This component creates an Elasticsearch Vector Store with search capabilities. For more information, see the [Elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/dense-vector.html). -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |------|------|-------------| -| es_url | String | Elasticsearch server URL | -| es_user | String | Username for Elasticsearch authentication | -| es_password | SecretString | Password for Elasticsearch authentication | -| index_name | String | Name of the Elasticsearch index | -| strategy | String | Strategy for vector search ("approximate_k_nearest_neighbors" or "script_scoring") | -| distance_strategy | String | Strategy for distance calculation ("COSINE", "EUCLIDEAN_DISTANCE", "DOT_PRODUCT") | -| search_query | String | Query for similarity search | -| ingest_data | Data | Data to be ingested into the vector store | -| embedding | Embeddings | Embedding function to use | -| number_of_results | Integer | Number of results to return in search (default: 4) | +| es_url | String | Elasticsearch server URL. | +| es_user | String | Username for Elasticsearch authentication. | +| es_password | SecretString | Password for Elasticsearch authentication. | +| index_name | String | Name of the Elasticsearch index. | +| strategy | String | Strategy for vector search. The options are "approximate_k_nearest_neighbors" or "script_scoring". | +| distance_strategy | String | Strategy for distance calculation. The options are "COSINE", "EUCLIDEAN_DISTANCE", or "DOT_PRODUCT". | +| search_query | String | Query for similarity search. | +| ingest_data | Data | Data to be ingested into the vector store. | +| embedding | Embeddings | Embedding function to use. | +| number_of_results | Integer | Number of results to return in search. Default: `4`. | -### Outputs +**Outputs** | Name | Type | Description | |------|------|-------------| -| vector_store | ElasticsearchStore | Elasticsearch vector store instance | -| search_results | List[Data] | Results of similarity search | +| vector_store | ElasticsearchStore | The Elasticsearch vector store instance. | +| search_results | List[Data] | The results of the similarity search as a list of [Data](/concepts-objects#data-object) objects. | + +
## FAISS This component creates a FAISS Vector Store with search capabilities. For more information, see the [FAISS documentation](https://faiss.ai/index.html). -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |---------------------------|---------------|--------------------------------------------------| | index_name | String | The name of the FAISS index. Default: "langflow_index". | -| persist_directory | String | Path to save the FAISS index. It will be relative to where Langflow is running. | +| persist_directory | String | Path to save the FAISS index. It is relative to where Langflow is running. | | search_query | String | The query to search for in the vector store. | -| ingest_data | Data | The data to ingest into the vector store (list of Data objects or documents). | -| allow_dangerous_deserialization | Boolean | Set to True to allow loading pickle files from untrusted sources. Default: True (advanced). | +| ingest_data | Data | The list of data to ingest into the vector store. | +| allow_dangerous_deserialization | Boolean | Set to True to allow loading pickle files from untrusted sources. Default: True. | | embedding | Embeddings | The embedding function to use for the vector store. | -| number_of_results | Integer | Number of results to return from the search. Default: 4 (advanced). | +| number_of_results | Integer | Number of results to return from the search. Default: 4. | -### Outputs +**Outputs** -| Name | Type | Description | -|----------------|------------------------|--------------------------------| -| vector_store | FAISS | A FAISS vector store instance configured with the specified parameters. | +| Name | Display Name | Info | +|------|--------------|------| +| vector_store | Vector Store | The FAISS vector store instance configured with the specified parameters. | +| search_results | Search Results | The results of the similarity search as a list of [Data](/concepts-objects#data-object) objects. | + +
## Graph RAG @@ -436,7 +486,10 @@ For more information, see the [Graph RAG documentation](https://datastax.github. For an example flow, see the **Graph RAG** template. -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| @@ -447,13 +500,15 @@ For an example flow, see the **Graph RAG** template. | search_query | Search Query | The query to search for in the vector store. | | graphrag_strategy_kwargs | Strategy Parameters | Optional dictionary of additional parameters for the retrieval strategy. For more information, see the [strategy documentation](https://datastax.github.io/graph-rag/reference/graph_retriever/strategies/). | -### Outputs +**Outputs** | Name | Type | Description | |------|------|-------------| | search_results | List[Data] | Results of the graph-based document retrieval as a list of [Data](/concepts-objects#data-object) objects. | -## Hyper-Converged Database (HCD) Vector Store +
+ +## Hyper-Converged Database (HCD) This component implements a Vector Store using HCD. @@ -466,392 +521,451 @@ To use the HCD vector store for embeddings ingestion, connect it to an embedding ![HCD vector store embeddings ingestion](/img/component-hcd-example-flow.png) -### Inputs +
+Parameters + +**Inputs** | Name | Display Name | Info | |------|--------------|------| -| collection_name | Collection Name | The name of the collection within HCD where the vectors will be stored (required) | -| username | HCD Username | Authentication username for accessing HCD (default: "hcd-superuser", required) | -| password | HCD Password | Authentication password for accessing HCD (required) | -| api_endpoint | HCD API Endpoint | API endpoint URL for the HCD service (required) | -| search_input | Search Input | Query string for similarity search | -| ingest_data | Ingest Data | Data to be ingested into the vector store | -| namespace | Namespace | Optional namespace within HCD to use for the collection (default: "default_namespace") | -| ca_certificate | CA Certificate | Optional CA certificate for TLS connections to HCD | -| metric | Metric | Optional distance metric for vector comparisons (options: "cosine", "dot_product", "euclidean") | -| batch_size | Batch Size | Optional number of data to process in a single batch | -| bulk_insert_batch_concurrency | Bulk Insert Batch Concurrency | Optional concurrency level for bulk insert operations | -| bulk_insert_overwrite_concurrency | Bulk Insert Overwrite Concurrency | Optional concurrency level for bulk insert operations that overwrite existing data | -| bulk_delete_concurrency | Bulk Delete Concurrency | Optional concurrency level for bulk delete operations | -| setup_mode | Setup Mode | Configuration mode for setting up the vector store (options: "Sync", "Async", "Off", default: "Sync") | -| pre_delete_collection | Pre Delete Collection | Boolean flag to determine whether to delete the collection before creating a new one | -| metadata_indexing_include | Metadata Indexing Include | Optional list of metadata fields to include in the indexing | -| embedding | Embedding or Astra Vectorize | Allows either an embedding model or an Astra Vectorize configuration | -| metadata_indexing_exclude | Metadata Indexing Exclude | Optional list of metadata fields to exclude from the indexing | -| collection_indexing_policy | Collection Indexing Policy | Optional dictionary defining the indexing policy for the collection | -| number_of_results | Number of Results | Number of results to return in similarity search (default: 4) | -| search_type | Search Type | Search type to use (options: "Similarity", "Similarity with score threshold", "MMR (Max Marginal Relevance)", default: "Similarity") | -| search_score_threshold | Search Score Threshold | Minimum similarity score threshold for search results (default: 0) | -| search_filter | Search Metadata Filter | Optional dictionary of filters to apply to the search query | +| collection_name | Collection Name | The name of the collection within HCD where the vectors will be stored. Required. | +| username | HCD Username | Authentication username for accessing HCD. Default is "hcd-superuser". Required. | +| password | HCD Password | Authentication password for accessing HCD. Required. | +| api_endpoint | HCD API Endpoint | API endpoint URL for the HCD service. Required. | +| search_input | Search Input | Query string for similarity search. | +| ingest_data | Ingest Data | Data to be ingested into the vector store. | +| namespace | Namespace | Optional namespace within HCD to use for the collection. Default is "default_namespace". | +| ca_certificate | CA Certificate | Optional CA certificate for TLS connections to HCD. | +| metric | Metric | Optional distance metric for vector comparisons. Options are "cosine", "dot_product", "euclidean". | +| batch_size | Batch Size | Optional number of data to process in a single batch. | +| bulk_insert_batch_concurrency | Bulk Insert Batch Concurrency | Optional concurrency level for bulk insert operations. | +| bulk_insert_overwrite_concurrency | Bulk Insert Overwrite Concurrency | Optional concurrency level for bulk insert operations that overwrite existing data. | +| bulk_delete_concurrency | Bulk Delete Concurrency | Optional concurrency level for bulk delete operations. | +| setup_mode | Setup Mode | Configuration mode for setting up the vector store. Options are "Sync", "Async", "Off". Default is "Sync". | +| pre_delete_collection | Pre Delete Collection | Boolean flag to determine whether to delete the collection before creating a new one. | +| metadata_indexing_include | Metadata Indexing Include | Optional list of metadata fields to include in the indexing. | +| embedding | Embedding or Astra Vectorize | Allows either an embedding model or an Astra Vectorize configuration. | +| metadata_indexing_exclude | Metadata Indexing Exclude | Optional list of metadata fields to exclude from the indexing. | +| collection_indexing_policy | Collection Indexing Policy | Optional dictionary defining the indexing policy for the collection. | +| number_of_results | Number of Results | Number of results to return in similarity search. Default is 4. | +| search_type | Search Type | Search type to use. Options are "Similarity", "Similarity with score threshold", "MMR (Max Marginal Relevance)". Default is "Similarity". | +| search_score_threshold | Search Score Threshold | Minimum similarity score threshold for search results. Default is 0. | +| search_filter | Search Metadata Filter | Optional dictionary of filters to apply to the search query. | -### Outputs +**Outputs** -| Name | Display Name | Info | -|------|--------------|------| -| vector_store | Vector Store | An HCD vector store instance The results of the similarity search as a list of `Data` objects.| -| search_results | Search Results | The results of the similarity search as a list of `Data` objects. | +| Name | Type | Description | +|---------------|--------------|-------------------------------------------| +| vector_store | HyperConvergedDatabaseVectorStore | The HCD vector store instance. | +| search_results| List[Data] | The results of the similarity search as a list of [Data](/concepts-objects#data-object) objects. | + +
## Milvus This component creates a Milvus Vector Store with search capabilities. For more information, see the [Milvus documentation](https://milvus.io/docs). -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |-------------------------|---------------|--------------------------------------------------| -| collection_name | String | Name of the Milvus collection | -| collection_description | String | Description of the Milvus collection | -| uri | String | Connection URI for Milvus | -| password | SecretString | Password for Milvus | -| username | SecretString | Username for Milvus | -| batch_size | Integer | Number of data to process in a single batch | -| search_query | String | Query for similarity search | -| ingest_data | Data | Data to be ingested into the vector store | -| embedding | Embeddings | Embedding function to use | -| number_of_results | Integer | Number of results to return in search | -| search_type | String | Type of search to perform | -| search_score_threshold | Float | Minimum similarity score for search results | -| search_filter | Dict | Metadata filters for search query | -| setup_mode | String | Configuration mode for setting up the vector store | -| vector_dimensions | Integer | Number of dimensions of the vectors | -| pre_delete_collection | Boolean | Whether to delete the collection before creating a new one | +| collection_name | String | Name of the Milvus collection. | +| collection_description | String | Description of the Milvus collection. | +| uri | String | Connection URI for Milvus. | +| password | SecretString | Password for Milvus. | +| username | SecretString | Username for Milvus. | +| batch_size | Integer | Number of data to process in a single batch. | +| search_query | String | Query for similarity search. | +| ingest_data | Data | Data to be ingested into the vector store. | +| embedding | Embeddings | Embedding function to use. | +| number_of_results | Integer | Number of results to return in search. | +| search_type | String | Type of search to perform. | +| search_score_threshold | Float | Minimum similarity score for search results. | +| search_filter | Dict | Metadata filters for search query. | +| setup_mode | String | Configuration mode for setting up the vector store. | +| vector_dimensions | Integer | Number of dimensions of the vectors. | +| pre_delete_collection | Boolean | Whether to delete the collection before creating a new one. | -### Outputs +**Outputs** | Name | Type | Description | |----------------|------------------------|--------------------------------| | vector_store | Milvus | A Milvus vector store instance configured with the specified parameters. | +
+ ## MongoDB Atlas This component creates a MongoDB Atlas Vector Store with search capabilities. For more information, see the [MongoDB Atlas documentation](https://www.mongodb.com/docs/atlas/atlas-vector-search/tutorials/vector-search-quick-start/). -### Inputs +
+Parameters +**Inputs** | Name | Type | Description | | ------------------------- | ------------ | ----------------------------------------- | -| mongodb_atlas_cluster_uri | SecretString | The connection URI for your MongoDB Atlas cluster (required) | -| enable_mtls | Boolean | Enable mutual TLS authentication (default: false) | -| mongodb_atlas_client_cert | SecretString | Client certificate combined with private key for mTLS authentication (required if mTLS is enabled) | -| db_name | String | The name of the database to use (required) | -| collection_name | String | The name of the collection to use (required) | -| index_name | String | The name of the Atlas Search index, it should be a Vector Search (required) | -| insert_mode | String | How to insert new documents into the collection (options: "append", "overwrite", default: "append") | -| embedding | Embeddings | The embedding model to use | -| number_of_results | Integer | Number of results to return in similarity search (default: 4) | -| index_field | String | The field to index (default: "embedding") | -| filter_field | String | The field to filter the index | -| number_dimensions | Integer | Embedding context length (default: 1536) | -| similarity | String | The method used to measure similarity between vectors (options: "cosine", "euclidean", "dotProduct", default: "cosine") | -| quantization | String | Quantization reduces memory costs by converting 32-bit floats to smaller data types (options: "scalar", "binary") | +| mongodb_atlas_cluster_uri | SecretString | The connection URI for your MongoDB Atlas cluster. Required. | +| enable_mtls | Boolean | Enable mutual TLS authentication. Default: false. | +| mongodb_atlas_client_cert | SecretString | Client certificate combined with private key for mTLS authentication. Required if mTLS is enabled. | +| db_name | String | The name of the database to use. Required. | +| collection_name | String | The name of the collection to use. Required. | +| index_name | String | The name of the Atlas Search index, it should be a Vector Search. Required. | +| insert_mode | String | How to insert new documents into the collection. The options are "append" or "overwrite". Default: "append". | +| embedding | Embeddings | The embedding model to use. | +| number_of_results | Integer | Number of results to return in similarity search. Default: 4. | +| index_field | String | The field to index. Default: "embedding". | +| filter_field | String | The field to filter the index. | +| number_dimensions | Integer | Embedding context length. Default: 1536. | +| similarity | String | The method used to measure similarity between vectors. The options are "cosine", "euclidean", or "dotProduct". Default: "cosine". | +| quantization | String | Quantization reduces memory costs by converting 32-bit floats to smaller data types. The options are "scalar" or "binary". | -### Outputs +**Outputs** | Name | Type | Description | | ------------- | ---------------------- | ----------------------------------------- | -| vector_store | MongoDBAtlasVectorSearch| MongoDB Atlas vector store instance | -| search_results| List[Data] | Results of similarity search | +| vector_store | MongoDBAtlasVectorSearch| The MongoDB Atlas vector store instance. | +| search_results| List[Data] | The results of the similarity search as a list of [Data](/concepts-objects#data-object) objects. | + +
## Opensearch This component creates an Opensearch vector store with search capabilities For more information, see [Opensearch documentation](https://opensearch.org/platform/search/vector-database.html). -### Inputs +
+Parameters +**Inputs** | Name | Type | Description | |------------------------|--------------|------------------------------------------------------------------------------------------------------------------------| -| opensearch_url | String | URL for OpenSearch cluster (e.g. https://192.168.1.1:9200) | -| index_name | String | The index name where the vectors will be stored in OpenSearch cluster | -| search_input | String | Enter a search query. Leave empty to retrieve all documents or if hybrid search is being used | -| ingest_data | Data | Data to be ingested into the vector store | -| embedding | Embeddings | Embedding function to use | -| search_type | String | Valid values are "similarity", "similarity_score_threshold", "mmr" | -| number_of_results | Integer | Number of results to return in search | -| search_score_threshold | Float | Minimum similarity score threshold for search results | -| username | String | username for the opensource cluster | -| password | SecretString | password for the opensource cluster | -| use_ssl | Boolean | Use SSL | -| verify_certs | Boolean | Verify certificates | -| hybrid_search_query | String | Provide a custom hybrid search query in JSON format. This allows you to combine vector similarity and keyword matching | +| opensearch_url | String | URL for OpenSearch cluster, such as `https://192.168.1.1:9200`. | +| index_name | String | The index name where the vectors are stored in OpenSearch cluster. | +| search_input | String | Enter a search query. Leave empty to retrieve all documents or if hybrid search is being used. | +| ingest_data | Data | The data to be ingested into the vector store. | +| embedding | Embeddings | The embedding function to use. | +| search_type | String | The options are "similarity", "similarity_score_threshold", "mmr". | +| number_of_results | Integer | The number of results to return in search. | +| search_score_threshold | Float | The minimum similarity score threshold for search results. | +| username | String | The username for the opensource cluster. | +| password | SecretString | The password for the opensource cluster. | +| use_ssl | Boolean | Use SSL. | +| verify_certs | Boolean | Verify certificates. | +| hybrid_search_query | String | Provide a custom hybrid search query in JSON format. This allows you to combine vector similarity and keyword matching. | -### Outputs +**Outputs** | Name | Type | Description | | ------------- |------------------------|---------------------------------------------| | vector_store | OpenSearchVectorSearch | OpenSearch vector store instance | -| search_results| List[Data] | Results of similarity search | +| search_results| List[Data] | The results of the similarity search as a list of [Data](/concepts-objects#data-object) objects. | + +
## PGVector This component creates a PGVector Vector Store with search capabilities. For more information, see the [PGVector documentation](https://github.com/pgvector/pgvector). -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | | --------------- | ------------ | ----------------------------------------- | -| pg_server_url | SecretString | PostgreSQL server connection string | -| collection_name | String | Table name for the vector store | -| search_query | String | Query for similarity search | -| ingest_data | Data | Data to be ingested into the vector store | -| embedding | Embeddings | Embedding function to use | -| number_of_results | Integer | Number of results to return in search | +| pg_server_url | SecretString | The PostgreSQL server connection string. | +| collection_name | String | The table name for the vector store. | +| search_query | String | The query for similarity search. | +| ingest_data | Data | The data to be ingested into the vector store. | +| embedding | Embeddings | The embedding function to use. | +| number_of_results | Integer | The number of results to return in search. | -### Outputs +**Outputs** -| Name | Type | Description | -| ------------- | ----------- | ----------------------------------------- | -| vector_store | PGVector | PGVector vector store instance | -| search_results| List[Data] | Results of similarity search | +| Name | Display Name | Info | +|------|--------------|------| +| vector_store | Vector Store | The PGVector vector store instance configured with the specified parameters. | +| search_results | Search Results | The results of the similarity search as a list of [Data](/concepts-objects#data-object) objects. | +
## Pinecone This component creates a Pinecone Vector Store with search capabilities. For more information, see the [Pinecone documentation](https://docs.pinecone.io/home). -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | | ----------------- | ------------ | ----------------------------------------- | -| index_name | String | Name of the Pinecone index | -| namespace | String | Namespace for the index | -| distance_strategy | String | Strategy for calculating distance between vectors | -| pinecone_api_key | SecretString | API key for Pinecone | -| text_key | String | Key in the record to use as text | -| search_query | String | Query for similarity search | -| ingest_data | Data | Data to be ingested into the vector store | -| embedding | Embeddings | Embedding function to use | -| number_of_results | Integer | Number of results to return in search | +| index_name | String | The name of the Pinecone index. | +| namespace | String | The namespace for the index. | +| distance_strategy | String | The strategy for calculating distance between vectors. | +| pinecone_api_key | SecretString | The API key for Pinecone. | +| text_key | String | The key in the record to use as text. | +| search_query | String | The query for similarity search. | +| ingest_data | Data | The data to be ingested into the vector store. | +| embedding | Embeddings | The embedding function to use. | +| number_of_results | Integer | The number of results to return in search. | -### Outputs +**Outputs** -| Name | Type | Description | -| ------------- | ---------- | ----------------------------------------- | -| vector_store | Pinecone | Pinecone vector store instance | -| search_results| List[Data] | Results of similarity search | +| Name | Display Name | Info | +|------|--------------|------| +| vector_store | Vector Store | The Pinecone vector store instance configured with the specified parameters. | +| search_results | Search Results | The results of the similarity search as a list of [Data](/concepts-objects#data-object) objects. | +
## Qdrant This component creates a Qdrant Vector Store with search capabilities. For more information, see the [Qdrant documentation](https://qdrant.tech/documentation/). -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | | -------------------- | ------------ | ----------------------------------------- | -| collection_name | String | Name of the Qdrant collection | -| host | String | Qdrant server host | -| port | Integer | Qdrant server port | -| grpc_port | Integer | Qdrant gRPC port | -| api_key | SecretString | API key for Qdrant | -| prefix | String | Prefix for Qdrant | -| timeout | Integer | Timeout for Qdrant operations | -| path | String | Path for Qdrant | -| url | String | URL for Qdrant | -| distance_func | String | Distance function for vector similarity | -| content_payload_key | String | Key for content payload | -| metadata_payload_key | String | Key for metadata payload | -| search_query | String | Query for similarity search | -| ingest_data | Data | Data to be ingested into the vector store | -| embedding | Embeddings | Embedding function to use | -| number_of_results | Integer | Number of results to return in search | +| collection_name | String | The name of the Qdrant collection. | +| host | String | The Qdrant server host. | +| port | Integer | The Qdrant server port. | +| grpc_port | Integer | The Qdrant gRPC port. | +| api_key | SecretString | The API key for Qdrant. | +| prefix | String | The prefix for Qdrant. | +| timeout | Integer | The timeout for Qdrant operations. | +| path | String | The path for Qdrant. | +| url | String | The URL for Qdrant. | +| distance_func | String | The distance function for vector similarity. | +| content_payload_key | String | The content payload key. | +| metadata_payload_key | String | The metadata payload key. | +| search_query | String | The query for similarity search. | +| ingest_data | Data | The data to be ingested into the vector store. | +| embedding | Embeddings | The embedding function to use. | +| number_of_results | Integer | The number of results to return in search. | -### Outputs +**Outputs** | Name | Type | Description | | ------------- | -------- | ----------------------------------------- | -| vector_store | Qdrant | Qdrant vector store instance | -| search_results| List[Data] | Results of similarity search | +| vector_store | Qdrant | A Qdrant vector store instance. | +| search_results| List[Data] | The results of the similarity search as a list of [Data](/concepts-objects#data-object) objects. | +
## Redis This component creates a Redis Vector Store with search capabilities. For more information, see the [Redis documentation](https://redis.io/docs/latest/develop/interact/search-and-query/advanced-concepts/vectors/). -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | | ----------------- | ------------ | ----------------------------------------- | -| redis_server_url | SecretString | Redis server connection string | -| redis_index_name | String | Name of the Redis index | -| code | String | Custom code for Redis (advanced) | -| schema | String | Schema for Redis index | -| search_query | String | Query for similarity search | -| ingest_data | Data | Data to be ingested into the vector store | -| number_of_results | Integer | Number of results to return in search | -| embedding | Embeddings | Embedding function to use | +| redis_server_url | SecretString | The Redis server connection string. | +| redis_index_name | String | The name of the Redis index. | +| code | String | The custom code for Redis (advanced). | +| schema | String | The schema for Redis index. | +| search_query | String | The query for similarity search. | +| ingest_data | Data | The data to be ingested into the vector store. | +| number_of_results | Integer | The number of results to return in search. | +| embedding | Embeddings | The embedding function to use. | -### Outputs +**Outputs** | Name | Type | Description | | ------------- | -------- | ----------------------------------------- | | vector_store | Redis | Redis vector store instance | -| search_results| List[Data]| Results of similarity search | +| search_results| List[Data] | The results of the similarity search as a list of [Data](/concepts-objects#data-object) objects. | +
## Supabase This component creates a connection to a Supabase Vector Store with search capabilities. For more information, see the [Supabase documentation](https://supabase.com/docs/guides/ai). -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | | ------------------- | ------------ | ----------------------------------------- | -| supabase_url | String | URL of the Supabase instance | -| supabase_service_key| SecretString | Service key for Supabase authentication | -| table_name | String | Name of the table in Supabase | -| query_name | String | Name of the query to use | -| search_query | String | Query for similarity search | -| ingest_data | Data | Data to be ingested into the vector store | -| embedding | Embeddings | Embedding function to use | -| number_of_results | Integer | Number of results to return in search | +| supabase_url | String | The URL of the Supabase instance. | +| supabase_service_key| SecretString | The service key for Supabase authentication. | +| table_name | String | The name of the table in Supabase. | +| query_name | String | The name of the query to use. | +| search_query | String | The query for similarity search. | +| ingest_data | Data | The data to be ingested into the vector store. | +| embedding | Embeddings | The embedding function to use. | +| number_of_results | Integer | The number of results to return in search. | -### Outputs +**Outputs** | Name | Type | Description | | ------------- | ------------------ | ----------------------------------------- | -| vector_store | SupabaseVectorStore | Supabase vector store instance | -| search_results| List[Data] | Results of similarity search | +| vector_store | SupabaseVectorStore | A Supabase vector store instance. | +| search_results| List[Data] | The results of the similarity search as a list of [Data](/concepts-objects#data-object) objects. | +
## Upstash This component creates an Upstash Vector Store with search capabilities. For more information, see the [Upstash documentation](https://upstash.com/docs/introduction). -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | | --------------- | ------------ | ----------------------------------------- | -| index_url | String | The URL of the Upstash index | -| index_token | SecretString | The token for the Upstash index | -| text_key | String | The key in the record to use as text | -| namespace | String | Namespace for the index | -| search_query | String | Query for similarity search | -| metadata_filter | String | Filters documents by metadata | -| ingest_data | Data | Data to be ingested into the vector store | -| embedding | Embeddings | Embedding function to use (optional) | -| number_of_results | Integer | Number of results to return in search | +| index_url | String | The URL of the Upstash index. | +| index_token | SecretString | The token for the Upstash index. | +| text_key | String | The key in the record to use as text. | +| namespace | String | The namespace for the index. | +| search_query | String | The query for similarity search. | +| metadata_filter | String | Filter documents by metadata. | +| ingest_data | Data | The data to be ingested into the vector store. | +| embedding | Embeddings | The embedding function to use. | +| number_of_results | Integer | The number of results to return in search. | -### Outputs +**Outputs** | Name | Type | Description | | ------------- | ---------------- | ----------------------------------------- | -| vector_store | UpstashVectorStore| Upstash vector store instance | -| search_results| List[Data] | Results of similarity search | +| vector_store | UpstashVectorStore| An Upstash vector store instance. | +| search_results| List[Data] | The results of the similarity search as a list of [Data](/concepts-objects#data-object) objects. | +
## Vectara This component creates a Vectara Vector Store with search capabilities. For more information, see the [Vectara documentation](https://docs.vectara.com/docs/). -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | | ---------------- | ------------ | ----------------------------------------- | -| vectara_customer_id | String | Vectara customer ID | -| vectara_corpus_id | String | Vectara corpus ID | -| vectara_api_key | SecretString | Vectara API key | -| embedding | Embeddings | Embedding function to use (optional) | -| ingest_data | List[Document/Data] | Data to be ingested into the vector store | -| search_query | String | Query for similarity search | -| number_of_results | Integer | Number of results to return in search | +| vectara_customer_id | String | The Vectara customer ID. | +| vectara_corpus_id | String | The Vectara corpus ID. | +| vectara_api_key | SecretString | The Vectara API key. | +| embedding | Embeddings | The embedding function to use (optional). | +| ingest_data | List[Document/Data] | The data to be ingested into the vector store. | +| search_query | String | The query for similarity search. | +| number_of_results | Integer | The number of results to return in search. | -### Outputs +**Outputs** | Name | Type | Description | | ------------- | ----------------- | ----------------------------------------- | -| vector_store | VectaraVectorStore | Vectara vector store instance | -| search_results| List[Data] | Results of similarity search | +| vector_store | VectaraVectorStore | Vectara vector store instance. | +| search_results| List[Data] | The results of the similarity search as a list of [Data](/concepts-objects#data-object) objects. | + +
## Vectara Search This component searches a Vectara Vector Store for documents based on the provided input. For more information, see the [Vectara documentation](https://docs.vectara.com/docs/). -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |---------------------|--------------|-------------------------------------------| -| search_type | String | Type of search, such as "Similarity" or "MMR" | -| input_value | String | Search query | -| vectara_customer_id | String | Vectara customer ID | -| vectara_corpus_id | String | Vectara corpus ID | -| vectara_api_key | SecretString | Vectara API key | -| files_url | List[String] | Optional URLs for file initialization | +| search_type | String | The type of search, such as "Similarity" or "MMR". | +| input_value | String | The search query. | +| vectara_customer_id | String | The Vectara customer ID. | +| vectara_corpus_id | String | The Vectara corpus ID. | +| vectara_api_key | SecretString | The Vectara API key. | +| files_url | List[String] | Optional URLs for file initialization. | -### Outputs +**Outputs** | Name | Type | Description | |----------------|------------|----------------------------| -| search_results | List[Data] | Results of similarity search | +| search_results | List[Data] | The results of the similarity search as a list of [Data](/concepts-objects#data-object) objects. | + +
## Weaviate This component facilitates a Weaviate Vector Store setup, optimizing text and document indexing and retrieval. For more information, see the [Weaviate Documentation](https://weaviate.io/developers/weaviate). -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |---------------|--------------|-------------------------------------------| -| weaviate_url | String | Default instance URL | -| search_by_text| Boolean | Indicates whether to search by text | -| api_key | SecretString | Optional API key for authentication | -| index_name | String | Optional index name | -| text_key | String | Default text extraction key | -| input | Document | Document or record | -| embedding | Embeddings | Model used | -| attributes | List[String] | Optional additional attributes | +| weaviate_url | String | The default instance URL. | +| search_by_text| Boolean | Indicates whether to search by text. | +| api_key | SecretString | The optional API key for authentication. | +| index_name | String | The optional index name. | +| text_key | String | The default text extraction key. | +| input | Document | The document or record. | +| embedding | Embeddings | The embedding model used. | +| attributes | List[String] | Optional additional attributes. | -### Outputs +**Outputs** | Name | Type | Description | |--------------|------------------|-------------------------------| -| vector_store | WeaviateVectorStore | Weaviate vector store instance | +| vector_store | WeaviateVectorStore | The Weaviate vector store instance. | + +
## Weaviate Search This component searches a Weaviate Vector Store for documents similar to the input. For more information, see the [Weaviate Documentation](https://weaviate.io/developers/weaviate). -### Inputs +
+Parameters + +**Inputs** | Name | Type | Description | |---------------|--------------|-------------------------------------------| -| search_type | String | Type of search, such as "Similarity" or "MMR" | -| input_value | String | Search query | -| weaviate_url | String | Default instance URL | -| search_by_text| Boolean | Indicates whether to search by text | -| api_key | SecretString | Optional API key for authentication | -| index_name | String | Optional index name | -| text_key | String | Default text extraction key | -| embedding | Embeddings | Model used | -| attributes | List[String] | Optional additional attributes | +| search_type | String | The type of search, such as "Similarity" or "MMR" | +| input_value | String | The search query. | +| weaviate_url | String | The default instance URL. | +| search_by_text| Boolean | A boolean value that indicates whether to search by text. | +| api_key | SecretString | The optional API key for authentication. | +| index_name | String | The optional index name. | +| text_key | String | The default text extraction key. | +| embedding | Embeddings | The embeddings model used. | +| attributes | List[String] | Optional additional attributes. | -### Outputs +**Outputs** | Name | Type | Description | |----------------|------------|----------------------------| -| search_results | List[Data] | Results of similarity search | - - +| search_results | List[Data] | The results of the similarity search as a list of [Data](/concepts-objects#data-object) objects. | +
\ No newline at end of file diff --git a/docs/docs/Concepts/concepts-components.md b/docs/docs/Concepts/concepts-components.md index 5bcece261..109eb573d 100644 --- a/docs/docs/Concepts/concepts-components.md +++ b/docs/docs/Concepts/concepts-components.md @@ -221,4 +221,4 @@ The sidebar includes a component **Search** bar, and includes flags for showing **Beta** components are still being tested and are not suitable for production workloads. -**Legacy** components are available to use but no longer supported. +Legacy components are available for use but are no longer supported. \ No newline at end of file