From f460b2f175a254d95cd197a2d2cb58e4df0b17d5 Mon Sep 17 00:00:00 2001 From: Fangyin Cheng Date: Tue, 10 Sep 2024 19:07:14 +0800 Subject: [PATCH] docs: Add flow usage document (#1999) --- docs/docs/application/awel.md | 105 +++++++++++++++++++++++++++++++++- 1 file changed, 104 insertions(+), 1 deletion(-) diff --git a/docs/docs/application/awel.md b/docs/docs/application/awel.md index d5e78461b..84efc4669 100644 --- a/docs/docs/application/awel.md +++ b/docs/docs/application/awel.md @@ -1,7 +1,110 @@ # Use Data App With AWEL +## What Is AWEL? + +> Agentic Workflow Expression Language(AWEL) is a set of intelligent agent workflow expression language specially designed for large model application +development. + +You can found more information about AWEL in [AWEL](../awel/awel.md) and +[AWEL Tutorial](../awel/tutorial/) if you want to know more about AWEL. + +In short, you can use AWEL to develop LLM applications with AWEL Python API. + +## What Is AWEL Flow? + +AWEL flow allows you to develop LLM applications without writing code. It is built on top of AWEL Python API. + + +## Visit Your AWEL Flows in `AWEL Flow` Page + +In the `AWEL Flow` page, you can see all the AWEL flows you have created. You can also create a new AWEL flow by clicking the `Create Flow` button. + + +

+ +

+ + +## Examples + +### Build Your RAG Application + +To build your RAG application, you need to create a knowledge space according to [Chat Knowledge Base](./apps/chat_knowledge.md) first. +Then, click the `Create Flow` button to create a new flow. + +In the flow editor, you can drag and drop the nodes to build your RAG application. + +1. You will see an empty flow editor like below: + +

+ +

+ +2. Drag a `Streaming LLM Operator` node to the flow editor. + +

+ +

+ +3. Drag a `Knowledge Operator` node to the flow editor. + +You can click the "+" button in the `Streaming LLM Operator` node's second input(`"HOContext"`), +it will show a list of nodes that can be connected to current node of input, then you can select the `Knowledge Operator` node. + +

+ +

+ +The options of nodes can be connected as follows: + +

+ +

+ +Then, drag the `Knowledge Operator` node and connect it to the `Streaming LLM Operator` node. + +

+ +

+ +Please select your knowledge space in the `Knowledge Operator` node's `Knowledge Space Name` option. + +4. Drag a `Common LLM Http Trigger` node to the flow editor. + +

+ +

+ +4. Drag a `Common Chat Prompt Template` **resource** node to the flow editor. + +

+ +

+ +And you can type your prompt template in the `Common Chat Prompt Template` parameters. + +5. Drag a `OpenAI Streaming Output Operator` node to the flow editor. + +

+ +

+ +6. Click the `Save` button in the top right corner to save your flow. + +

+ +

+ +Lastly, you will see your RAG application in the `AWEL Flow` page. + +

+ +

+ +After that, you can use it to build your APP according to [App Manage](./apps/app_manage.md). ## Reference + - [AWEL](../awel/awel.md) - [AWEL CookBook](../awel/cookbook/) -- [AWEL Tutorial](../awel/awel_tutorial/) +- [AWEL Tutorial](../awel/tutorial/)