From c88a134815cc7641beab990c5ff45425aeb15b5e Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Wed, 3 Apr 2024 18:58:56 -0300 Subject: [PATCH] Remove unused components and update imports --- docs/docs/components/wrappers.mdx | 20 ------- docs/docs/examples/how-upload-examples.mdx | 28 --------- .../docs/examples/midjourney-prompt-chain.mdx | 46 --------------- docs/docs/examples/multiple-vectorstores.mdx | 58 ------------------- docs/docs/guidelines/api.mdx | 2 +- docs/sidebars.js | 5 -- 6 files changed, 1 insertion(+), 158 deletions(-) delete mode 100644 docs/docs/components/wrappers.mdx delete mode 100644 docs/docs/examples/how-upload-examples.mdx delete mode 100644 docs/docs/examples/midjourney-prompt-chain.mdx delete mode 100644 docs/docs/examples/multiple-vectorstores.mdx diff --git a/docs/docs/components/wrappers.mdx b/docs/docs/components/wrappers.mdx deleted file mode 100644 index 4b1251b60..000000000 --- a/docs/docs/components/wrappers.mdx +++ /dev/null @@ -1,20 +0,0 @@ -import Admonition from '@theme/Admonition'; - -# Wrappers - - -

- 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! 🛠️📝 -

-
- - -### TextRequestsWrapper - -This component is designed to work with the Python Requests module, which is a popular tool for making web requests. Used to fetch data from a particular website. - -**Params** - -- **header:** specifies the headers to be included in the HTTP request. Defaults to `{'Authorization': 'Bearer '}`. - - Headers are key-value pairs that provide additional information about the request or the client making the request. They can be used to send authentication credentials, specify the content type of the request, set cookies, and more. They allow the client and the server to communicate additional information beyond the basic request. \ No newline at end of file diff --git a/docs/docs/examples/how-upload-examples.mdx b/docs/docs/examples/how-upload-examples.mdx deleted file mode 100644 index 4f54558eb..000000000 --- a/docs/docs/examples/how-upload-examples.mdx +++ /dev/null @@ -1,28 +0,0 @@ -import ThemedImage from "@theme/ThemedImage"; -import useBaseUrl from "@docusaurus/useBaseUrl"; -import ZoomableImage from "/src/theme/ZoomableImage.js"; - -# 📚 How to Upload Examples? - -We welcome all examples that can help our community learn and explore Langflow's capabilities. -Langflow Examples is a repository on [GitHub](https://github.com/logspace-ai/langflow_examples) that contains examples of flows that people can use for inspiration and learning. - -{" "} - - -To upload examples, please follow these steps: - -1. **Create a Flow:** First, create a flow using Langflow. You can use any of the available templates or create a new flow from scratch. - -2. **Export the Flow:** Once you have created a flow, export it as a JSON file. Make sure to give your file a descriptive name and include a brief description of what it does. - -3. **Submit a Pull Request:** Finally, submit a pull request (PR) to the examples repo. Make sure to include your JSON file in the PR. - -If your example uses any third-party libraries or packages, please include them in your PR and make sure that your example follows the [**⛓️ Langflow Code Of Conduct**](https://github.com/logspace-ai/langflow/blob/dev/CODE_OF_CONDUCT.md). diff --git a/docs/docs/examples/midjourney-prompt-chain.mdx b/docs/docs/examples/midjourney-prompt-chain.mdx deleted file mode 100644 index 9df732026..000000000 --- a/docs/docs/examples/midjourney-prompt-chain.mdx +++ /dev/null @@ -1,46 +0,0 @@ -import Admonition from "@theme/Admonition"; - -# MidJourney Prompt Chain - -The `MidJourneyPromptChain` can be used to generate imaginative and detailed MidJourney prompts. - -For example, type something like: - -```bash -Dragon -``` - -And get a response such as: - -```text -Imagine a mysterious forest, the trees are tall and ancient, their branches reaching up to the sky. Through the darkness, a dragon emerges from the shadows, its scales shimmering in the moonlight. Its wingspan is immense, and its eyes glow with a fierce intensity. It is a majestic and powerful creature, one that commands both respect and fear. -``` - - - Notice that the `ConversationSummaryMemory` stores a summary of the - conversation over time. Try using it to create better prompts as the - conversation goes on. - - -## ⛓️ Langflow Example - -import ThemedImage from "@theme/ThemedImage"; -import useBaseUrl from "@docusaurus/useBaseUrl"; -import ZoomableImage from "/src/theme/ZoomableImage.js"; - - - -#### Download Flow - - - -- [`OpenAI`](https://python.langchain.com/docs/modules/model_io/models/llms/integrations/openai) -- [`ConversationSummaryMemory`](https://python.langchain.com/docs/modules/memory/types/summary) - - diff --git a/docs/docs/examples/multiple-vectorstores.mdx b/docs/docs/examples/multiple-vectorstores.mdx deleted file mode 100644 index 2e554bbf1..000000000 --- a/docs/docs/examples/multiple-vectorstores.mdx +++ /dev/null @@ -1,58 +0,0 @@ -import Admonition from "@theme/Admonition"; - -# Multiple Vector Stores - -The example below shows an agent operating with two vector stores built upon different data sources. - -The `TextLoader` loads a TXT file, while the `WebBaseLoader` pulls text from webpages into a document format to accessed downstream. The `Chroma` vector stores are created analogous to what we have demonstrated in our [CSV Loader](/examples/csv-loader.mdx) example. Finally, the `VectorStoreRouterAgent` constructs an agent that routes between the vector stores. - - - Get the TXT file used - [here](https://github.com/hwchase17/chat-your-data/blob/master/state_of_the_union.txt). - - -URL used by the `WebBaseLoader`: - -```text -https://pt.wikipedia.org/wiki/Harry_Potter -``` - - - When you build the flow, request information about one of the sources. The - agent should be able to use the correct source to generate a response. - - - - Learn more about Multiple Vector Stores - [here](https://python.langchain.com/docs/modules/data_connection/vectorstores/). - - -## ⛓️ Langflow Example - -import ThemedImage from "@theme/ThemedImage"; -import useBaseUrl from "@docusaurus/useBaseUrl"; -import ZoomableImage from "/src/theme/ZoomableImage.js"; - - - -#### Download Flow - - - -- [`WebBaseLoader`](https://python.langchain.com/docs/integrations/document_loaders/web_base) -- [`TextLoader`](https://python.langchain.com/docs/modules/data_connection/document_loaders/) -- [`CharacterTextSplitter`](https://python.langchain.com/docs/modules/data_connection/document_transformers/text_splitters/character_text_splitter) -- [`OpenAIEmbedding`](https://python.langchain.com/docs/integrations/text_embedding/openai) -- [`Chroma`](https://python.langchain.com/docs/integrations/vectorstores/chroma) -- [`VectorStoreInfo`](https://python.langchain.com/docs/modules/data_connection/vectorstores/) -- [`OpenAI`](https://python.langchain.com/docs/modules/model_io/models/llms/integrations/openai) -- [`VectorStoreRouterToolkit`](https://js.langchain.com/docs/modules/agents/tools/how_to/agents_with_vectorstores) -- [`VectorStoreRouterAgent`](https://js.langchain.com/docs/modules/agents/tools/how_to/agents_with_vectorstores) - - diff --git a/docs/docs/guidelines/api.mdx b/docs/docs/guidelines/api.mdx index 6ba2c3a72..25dbeb31e 100644 --- a/docs/docs/guidelines/api.mdx +++ b/docs/docs/guidelines/api.mdx @@ -1,6 +1,6 @@ import useBaseUrl from "@docusaurus/useBaseUrl"; import ZoomableImage from "/src/theme/ZoomableImage.js"; -import Admonition from "/src/theme/Admonition.js"; +import Admonition from "@theme/Admonition"; # API Keys diff --git a/docs/sidebars.js b/docs/sidebars.js index 07af44af3..7b2a4b956 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -112,8 +112,6 @@ module.exports = { "components/text-splitters", "components/toolkits", "components/tools", - "components/wrappers", - // "components/prompts", ], }, { @@ -124,13 +122,10 @@ module.exports = { "examples/flow-runner", "examples/conversation-chain", "examples/buffer-memory", - "examples/midjourney-prompt-chain", "examples/csv-loader", "examples/searchapi-tool", "examples/serp-api-tool", - "examples/multiple-vectorstores", "examples/python-function", - "examples/how-upload-examples", ], }, {