From 2c819dc0a4b5d8a41091acf2c39f59c2bba7d686 Mon Sep 17 00:00:00 2001 From: Mendon Kissling <59585235+mendonk@users.noreply.github.com> Date: Mon, 23 Dec 2024 09:53:37 -0500 Subject: [PATCH] Docs: refactor starter flows (#5384) * refactor: Update documentation links and restructure starter projects to use cases * feat: Add new redirects for use cases in Docusaurus configuration * lint * force-menu-collapse * change-usecase-to-tutorial --- docs/docs/Components/components-prompts.md | 2 +- docs/docs/Get-Started/welcome-to-langflow.md | 6 ++--- docs/docs/Guides/guides-chat-memory.md | 4 +-- docs/docs/Starter-Projects/_category_.json | 1 - .../tutorials-blog-writer.md} | 2 +- .../tutorials-document-qa.md} | 2 +- .../tutorials-memory-chatbot.md} | 2 +- .../tutorials-sequential-agent.md} | 2 +- .../tutorials-travel-planning-agent.md} | 2 +- docs/docusaurus.config.js | 25 ++++++++++++++++--- docs/sidebars.js | 18 ++++++++----- 11 files changed, 45 insertions(+), 21 deletions(-) delete mode 100644 docs/docs/Starter-Projects/_category_.json rename docs/docs/{Starter-Projects/starter-projects-blog-writer.md => Tutorials/tutorials-blog-writer.md} (98%) rename docs/docs/{Starter-Projects/starter-projects-document-qa.md => Tutorials/tutorials-document-qa.md} (97%) rename docs/docs/{Starter-Projects/starter-projects-memory-chatbot.md => Tutorials/tutorials-memory-chatbot.md} (98%) rename docs/docs/{Starter-Projects/starter-projects-sequential-agent.md => Tutorials/tutorials-sequential-agent.md} (98%) rename docs/docs/{Starter-Projects/starter-projects-travel-planning-agent.md => Tutorials/tutorials-travel-planning-agent.md} (98%) diff --git a/docs/docs/Components/components-prompts.md b/docs/docs/Components/components-prompts.md index 57ecf2d3e..f2a2f1c01 100644 --- a/docs/docs/Components/components-prompts.md +++ b/docs/docs/Components/components-prompts.md @@ -31,7 +31,7 @@ Answer the question {user_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](/starter-projects-sequential-agent). +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](/tutorials-sequential-agent). ### Inputs diff --git a/docs/docs/Get-Started/welcome-to-langflow.md b/docs/docs/Get-Started/welcome-to-langflow.md index 2a8a658dd..c5a2018ec 100644 --- a/docs/docs/Get-Started/welcome-to-langflow.md +++ b/docs/docs/Get-Started/welcome-to-langflow.md @@ -20,9 +20,9 @@ Langflow is an intuitive visual flow builder. This drag-and-drop interface allow Langflow can be used for a wide range of AI applications, including: -* [Craft intelligent chatbots](/starter-projects-memory-chatbot) -* [Build document analysis systems](/starter-projects-document-qa) -* [Generate compelling content](/starter-projects-blog-writer) +* [Craft intelligent chatbots](/tutorials-memory-chatbot) +* [Build document analysis systems](/tutorials-document-qa) +* [Generate compelling content](/tutorials-blog-writer) * [Orchestrate multi-agent applications](/starter-projects-simple-agent) ## Community and support diff --git a/docs/docs/Guides/guides-chat-memory.md b/docs/docs/Guides/guides-chat-memory.md index a62fac9fb..71fa1ab6f 100644 --- a/docs/docs/Guides/guides-chat-memory.md +++ b/docs/docs/Guides/guides-chat-memory.md @@ -15,7 +15,7 @@ In any project, as long as there are [**Chat**](/components-io) being used, memo To see and access this history of messages, Langflow features a component called [Message history](/components-helpers#memory-history). It retrieves previous messages and outputs them in structured format or parsed. -To learn the basics about memory in Langflow, check out the [Memory Chatbot](/starter-projects-memory-chatbot) starter example. +To learn the basics about memory in Langflow, check out the [Memory Chatbot](/tutorials-memory-chatbot) starter example. Memories can be visualized and managed directly from the **Playground**. You can edit and remove previous messages to inspect and validate the AI’s response behavior. You can remove or edit previous messages to get your models acting just right. @@ -72,7 +72,7 @@ This example stores and retrieves chat history from an [AstraDBChatMemory](/comp ### Connect the chat memory component to an external database -1. Load the [Memory Chatbot](/starter-projects-memory-chatbot) starter project. +1. Load the [Memory Chatbot](/tutorials-memory-chatbot) starter project. This starter project extends the basic prompting flow to include a chat memory component. 2. Add the [Store Message](/components-helpers#store-message) component to the flow. The **Store message** component stores messages in the external database. diff --git a/docs/docs/Starter-Projects/_category_.json b/docs/docs/Starter-Projects/_category_.json deleted file mode 100644 index f780f2a63..000000000 --- a/docs/docs/Starter-Projects/_category_.json +++ /dev/null @@ -1 +0,0 @@ -{"position":2, "label":"Starter Projects"} \ No newline at end of file diff --git a/docs/docs/Starter-Projects/starter-projects-blog-writer.md b/docs/docs/Tutorials/tutorials-blog-writer.md similarity index 98% rename from docs/docs/Starter-Projects/starter-projects-blog-writer.md rename to docs/docs/Tutorials/tutorials-blog-writer.md index 212ddaa2a..ba72c4a15 100644 --- a/docs/docs/Starter-Projects/starter-projects-blog-writer.md +++ b/docs/docs/Tutorials/tutorials-blog-writer.md @@ -1,7 +1,7 @@ --- title: Blog Writer sidebar_position: 1 -slug: /starter-projects-blog-writer +slug: /tutorials-blog-writer --- Build a Blog Writer flow for a one-shot application using OpenAI. diff --git a/docs/docs/Starter-Projects/starter-projects-document-qa.md b/docs/docs/Tutorials/tutorials-document-qa.md similarity index 97% rename from docs/docs/Starter-Projects/starter-projects-document-qa.md rename to docs/docs/Tutorials/tutorials-document-qa.md index 1bf821628..9182c2e0c 100644 --- a/docs/docs/Starter-Projects/starter-projects-document-qa.md +++ b/docs/docs/Tutorials/tutorials-document-qa.md @@ -1,7 +1,7 @@ --- title: Document QA sidebar_position: 2 -slug: /starter-projects-document-qa +slug: /tutorials-document-qa --- diff --git a/docs/docs/Starter-Projects/starter-projects-memory-chatbot.md b/docs/docs/Tutorials/tutorials-memory-chatbot.md similarity index 98% rename from docs/docs/Starter-Projects/starter-projects-memory-chatbot.md rename to docs/docs/Tutorials/tutorials-memory-chatbot.md index efd1bdbb6..4ff0113b0 100644 --- a/docs/docs/Starter-Projects/starter-projects-memory-chatbot.md +++ b/docs/docs/Tutorials/tutorials-memory-chatbot.md @@ -1,7 +1,7 @@ --- title: Memory Chatbot sidebar_position: 3 -slug: /starter-projects-memory-chatbot +slug: /tutorials-memory-chatbot --- diff --git a/docs/docs/Starter-Projects/starter-projects-sequential-agent.md b/docs/docs/Tutorials/tutorials-sequential-agent.md similarity index 98% rename from docs/docs/Starter-Projects/starter-projects-sequential-agent.md rename to docs/docs/Tutorials/tutorials-sequential-agent.md index 7060f02a9..daafc0008 100644 --- a/docs/docs/Starter-Projects/starter-projects-sequential-agent.md +++ b/docs/docs/Tutorials/tutorials-sequential-agent.md @@ -1,7 +1,7 @@ --- title: Sequential tasks agent sidebar_position: 4 -slug: /starter-projects-sequential-agent +slug: /tutorials-sequential-agent --- Build a **Sequential Tasks Agent** flow for a multi-agent application using multiple **Agent** components. diff --git a/docs/docs/Starter-Projects/starter-projects-travel-planning-agent.md b/docs/docs/Tutorials/tutorials-travel-planning-agent.md similarity index 98% rename from docs/docs/Starter-Projects/starter-projects-travel-planning-agent.md rename to docs/docs/Tutorials/tutorials-travel-planning-agent.md index c34704d06..75045eb40 100644 --- a/docs/docs/Starter-Projects/starter-projects-travel-planning-agent.md +++ b/docs/docs/Tutorials/tutorials-travel-planning-agent.md @@ -1,7 +1,7 @@ --- title: Travel planning agent sidebar_position: 8 -slug: /starter-projects-travel-planning-agent +slug: /tutorials-travel-planning-agent --- Build a **Travel Planning Agent** flow for an agentic application using the multiple Tool-calling agents. diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index a20004279..75ee52bc6 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -39,7 +39,7 @@ const config = { docs: { routeBasePath: "/", // Serve the docs at the site's root sidebarPath: require.resolve("./sidebars.js"), // Use sidebars.js file - sidebarCollapsed: false, + sidebarCollapsed: true, beforeDefaultRemarkPlugins: [ [ remarkCodeHike, @@ -107,8 +107,11 @@ const config = { from: "/getting-started-quickstart", }, { - to: "/starter-projects-travel-planning-agent", - from: "/starter-projects-dynamic-agent/", + to: "/tutorials-travel-planning-agent", + from: [ + "/starter-projects-dynamic-agent/", + "/starter-projects-travel-planning-agent", + ], }, { to: "/workspace-overview", @@ -127,6 +130,22 @@ const config = { to: "/configuration-global-variables", from: "/settings-global-variables", }, + { + to: "/tutorials-sequential-agent", + from: "/starter-projects-sequential-agent", + }, + { + to: "/tutorials-blog-writer", + from: "/starter-projects-blog-writer", + }, + { + to: "/tutorials-memory-chatbot", + from: "/starter-projects-memory-chatbot", + }, + { + to: "/tutorials-document-qa", + from: "/starter-projects-document-qa", + }, { to: "/components-vector-stores", from: "/components-rag", diff --git a/docs/sidebars.js b/docs/sidebars.js index 7eca0c594..c2efd4b86 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -14,13 +14,19 @@ module.exports = { label: "Starter Projects", items: [ 'Starter-Projects/starter-projects-basic-prompting', - 'Starter-Projects/starter-projects-blog-writer', - 'Starter-Projects/starter-projects-document-qa', - 'Starter-Projects/starter-projects-memory-chatbot', - 'Starter-Projects/starter-projects-simple-agent', 'Starter-Projects/starter-projects-vector-store-rag', - 'Starter-Projects/starter-projects-sequential-agent', - 'Starter-Projects/starter-projects-travel-planning-agent', + 'Starter-Projects/starter-projects-simple-agent', + ], + }, + { + type: "category", + label: "Tutorials", + items: [ + 'Tutorials/tutorials-blog-writer', + 'Tutorials/tutorials-document-qa', + 'Tutorials/tutorials-memory-chatbot', + 'Tutorials/tutorials-sequential-agent', + 'Tutorials/tutorials-travel-planning-agent', ], }, {