* inputs * agents * chains * custom-component * align-admonitions-in-custom * data-and-embeddings * experimental * helpers * memories * model_specs * outputs * prompts * retrievers * textsplitter * tools * utilities * vector-stores
92 lines
3 KiB
Text
92 lines
3 KiB
Text
import Admonition from "@theme/Admonition";
|
|
|
|
# Utilities
|
|
|
|
<Admonition type="caution" icon="🚧" title="Zone Under Construction">
|
|
We appreciate your understanding as we polish our documentation—it may
|
|
contain some rough edges. Share your feedback or report issues to help us
|
|
improve! 🛠️📝
|
|
</Admonition>
|
|
|
|
Utilities are a set of actions that can be used to perform common tasks in a flow. They are available in the **Utilities** section in the sidebar.
|
|
|
|
---
|
|
|
|
### GET request
|
|
|
|
Make a GET request to the specified URL.
|
|
|
|
**Parameters**
|
|
|
|
- **URL:** The URL to make the request to. If there are multiple URLs, the request will be made to each URL in order.
|
|
- **Headers:** A dictionary of headers to send with the request.
|
|
|
|
**Output**
|
|
|
|
- **List of documents:** A list of documents containing the JSON response from each request.
|
|
|
|
---
|
|
|
|
### POST request
|
|
|
|
Make a POST request to the specified URL.
|
|
|
|
**Parameters**
|
|
|
|
- **URL:** The URL to make the request to.
|
|
- **Headers:** A dictionary of headers to send with the request.
|
|
- **Document:** The document containing a JSON object to send with the request.
|
|
|
|
**Output**
|
|
|
|
- **Document:** The JSON response from the request as a document.
|
|
|
|
---
|
|
|
|
### Update request
|
|
|
|
Make a PATCH or PUT request to the specified URL.
|
|
|
|
**Parameters**
|
|
|
|
- **URL:** The URL to make the request to.
|
|
- **Headers:** A dictionary of headers to send with the request.
|
|
- **Document:** The document containing a JSON object to send with the request.
|
|
- **Method:** The HTTP method to use for the request, either `PATCH` or `PUT`.
|
|
|
|
**Output**
|
|
|
|
- **Document:** The JSON response from the request as a document.
|
|
|
|
---
|
|
|
|
### JSON document builder
|
|
|
|
Build a document containing a JSON object using a key and another document page content.
|
|
|
|
**Parameters**
|
|
|
|
- **Key:** The key to use for the JSON object.
|
|
- **Document:** The document page to use for the JSON object.
|
|
|
|
**Output**
|
|
|
|
- **List of documents:** A list containing the document with the JSON object.
|
|
|
|
## Unique ID generator
|
|
|
|
Generates a unique identifier (UUID) for each instance it is invoked, providing a distinct and reliable identifier suitable for a variety of applications.
|
|
|
|
**Parameters**
|
|
|
|
- **Value:** This field displays the generated unique identifier (UUID). The UUID is dynamically generated for each instance of the component, ensuring uniqueness across different uses.
|
|
|
|
**Output**
|
|
|
|
- Returns a unique identifier (UUID) as a string. This UUID is generated using Python's `uuid` module, ensuring that each identifier is unique and can be used as a reliable reference in your application.
|
|
|
|
<Admonition type="note" title="Note">
|
|
The Unique ID Generator is crucial for scenarios requiring distinct identifiers, such as session management, transaction tracking, or any context where different instances or entities must be uniquely identified. The generated UUID is provided as a hexadecimal string, offering a high level of uniqueness and security for identification purposes.
|
|
</Admonition>
|
|
|
|
For additional information and examples, please consult the [Langflow Components Custom Documentation](http://docs.langflow.org/components/custom).
|