You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: templates/components/agents/python/blog/README-template.md
+6-29Lines changed: 6 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,4 @@
1
-
## Overview
2
-
3
-
This example is using three agents to generate a blog post:
4
-
5
-
- a researcher that retrieves content via a RAG pipeline,
6
-
- a writer that specializes in writing blog posts and
7
-
- a reviewer that is reviewing the blog post.
8
-
9
-
There are three different methods how the agents can interact to reach their goal:
10
-
11
-
1.[Choreography](./app/agents/choreography.py) - the agents decide themselves to delegate a task to another agent
12
-
1.[Orchestrator](./app/agents/orchestrator.py) - a central orchestrator decides which agent should execute a task
13
-
1.[Explicit Workflow](./app/agents/workflow.py) - a pre-defined workflow specific for the task is used to execute the tasks
1
+
This is a [LlamaIndex](https://www.llamaindex.ai/) multi-agents project using [Workflows](https://docs.llamaindex.ai/en/stable/understanding/workflows/).
14
2
15
3
## Getting Started
16
4
@@ -35,25 +23,14 @@ Third, run the development server:
35
23
poetry run dev
36
24
```
37
25
38
-
Per default, the example is using the explicit workflow. You can change the example by setting the `EXAMPLE_TYPE` environment variable to `choreography` or `orchestrator`.
39
-
The example provides one streaming API endpoint `/api/chat`.
40
-
You can test the endpoint with the following curl request:
41
-
42
-
```
43
-
curl --location 'localhost:8000/api/chat' \
44
-
--header 'Content-Type: application/json' \
45
-
--data '{ "messages": [{ "role": "user", "content": "Write a blog post about physical standards for letters" }] }'
46
-
```
47
-
48
-
You can start editing the API by modifying `app/api/routers/chat.py` or `app/examples/workflow.py`. The API auto-updates as you save the files.
26
+
## Use Case: Blog writer
49
27
50
-
Open [http://localhost:8000](http://localhost:8000)with your browser to start the app.
28
+
The workflow writes blog posts based on documents in the [data](./data) directory. You can start with the included PDF about AI investment in 2024, or add your own documents and run generate script again.
51
29
52
-
To start the app optimized for **production**, run:
30
+
After starting the server, go to [http://localhost:8000](http://localhost:8000) and send a message to the agent to write a blog post.
31
+
E.g: "Write a post about AI investment in 2024"
53
32
54
-
```
55
-
poetry run prod
56
-
```
33
+
To update the workflow, you can edit the [workflow.py](./app/workflows/writer.py) file.
0 commit comments