Skip to content

Commit a52ba9a

Browse files
committed
update readme for blog use case
1 parent 15290f1 commit a52ba9a

File tree

1 file changed

+6
-29
lines changed

1 file changed

+6
-29
lines changed

templates/components/agents/python/blog/README-template.md

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff 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/).
142

153
## Getting Started
164

@@ -35,25 +23,14 @@ Third, run the development server:
3523
poetry run dev
3624
```
3725

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
4927

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.
5129

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"
5332

54-
```
55-
poetry run prod
56-
```
33+
To update the workflow, you can edit the [workflow.py](./app/workflows/writer.py) file.
5734

5835
## Deployments
5936

0 commit comments

Comments
 (0)