From cc70a115725e674c169e49282cc8767bda3166b3 Mon Sep 17 00:00:00 2001 From: Mendon Kissling <59585235+mendonk@users.noreply.github.com> Date: Tue, 30 Apr 2024 08:28:59 -0400 Subject: [PATCH] [Docs] - Refactor folders and leftnav (#1781) * refactor-leftnav * bump-whats-new * comment-out-some-tutorials * links * guidelines * comma * starter-projects * try-links * add-new-component-location --- .../{guidelines => administration}/api.mdx | 0 .../chat-interface.mdx | 0 .../chat-widget.mdx | 0 .../cli.mdx | 0 .../collection.mdx | 0 .../components.mdx | 0 .../custom-component.mdx | 0 .../features.mdx | 0 .../langfuse_integration.mdx | 0 .../{guidelines => administration}/login.mdx | 0 .../prompt-customization.mdx | 0 docs/docs/components/custom.mdx | 4 +- docs/docs/components/prompts.mdx | 2 +- docs/docs/examples/flow-runner.mdx | 4 +- docs/docs/getting-started/quickstart.mdx | 6 +- docs/docs/index.mdx | 2 +- .../migrating-to-one-point-zero.mdx | 0 .../basic-prompting.mdx | 0 .../blog-writer.mdx | 0 .../document-qa.mdx | 0 .../memory-chatbot.mdx | 0 .../chatprompttemplate_guide.mdx | 0 .../loading_document.mdx | 0 .../rag-with-astradb.mdx | 0 .../docs/whats-new/a-new-chapter-langflow.mdx | 10 +- docs/sidebars.js | 151 ++++++++---------- src/backend/base/langflow/config.yaml | 1 + 27 files changed, 83 insertions(+), 97 deletions(-) rename docs/docs/{guidelines => administration}/api.mdx (100%) rename docs/docs/{guidelines => administration}/chat-interface.mdx (100%) rename docs/docs/{guidelines => administration}/chat-widget.mdx (100%) rename docs/docs/{getting-started => administration}/cli.mdx (100%) rename docs/docs/{guidelines => administration}/collection.mdx (100%) rename docs/docs/{guidelines => administration}/components.mdx (100%) rename docs/docs/{guidelines => administration}/custom-component.mdx (100%) rename docs/docs/{guidelines => administration}/features.mdx (100%) rename docs/docs/{guides => administration}/langfuse_integration.mdx (100%) rename docs/docs/{guidelines => administration}/login.mdx (100%) rename docs/docs/{guidelines => administration}/prompt-customization.mdx (100%) rename docs/docs/{whats-new => migration}/migrating-to-one-point-zero.mdx (100%) rename docs/docs/{guides => starter-projects}/basic-prompting.mdx (100%) rename docs/docs/{guides => starter-projects}/blog-writer.mdx (100%) rename docs/docs/{guides => starter-projects}/document-qa.mdx (100%) rename docs/docs/{guides => starter-projects}/memory-chatbot.mdx (100%) rename docs/docs/{guides => tutorials}/chatprompttemplate_guide.mdx (100%) rename docs/docs/{guides => tutorials}/loading_document.mdx (100%) rename docs/docs/{guides => tutorials}/rag-with-astradb.mdx (100%) diff --git a/docs/docs/guidelines/api.mdx b/docs/docs/administration/api.mdx similarity index 100% rename from docs/docs/guidelines/api.mdx rename to docs/docs/administration/api.mdx diff --git a/docs/docs/guidelines/chat-interface.mdx b/docs/docs/administration/chat-interface.mdx similarity index 100% rename from docs/docs/guidelines/chat-interface.mdx rename to docs/docs/administration/chat-interface.mdx diff --git a/docs/docs/guidelines/chat-widget.mdx b/docs/docs/administration/chat-widget.mdx similarity index 100% rename from docs/docs/guidelines/chat-widget.mdx rename to docs/docs/administration/chat-widget.mdx diff --git a/docs/docs/getting-started/cli.mdx b/docs/docs/administration/cli.mdx similarity index 100% rename from docs/docs/getting-started/cli.mdx rename to docs/docs/administration/cli.mdx diff --git a/docs/docs/guidelines/collection.mdx b/docs/docs/administration/collection.mdx similarity index 100% rename from docs/docs/guidelines/collection.mdx rename to docs/docs/administration/collection.mdx diff --git a/docs/docs/guidelines/components.mdx b/docs/docs/administration/components.mdx similarity index 100% rename from docs/docs/guidelines/components.mdx rename to docs/docs/administration/components.mdx diff --git a/docs/docs/guidelines/custom-component.mdx b/docs/docs/administration/custom-component.mdx similarity index 100% rename from docs/docs/guidelines/custom-component.mdx rename to docs/docs/administration/custom-component.mdx diff --git a/docs/docs/guidelines/features.mdx b/docs/docs/administration/features.mdx similarity index 100% rename from docs/docs/guidelines/features.mdx rename to docs/docs/administration/features.mdx diff --git a/docs/docs/guides/langfuse_integration.mdx b/docs/docs/administration/langfuse_integration.mdx similarity index 100% rename from docs/docs/guides/langfuse_integration.mdx rename to docs/docs/administration/langfuse_integration.mdx diff --git a/docs/docs/guidelines/login.mdx b/docs/docs/administration/login.mdx similarity index 100% rename from docs/docs/guidelines/login.mdx rename to docs/docs/administration/login.mdx diff --git a/docs/docs/guidelines/prompt-customization.mdx b/docs/docs/administration/prompt-customization.mdx similarity index 100% rename from docs/docs/guidelines/prompt-customization.mdx rename to docs/docs/administration/prompt-customization.mdx diff --git a/docs/docs/components/custom.mdx b/docs/docs/components/custom.mdx index bdf631314..babc4cd42 100644 --- a/docs/docs/components/custom.mdx +++ b/docs/docs/components/custom.mdx @@ -12,7 +12,7 @@ To use a custom component, follow these steps: -For an in-depth explanation of custom components, their rules, and applications, make sure to read [Custom Component guidelines](../guidelines/custom-component). +For an in-depth explanation of custom components, their rules, and applications, make sure to read [Custom Component guidelines](../administration/custom-component). @@ -57,7 +57,7 @@ The CustomComponent class serves as the foundation for creating custom component Unlike Langchain types, base Python types do not add a - [handle](../guidelines/components) to the field by default. To add handles, + [handle](../administration/components) to the field by default. To add handles, use the _`input_types`_ key in the _`build_config`_ method. diff --git a/docs/docs/components/prompts.mdx b/docs/docs/components/prompts.mdx index 0b1ad705c..fdbc475e4 100644 --- a/docs/docs/components/prompts.mdx +++ b/docs/docs/components/prompts.mdx @@ -21,7 +21,7 @@ The `PromptTemplate` component allows users to create prompts and define variabl Once a variable is defined in the prompt template, it becomes a component input of its own. Check out [Prompt - Customization](../guidelines/prompt-customization) to learn more. + Customization](../administration/prompt-customization) to learn more. - **template:** Template used to format an individual request. diff --git a/docs/docs/examples/flow-runner.mdx b/docs/docs/examples/flow-runner.mdx index 8a07adb0a..fda7a8d39 100644 --- a/docs/docs/examples/flow-runner.mdx +++ b/docs/docs/examples/flow-runner.mdx @@ -159,7 +159,7 @@ Now, let's add the [parameters](focus://11[20:55]) and the [return type](focus:/ - _`flow_name`_ is the name of the flow we want to run. - _`document`_ is the input document to be passed to that flow. - - Since _`Document`_ is a Langchain type, it will add an input [handle](../guidelines/components) to the component ([see more](../components/custom)). + - Since _`Document`_ is a Langchain type, it will add an input [handle](../administration/components) to the component ([see more](../components/custom)). --- @@ -242,7 +242,7 @@ class FlowRunner(CustomComponent): ``` -You can load this flow using _`get_flow`_ and set a _`tweaks`_ dictionary to customize it. Find more about tweaks in our [features guidelines](../guidelines/features#code). +You can load this flow using _`get_flow`_ and set a _`tweaks`_ dictionary to customize it. Find more about tweaks in our [features guidelines](../administration/features#code). --- diff --git a/docs/docs/getting-started/quickstart.mdx b/docs/docs/getting-started/quickstart.mdx index 1caf71077..33de2e0d7 100644 --- a/docs/docs/getting-started/quickstart.mdx +++ b/docs/docs/getting-started/quickstart.mdx @@ -112,8 +112,8 @@ Well done! You've built your first prompt in Langflow. 🎉 By adding Langflow components to this prompt, you can build all sorts of interesting flows. -* [Memory chatbot](/guides/memory-chatbot.mdx) -* [Blog writer](/guides/blog-writer.mdx) -* [Document QA](/guides/document-qa.mdx) +* [Memory chatbot](/starter-projects/memory-chatbot.mdx) +* [Blog writer](/starter-projects/blog-writer.mdx) +* [Document QA](/starter-projects/document-qa.mdx) diff --git a/docs/docs/index.mdx b/docs/docs/index.mdx index 1310e5ae6..8652999e9 100644 --- a/docs/docs/index.mdx +++ b/docs/docs/index.mdx @@ -35,4 +35,4 @@ Use Langflow's simple but powerful UI to build any AI application you can dream Learn more about the exciting changes in Langflow 1.0, and how to migrate your existing Langflow projects. * [A new chapter for Langflow](/whats-new/a-new-chapter-langflow) -* [Migration guides](/whats-new/migrating-to-one-point-zero) \ No newline at end of file +* [Migration guides](/migration/migrating-to-one-point-zero) \ No newline at end of file diff --git a/docs/docs/whats-new/migrating-to-one-point-zero.mdx b/docs/docs/migration/migrating-to-one-point-zero.mdx similarity index 100% rename from docs/docs/whats-new/migrating-to-one-point-zero.mdx rename to docs/docs/migration/migrating-to-one-point-zero.mdx diff --git a/docs/docs/guides/basic-prompting.mdx b/docs/docs/starter-projects/basic-prompting.mdx similarity index 100% rename from docs/docs/guides/basic-prompting.mdx rename to docs/docs/starter-projects/basic-prompting.mdx diff --git a/docs/docs/guides/blog-writer.mdx b/docs/docs/starter-projects/blog-writer.mdx similarity index 100% rename from docs/docs/guides/blog-writer.mdx rename to docs/docs/starter-projects/blog-writer.mdx diff --git a/docs/docs/guides/document-qa.mdx b/docs/docs/starter-projects/document-qa.mdx similarity index 100% rename from docs/docs/guides/document-qa.mdx rename to docs/docs/starter-projects/document-qa.mdx diff --git a/docs/docs/guides/memory-chatbot.mdx b/docs/docs/starter-projects/memory-chatbot.mdx similarity index 100% rename from docs/docs/guides/memory-chatbot.mdx rename to docs/docs/starter-projects/memory-chatbot.mdx diff --git a/docs/docs/guides/chatprompttemplate_guide.mdx b/docs/docs/tutorials/chatprompttemplate_guide.mdx similarity index 100% rename from docs/docs/guides/chatprompttemplate_guide.mdx rename to docs/docs/tutorials/chatprompttemplate_guide.mdx diff --git a/docs/docs/guides/loading_document.mdx b/docs/docs/tutorials/loading_document.mdx similarity index 100% rename from docs/docs/guides/loading_document.mdx rename to docs/docs/tutorials/loading_document.mdx diff --git a/docs/docs/guides/rag-with-astradb.mdx b/docs/docs/tutorials/rag-with-astradb.mdx similarity index 100% rename from docs/docs/guides/rag-with-astradb.mdx rename to docs/docs/tutorials/rag-with-astradb.mdx diff --git a/docs/docs/whats-new/a-new-chapter-langflow.mdx b/docs/docs/whats-new/a-new-chapter-langflow.mdx index bc3e498ba..575d3adc4 100644 --- a/docs/docs/whats-new/a-new-chapter-langflow.mdx +++ b/docs/docs/whats-new/a-new-chapter-langflow.mdx @@ -61,11 +61,11 @@ We wanted to create start projects that would help you learn about new features For now, we have: -- **[Basic Prompting (Hello, World)](/guides/basic-prompting)**: A simple flow that shows you how to use the Prompt Component and how to talk like a pirate. -- **[Vector Store RAG](/guides/rag-with-astradb)**: A flow that shows you how to ingest data into a Vector Store and then use it to run a RAG application. -- **[Memory Chatbot](/guides/memory-chatbot)**: This one shows you how to create a simple chatbot that can remember things about the user. -- **[Document QA](/guides/document-qa)**: This flow shows you how to build a simple flow that helps you get answers about a document. -- **[Blog Writer](/guides/blog-writer)**: Shows you how you can expand on the Prompt variables and be creative about what inputs you add to it. +- **[Basic Prompting (Hello, World)](/starter-projects/basic-prompting)**: A simple flow that shows you how to use the Prompt Component and how to talk like a pirate. +- **[Vector Store RAG](/tutorials/rag-with-astradb)**: A flow that shows you how to ingest data into a Vector Store and then use it to run a RAG application. +- **[Memory Chatbot](/starter-projects/memory-chatbot)**: This one shows you how to create a simple chatbot that can remember things about the user. +- **[Document QA](/starter-projects/document-qa)**: This flow shows you how to build a simple flow that helps you get answers about a document. +- **[Blog Writer](/starter-projects/blog-writer)**: Shows you how you can expand on the Prompt variables and be creative about what inputs you add to it. As always, your feedback is invaluable, so please let us know what you think of the new starter projects and what you would like to see in the future. diff --git a/docs/sidebars.js b/docs/sidebars.js index be7cc3e3a..a8a673610 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -2,88 +2,49 @@ module.exports = { docs: [ { type: "category", - label: " Getting Started", + label: "What's New?", + collapsed: false, + items: [ + "whats-new/a-new-chapter-langflow" + ], + }, + { + type: "category", + label: "Getting Started", collapsed: false, items: [ "index", "getting-started/install-langflow", "getting-started/quickstart", "getting-started/huggingface-spaces", - "getting-started/new-to-llms", + "getting-started/new-to-llms" ], }, - { type: "category", - label: " Starter Projects", + label: "Starter Projects", collapsed: false, items: [ - "guides/basic-prompting", - "guides/blog-writer", - "guides/document-qa", - "guides/memory-chatbot", - "guides/rag-with-astradb", + "starter-projects/basic-prompting", + "starter-projects/blog-writer", + "starter-projects/document-qa", + "starter-projects/memory-chatbot" ], }, - { type: "category", - label: " What's New", + label: "Administration", collapsed: false, items: [ - "whats-new/a-new-chapter-langflow", - "whats-new/migrating-to-one-point-zero", + "administration/login", + "administration/api", + "administration/cli", + "administration/components", + "administration/collection", + "administration/prompt-customization", + "administration/langfuse_integration" ], }, - - { - type: "category", - label: " Migration Guides", - collapsed: false, - items: [ - "migration/possible-installation-issues", - // "migration/flow-of-data", - "migration/inputs-and-outputs", - // "migration/supported-frameworks", - // "migration/sidebar-and-interaction-panel", - // "migration/new-categories-and-components", - "migration/text-and-record", - // "migration/custom-component", - "migration/compatibility", - // "migration/multiple-flows", - // "migration/component-status-and-data-passing", - // "migration/connecting-output-components", - // "migration/renaming-and-editing-components", - // "migration/passing-tweaks-and-inputs", - "migration/global-variables", - // "migration/experimental-components", - // "migration/state-management", - //"guides/rag-with-astradb", - ], - }, - { - type: "category", - label: "Guidelines", - collapsed: false, - items: [ - "getting-started/cli", - "guidelines/login", - "guidelines/api", - "guidelines/components", - // "guidelines/features", - "guidelines/collection", - "guidelines/prompt-customization", - // "guidelines/chat-interface", - // "guidelines/chat-widget", - // "guidelines/custom-component", - ], - }, - { - type: "category", - label: "Extended Components", - collapsed: false, - items: ["guides/langfuse_integration"], - }, { type: "category", label: "Core Components", @@ -96,45 +57,69 @@ module.exports = { "components/helpers", "components/vector-stores", "components/embeddings", + "components/custom" ], }, { type: "category", label: "Extended Components", - collapsed: false, + collapsed: true, items: [ "components/agents", "components/chains", - "components/loaders", "components/experimental", "components/utilities", - "components/memories", "components/model_specs", "components/retrievers", "components/text-splitters", "components/toolkits", - "components/tools", + "components/tools" + ], + }, + { + type: "category", + label: "Example Components", + collapsed: true, + items: [ + "examples/flow-runner", + "examples/conversation-chain", + "examples/buffer-memory", + "examples/csv-loader", + "examples/searchapi-tool", + "examples/serp-api-tool", + "examples/python-function" + ], + }, + { + type: "category", + label: "Migration Guides", + collapsed: false, + items: [ + "migration/possible-installation-issues", + "migration/migrating-to-one-point-zero", + "migration/inputs-and-outputs", + "migration/text-and-record", + "migration/compatibility", + "migration/global-variables" + ] + }, + { + type: "category", + label: "Tutorials", + collapsed: true, + items: [ + "tutorials/chatprompttemplate_guide", + "tutorials/loading_document", + "tutorials/rag-with-astradb" ], }, - // { - // type: "category", - // label: "Examples", - // collapsed: false, - // items: [ - // // "examples/flow-runner", - // // "examples/conversation-chain", - // // "examples/buffer-memory", - // // "examples/csv-loader", - // // "examples/searchapi-tool", - // // "examples/serp-api-tool", - // // "examples/python-function", - // ], - // }, { type: "category", label: "Deployment", - collapsed: false, - items: ["deployment/gcp-deployment"], + collapsed: true, + items: [ + "deployment/gcp-deployment" + ], }, { type: "category", @@ -143,7 +128,7 @@ module.exports = { items: [ "contributing/how-contribute", "contributing/github-issues", - "contributing/community", + "contributing/community" ], }, ], diff --git a/src/backend/base/langflow/config.yaml b/src/backend/base/langflow/config.yaml index 102cb9016..ac9a7456b 100644 --- a/src/backend/base/langflow/config.yaml +++ b/src/backend/base/langflow/config.yaml @@ -232,3 +232,4 @@ output_parsers: custom_components: CustomComponent: documentation: "https://docs.langflow.org/guidelines/custom-component" + # documentation: "https://docs.langflow.org/administration/custom-component"