merge dev

This commit is contained in:
cristhianzl 2024-05-20 11:09:58 -03:00
commit cf7e664bfd
74 changed files with 15440 additions and 15479 deletions

View file

@ -0,0 +1,45 @@
import ZoomableImage from "/src/theme/ZoomableImage.js";
import Admonition from "@theme/Admonition";
# Global environment variables
Langflow 1.0 alpha includes the option to add **Global Environment Variables** for your application.
## Add a global variable to a project
In this example, you'll add the `openai_api_key` credential as a global environment variable to the **Basic Prompting** starter project.
For more information on the starter flow, see [Basic prompting](../starter-projects/basic-prompting.mdx).
1. From the Langflow dashboard, click **New Project**.
2. Select **Basic Prompting**.
The **Basic Prompting** flow is created.
3. To create an environment variable for the **OpenAI** component:
1. In the **OpenAI API Key** field, click the **Globe** button, and then click **Add New Variable**.
2. In the **Variable Name** field, enter `openai_api_key`.
3. In the **Value** field, paste your OpenAI API Key (`sk-...`).
4. For the variable **Type**, select **Credential**.
5. In the **Apply to Fields** field, select **OpenAI API Key** to apply this variable to all fields named **OpenAI API Key**.
6. Click **Save Variable**.
You now have a `openai_api_key` global environment variable for your Langflow project.
<Admonition type="tip">
You can also create global variables in **Settings** > **Variables and
Secrets**.
</Admonition>
<ZoomableImage
alt="Docusaurus themed image"
sources={{
light: "img/global-env.png",
dark: "img/global-env.png",
}}
style={{ width: "40%", margin: "20px auto" }}
/>
4. To view and manage your project's global environment variables, visit **Settings** > **Variables and Secrets**.
For more on variables in HuggingFace Spaces, see [Managing Secrets](https://huggingface.co/docs/hub/spaces-overview#managing-secrets).

View file

@ -0,0 +1,29 @@
import ThemedImage from "@theme/ThemedImage";
import useBaseUrl from "@docusaurus/useBaseUrl";
import ZoomableImage from "/src/theme/ZoomableImage.js";
import ReactPlayer from "react-player";
import Admonition from "@theme/Admonition";
# Playground
In Langflow 1.0 alpha, the **Playground** replaces the **Interaction Panel**.
The **Playground** provides an interface for interacting with flows without opening them in the flow editor.
It even works for flows hosted on the Langflow store!
As long as you have a flow's environment variables set, you can run it by clicking the **Playground** button.
1. From your **Collections** page, click **Playground** in one of your flows.
The **Playground** window opens.
<ZoomableImage
alt="Docusaurus themed image"
sources={{
light: useBaseUrl("img/playground-chat.png"),
dark: useBaseUrl("img/playground-chat.png"),
}}
style={{ width: "50%", maxWidth: "600px", margin: "0 auto" }}
/>
2. Chat with your bot as you normally would, all without having to open the editor.

View file

@ -4,9 +4,7 @@ module.exports = {
type: "category",
label: "What's New?",
collapsed: false,
items: [
"whats-new/a-new-chapter-langflow"
],
items: ["whats-new/a-new-chapter-langflow"],
},
{
type: "category",
@ -17,7 +15,7 @@ module.exports = {
"getting-started/install-langflow",
"getting-started/quickstart",
"getting-started/huggingface-spaces",
"getting-started/new-to-llms"
"getting-started/new-to-llms",
],
},
{
@ -29,7 +27,7 @@ module.exports = {
"starter-projects/blog-writer",
"starter-projects/document-qa",
"starter-projects/memory-chatbot",
"starter-projects/vector-store-rag"
"starter-projects/vector-store-rag",
],
},
{
@ -40,10 +38,12 @@ module.exports = {
"administration/login",
"administration/api",
"administration/cli",
"administration/playground",
"administration/global-env",
"administration/components",
"administration/collection",
"administration/prompt-customization",
"administration/langfuse_integration"
"administration/langfuse_integration",
],
},
{
@ -58,7 +58,7 @@ module.exports = {
"components/helpers",
"components/vector-stores",
"components/embeddings",
"components/custom"
"components/custom",
],
},
{
@ -74,7 +74,7 @@ module.exports = {
"components/retrievers",
"components/text-splitters",
"components/toolkits",
"components/tools"
"components/tools",
],
},
{
@ -88,7 +88,7 @@ module.exports = {
"examples/csv-loader",
"examples/searchapi-tool",
"examples/serp-api-tool",
"examples/python-function"
"examples/python-function",
],
},
{
@ -101,8 +101,8 @@ module.exports = {
"migration/inputs-and-outputs",
"migration/text-and-record",
"migration/compatibility",
"migration/global-variables"
]
"migration/global-variables",
],
},
{
type: "category",
@ -111,16 +111,14 @@ module.exports = {
items: [
"tutorials/chatprompttemplate_guide",
"tutorials/loading_document",
"tutorials/rag-with-astradb"
"tutorials/rag-with-astradb",
],
},
{
type: "category",
label: "Deployment",
collapsed: true,
items: [
"deployment/gcp-deployment"
],
items: ["deployment/gcp-deployment"],
},
{
type: "category",
@ -130,7 +128,7 @@ module.exports = {
"contributing/how-contribute",
"contributing/github-issues",
"contributing/community",
"contributing/contribute-component"
"contributing/contribute-component",
],
},
],

BIN
docs/static/img/global-env.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

BIN
docs/static/img/playground-chat.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB