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
doc: fix heading levels in markdown content (#627)
* only one H1 (#) heading for the title is allowed, so fix the extra H1
headings (and the subheadings under those) to appropriate levels
* fix some inline code blocks containing leading/trailing spaces
* fix some indenting issues under an ordered list item
Signed-off-by: David B. Kinder <[email protected]>
Once microservice starts, user can use below script to invoke.
93
93
@@ -104,7 +104,7 @@ data: [DONE]
104
104
105
105
```
106
106
107
-
# 🚀 4. Provide your own tools
107
+
##🚀 4. Provide your own tools
108
108
109
109
- Define tools
110
110
@@ -180,7 +180,7 @@ data: 'The weather information in Austin is not available from the Open Platform
180
180
data: [DONE]
181
181
```
182
182
183
-
# 5. Customize agent strategy
183
+
##5. Customize agent strategy
184
184
185
185
For advanced developers who want to implement their own agent strategies, you can add a separate folder in `src\strategy`, implement your agent by inherit the `BaseAgent` class, and add your strategy into the `src\agent.py`. The architecture of this agent microservice is shown in the diagram below as a reference.
Copy file name to clipboardExpand all lines: comps/cores/telemetry/README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ OPEA Comps currently provides telemetry functionalities for metrics and tracing
8
8
9
9
OPEA microservice metrics are exported in Prometheus format and are divided into two categories: general metrics and specific metrics.
10
10
11
-
General metrics, such as `http_requests_total`, `http_request_size_bytes`, are exposed by every microservice endpoint using the [prometheus-fastapi-instrumentator](https://github.com/trallnag/prometheus-fastapi-instrumentator).
11
+
General metrics, such as `http_requests_total`, `http_request_size_bytes`, are exposed by every microservice endpoint using the [prometheus-fastapi-instrumentator](https://github.com/trallnag/prometheus-fastapi-instrumentator).
12
12
13
13
Specific metrics are the built-in metrics exposed under `/metrics` by each specific microservices such as TGI, vLLM, TEI and others. Both types of the metrics adhere to the Prometheus format.
This is required only if you are going to consume the _generate_captions_ API of this microservice as in [Section 4.3](#43-consume-generate_captions-api).
## 1.5 Start Data Preparation Microservice for Redis with Python Script
45
+
###1.5 Start Data Preparation Microservice for Redis with Python Script
46
46
47
47
Start document preparation microservice for Redis with below command.
48
48
49
49
```bash
50
50
python prepare_videodoc_redis.py
51
51
```
52
52
53
-
# 🚀2. Start Microservice with Docker (Option 2)
53
+
##🚀2. Start Microservice with Docker (Option 2)
54
54
55
-
## 2.1 Start Redis Stack Server
55
+
###2.1 Start Redis Stack Server
56
56
57
57
Please refer to this [readme](../../../vectorstores/langchain/redis/README.md).
58
58
59
-
## 2.2 Start LVM Microservice (Optional)
59
+
###2.2 Start LVM Microservice (Optional)
60
60
61
61
This is required only if you are going to consume the _generate_captions_ API of this microservice as described [here](#43-consume-generate_captions-api).
## 2.6 Run with Docker Compose (Option B - deprecated, will move to genAIExample in future)
95
+
###2.6 Run with Docker Compose (Option B - deprecated, will move to genAIExample in future)
96
96
97
97
```bash
98
98
cd comps/dataprep/redis/multimodal_langchain/docker
99
99
docker compose -f docker-compose-dataprep-redis.yaml up -d
100
100
```
101
101
102
-
# 🚀3. Status Microservice
102
+
##🚀3. Status Microservice
103
103
104
104
```bash
105
105
docker container logs -f dataprep-redis-server
106
106
```
107
107
108
-
# 🚀4. Consume Microservice
108
+
##🚀4. Consume Microservice
109
109
110
110
Once this dataprep microservice is started, user can use the below commands to invoke the microservice to convert videos and their transcripts (optional) to embeddings and save to the Redis vector store.
111
111
112
112
This mircroservice has provided 3 different ways for users to ingest videos into Redis vector store corresponding to the 3 use cases.
113
113
114
-
## 4.1 Consume _videos_with_transcripts_ API
114
+
###4.1 Consume _videos_with_transcripts_ API
115
115
116
116
**Use case:** This API is used when a transcript file (under `.vtt` format) is available for each video.
117
117
@@ -120,7 +120,7 @@ This mircroservice has provided 3 different ways for users to ingest videos into
120
120
- Make sure the file paths after `files=@` are correct.
121
121
- Every transcript file's name must be identical with its corresponding video file's name (except their extension .vtt and .mp4). For example, `video1.mp4` and `video1.vtt`. Otherwise, if `video1.vtt` is not included correctly in this API call, this microservice will return error `No captions file video1.vtt found for video1.mp4`.
122
122
123
-
### Single video-transcript pair upload
123
+
####Single video-transcript pair upload
124
124
125
125
```bash
126
126
curl -X POST \
@@ -130,7 +130,7 @@ curl -X POST \
130
130
http://localhost:6007/v1/videos_with_transcripts
131
131
```
132
132
133
-
### Multiple video-transcript pair upload
133
+
####Multiple video-transcript pair upload
134
134
135
135
```bash
136
136
curl -X POST \
@@ -142,13 +142,13 @@ curl -X POST \
142
142
http://localhost:6007/v1/videos_with_transcripts
143
143
```
144
144
145
-
## 4.2 Consume _generate_transcripts_ API
145
+
###4.2 Consume _generate_transcripts_ API
146
146
147
147
**Use case:** This API should be used when a video has meaningful audio or recognizable speech but its transcript file is not available.
148
148
149
149
In this use case, this microservice will use [`whisper`](https://openai.com/index/whisper/) model to generate the `.vtt` transcript for the video.
150
150
151
-
### Single video upload
151
+
####Single video upload
152
152
153
153
```bash
154
154
curl -X POST \
@@ -157,7 +157,7 @@ curl -X POST \
157
157
http://localhost:6007/v1/generate_transcripts
158
158
```
159
159
160
-
### Multiple video upload
160
+
####Multiple video upload
161
161
162
162
```bash
163
163
curl -X POST \
@@ -167,7 +167,7 @@ curl -X POST \
167
167
http://localhost:6007/v1/generate_transcripts
168
168
```
169
169
170
-
## 4.3 Consume _generate_captions_ API
170
+
###4.3 Consume _generate_captions_ API
171
171
172
172
**Use case:** This API should be used when a video does not have meaningful audio or does not have audio.
173
173
@@ -192,7 +192,7 @@ curl -X POST \
192
192
http://localhost:6007/v1/generate_captions
193
193
```
194
194
195
-
## 4.4 Consume get_videos API
195
+
###4.4 Consume get_videos API
196
196
197
197
To get names of uploaded videos, use the following command.
198
198
@@ -202,7 +202,7 @@ curl -X POST \
202
202
http://localhost:6007/v1/dataprep/get_videos
203
203
```
204
204
205
-
## 4.5 Consume delete_videos API
205
+
###4.5 Consume delete_videos API
206
206
207
207
To delete uploaded videos and clear the database, use the following command.
0 commit comments