Skip to content

Commit

Permalink
doc: fix headings (#656)
Browse files Browse the repository at this point in the history
* doc: fix headings

* Fix incorrect uses of heading levels
* fix indenting within lists

Signed-off-by: David B. Kinder <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: David B. Kinder <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
dbkinder and pre-commit-ci[bot] authored Aug 28, 2024
1 parent beda609 commit 7a0fca7
Show file tree
Hide file tree
Showing 6 changed files with 212 additions and 198 deletions.
54 changes: 27 additions & 27 deletions AgentQnA/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,50 +26,50 @@ This example showcases a hierarchical multi-agent system for question-answering
1. Build agent docker image </br>
First, clone the opea GenAIComps repo

```
export WORKDIR=<your-work-directory>
cd $WORKDIR
git clone https://github.com/opea-project/GenAIComps.git
```
```
export WORKDIR=<your-work-directory>
cd $WORKDIR
git clone https://github.com/opea-project/GenAIComps.git
```

Then build the agent docker image. Both the supervisor agent and the worker agent will use the same docker image, but when we launch the two agents we will specify different strategies and register different tools.
Then build the agent docker image. Both the supervisor agent and the worker agent will use the same docker image, but when we launch the two agents we will specify different strategies and register different tools.

```
cd GenAIComps
docker build -t opea/comps-agent-langchain:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/agent/langchain/docker/Dockerfile .
```
```
cd GenAIComps
docker build -t opea/comps-agent-langchain:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/agent/langchain/docker/Dockerfile .
```

2. Launch tool services </br>
In this example, we will use some of the mock APIs provided in the Meta CRAG KDD Challenge to demonstrate the benefits of gaining additional context from mock knowledge graphs.

```
docker run -d -p=8080:8000 docker.io/aicrowd/kdd-cup-24-crag-mock-api:v0
```
```
docker run -d -p=8080:8000 docker.io/aicrowd/kdd-cup-24-crag-mock-api:v0
```

3. Set up environment for this example </br>
First, clone this repo

```
cd $WORKDIR
git clone https://github.com/opea-project/GenAIExamples.git
```
```
cd $WORKDIR
git clone https://github.com/opea-project/GenAIExamples.git
```

Second, set up env vars
Second, set up env vars

```
export TOOLSET_PATH=$WORKDIR/GenAIExamples/AgentQnA/tools/
# optional: OPANAI_API_KEY
export OPENAI_API_KEY=<your-openai-key>
```
```
export TOOLSET_PATH=$WORKDIR/GenAIExamples/AgentQnA/tools/
# optional: OPANAI_API_KEY
export OPENAI_API_KEY=<your-openai-key>
```

4. Launch agent services</br>
The configurations of the supervisor agent and the worker agent are defined in the docker-compose yaml file. We currently use openAI GPT-4o-mini as LLM, and we plan to add support for llama3.1-70B-instruct (served by TGI-Gaudi) in a subsequent release.
To use openai llm, run command below.

```
cd docker/openai/
bash launch_agent_service_openai.sh
```
```
cd docker/openai/
bash launch_agent_service_openai.sh
```

## Validate services

Expand Down
108 changes: 54 additions & 54 deletions DocIndexRetriever/docker/README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
# DocRetriever Application
# DocRetriever Application with Docker

DocRetriever are the most widely adopted use case for leveraging the different methodologies to match user query against a set of free-text records. DocRetriever is essential to RAG system, which bridges the knowledge gap by dynamically fetching relevant information from external sources, ensuring that responses generated remain factual and current. The core of this architecture are vector databases, which are instrumental in enabling efficient and semantic retrieval of information. These databases store data as vectors, allowing RAG to swiftly access the most pertinent documents or data points based on semantic similarity.

### 1. Build Images for necessary microservices. (This step will not needed after docker image released)
## 1. Build Images for necessary microservices. (This step will not needed after docker image released)

- Embedding TEI Image

```bash
git clone https://github.com/opea-project/GenAIComps.git
cd GenAIComps
docker build -t opea/embedding-tei:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/embeddings/langchain/docker/Dockerfile .
```
```bash
git clone https://github.com/opea-project/GenAIComps.git
cd GenAIComps
docker build -t opea/embedding-tei:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/embeddings/langchain/docker/Dockerfile .
```

- Retriever Vector store Image

```bash
docker build -t opea/retriever-redis:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/retrievers/langchain/redis/docker/Dockerfile .
```
```bash
docker build -t opea/retriever-redis:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/retrievers/langchain/redis/docker/Dockerfile .
```

- Rerank TEI Image

```bash
docker build -t opea/reranking-tei:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/reranks/tei/docker/Dockerfile .
```
```bash
docker build -t opea/reranking-tei:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/reranks/tei/docker/Dockerfile .
```

- Dataprep Image

```bash
docker build -t opea/dataprep-on-ray-redis:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/dataprep/redis/langchain_ray/docker/Dockerfile .
```
```bash
docker build -t opea/dataprep-on-ray-redis:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/dataprep/redis/langchain_ray/docker/Dockerfile .
```

### 2. Build Images for MegaService
## 2. Build Images for MegaService

```bash
cd ..
git clone https://github.com/opea-project/GenAIExamples.git
docker build --no-cache -t opea/doc-index-retriever:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f GenAIExamples/DocIndexRetriever/docker/Dockerfile .
```

### 3. Start all the services Docker Containers
## 3. Start all the services Docker Containers

```bash
export host_ip="YOUR IP ADDR"
Expand All @@ -62,7 +62,7 @@ cd GenAIExamples/DocIndexRetriever/docker/${llm_hardware}/
docker compose -f docker-compose.yaml up -d
```

### 3. Validation
## 3. Validation

Add Knowledge Base via HTTP Links:

Expand All @@ -86,41 +86,41 @@ curl http://${host_ip}:8889/v1/retrievaltool -X POST -H "Content-Type: applicati
{"id":"354e62c703caac8c547b3061433ec5e8","reranked_docs":[{"id":"06d5a5cefc06cf9a9e0b5fa74a9f233c","text":"Close SearchsearchMenu WikiNewsCommunity Daysx-twitter linkedin github searchStreamlining implementation of enterprise-grade Generative AIEfficiently integrate secure, performant, and cost-effective Generative AI workflows into business value.TODAYOPEA..."}],"initial_query":"Explain the OPEA project?"}
```

### 4. Trouble shooting
## 4. Trouble shooting

1. check all containers are alive

```bash
# redis vector store
docker container logs redis-vector-db
# dataprep to redis microservice, input document files
docker container logs dataprep-redis-server

# embedding microservice
curl http://${host_ip}:6000/v1/embeddings \
-X POST \
-d '{"text":"Explain the OPEA project"}' \
-H 'Content-Type: application/json' > query
docker container logs embedding-tei-server

# if you used tei-gaudi
docker container logs tei-embedding-gaudi-server

# retriever microservice, input embedding output docs
curl http://${host_ip}:7000/v1/retrieval \
-X POST \
-d @query \
-H 'Content-Type: application/json' > rerank_query
docker container logs retriever-redis-server


# reranking microservice
curl http://${host_ip}:8000/v1/reranking \
-X POST \
-d @rerank_query \
-H 'Content-Type: application/json' > output
docker container logs reranking-tei-server

# megaservice gateway
docker container logs doc-index-retriever-server
```
```bash
# redis vector store
docker container logs redis-vector-db
# dataprep to redis microservice, input document files
docker container logs dataprep-redis-server
# embedding microservice
curl http://${host_ip}:6000/v1/embeddings \
-X POST \
-d '{"text":"Explain the OPEA project"}' \
-H 'Content-Type: application/json' > query
docker container logs embedding-tei-server
# if you used tei-gaudi
docker container logs tei-embedding-gaudi-server
# retriever microservice, input embedding output docs
curl http://${host_ip}:7000/v1/retrieval \
-X POST \
-d @query \
-H 'Content-Type: application/json' > rerank_query
docker container logs retriever-redis-server
# reranking microservice
curl http://${host_ip}:8000/v1/reranking \
-X POST \
-d @rerank_query \
-H 'Content-Type: application/json' > output
docker container logs reranking-tei-server
# megaservice gateway
docker container logs doc-index-retriever-server
```
2 changes: 1 addition & 1 deletion ProductivitySuite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

OPEA Productivity Suite, is a powerful tool designed to streamline your workflow and boost productivity. This application leverages the cutting-edge OPEA microservices to provide a comprehensive suite of features that cater to the diverse needs of modern enterprises.

### Key Features
## Key Features

- Chat with Documents: Engage in intelligent conversations with your documents using our advanced RAG Capabilities. Our Retrieval-Augmented Generation (RAG) model allows you to ask questions, receive relevant information, and gain insights from your documents in real-time.

Expand Down
50 changes: 28 additions & 22 deletions ProductivitySuite/docker/ui/react/README.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,72 @@
<h1 align="center" id="title"> Productivity Suite React UI</h1>
# Productivity Suite React UI

### 📸 Project Screenshots
## 📸 Project Screenshots

![project-screenshot](../../../assets/img/chat_qna_init.png)
![project-screenshot](../../../assets/img/Login_page.png)

<h2>🧐 Features</h2>
## 🧐 Features

Here're some of the project's features:

#### CHAT QNA
### CHAT QNA

- Start a Text Chat:Initiate a text chat with the ability to input written conversations, where the dialogue content can also be customized based on uploaded files.
- Context Awareness: The AI assistant maintains the context of the conversation, understanding references to previous statements or questions. This allows for more natural and coherent exchanges.

##### DATA SOURCE
#### DATA SOURCE

- The choice between uploading locally or copying a remote link. Chat according to uploaded knowledge base.
- Uploaded File would get listed and user would be able add or remove file/links
- The choice between uploading locally or copying a remote link. Chat according to uploaded knowledge base.
- Uploaded File would get listed and user would be able add or remove file/links

###### Screen Shot
##### Screen Shot

![project-screenshot](../../../assets/img/data_source.png)
![project-screenshot](../../../assets/img/data_source.png)

- Clear: Clear the record of the current dialog box without retaining the contents of the dialog box.
- Chat history: Historical chat records can still be retained after refreshing, making it easier for users to view the context.
- Conversational Chat : The application maintains a history of the conversation, allowing users to review previous messages and the AI to refer back to earlier points in the dialogue when necessary.
###### Screen Shots
![project-screenshot](../../../assets/img/chat_qna_init.png)
![project-screenshot](../../../assets/img/chatqna_with_conversation.png)

#### CODEGEN
##### Screen Shots

![project-screenshot](../../../assets/img/chat_qna_init.png)
![project-screenshot](../../../assets/img/chatqna_with_conversation.png)

### CODEGEN

- Generate code: generate the corresponding code based on the current user's input.
###### Screen Shot
![project-screenshot](../../../assets/img/codegen.png)

#### DOC SUMMARY
### DOC SUMMARY

- Summarizing Uploaded Files: Upload files from their local device, then click 'Generate Summary' to summarize the content of the uploaded file. The summary will be displayed on the 'Summary' box.
- Summarizing Text via Pasting: Paste the text to be summarized into the text box, then click 'Generate Summary' to produce a condensed summary of the content, which will be displayed in the 'Summary' box on the right.
- Scroll to Bottom: The summarized content will automatically scroll to the bottom.
###### Screen Shot
![project-screenshot](../../../assets/img/doc_summary_paste.png)
![project-screenshot](../../../assets/img/doc_summary_file.png)

#### FAQ Generator
#### Screen Shot

![project-screenshot](../../../assets/img/doc_summary_paste.png)
![project-screenshot](../../../assets/img/doc_summary_file.png)

### FAQ Generator

- Generate FAQs from Text via Pasting: Paste the text to into the text box, then click 'Generate FAQ' to produce a condensed FAQ of the content, which will be displayed in the 'FAQ' box below.

- Generate FAQs from Text via txt file Upload: Upload the file in the Upload bar, then click 'Generate FAQ' to produce a condensed FAQ of the content, which will be displayed in the 'FAQ' box below.
###### Screen Shot
![project-screenshot](../../../assets/img/faq_generator.png)

<h2>🛠️ Get it Running:</h2>
#### Screen Shot

![project-screenshot](../../../assets/img/faq_generator.png)

## 🛠️ Get it Running:

1. Clone the repo.

2. cd command to the current folder.

3. create a .env file and add the following variables and values.
```env
```
VITE_BACKEND_SERVICE_ENDPOINT_CHATQNA=''
VITE_BACKEND_SERVICE_ENDPOINT_CODEGEN=''
VITE_BACKEND_SERVICE_ENDPOINT_DOCSUM=''
Expand Down
Loading

0 comments on commit 7a0fca7

Please sign in to comment.