Skip to content

Commit 6f1d489

Browse files
committed
continue using fastify for docker
1 parent 21f7fde commit 6f1d489

File tree

4 files changed

+1586
-1929
lines changed

4 files changed

+1586
-1929
lines changed

docs/server.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ Version 20 enters its maintenance period in October 2024 and end-of-life in Apri
2727

2828
## Process Endpoint
2929

30-
Once the server is running, send a `POST` request to `http://localhost:3000/process` containing a JSON object:
30+
Once the server is running, send a `POST` request to `http://localhost:3000/api/process` containing a JSON object:
3131

3232
### Video Type
3333

3434
```bash
3535
curl --json '{
3636
"type": "video",
3737
"url": "https://www.youtube.com/watch?v=MORMZXEaONk"
38-
}' http://localhost:3000/process
38+
}' http://localhost:3000/api/process
3939
```
4040

4141
Use LLM.
@@ -46,7 +46,7 @@ curl --json '{
4646
"url": "https://www.youtube.com/watch?v=MORMZXEaONk",
4747
"whisperModel": "tiny",
4848
"llm": "ollama"
49-
}' http://localhost:3000/process
49+
}' http://localhost:3000/api/process
5050
```
5151

5252
```bash
@@ -56,7 +56,7 @@ curl --json '{
5656
"whisperModel": "tiny",
5757
"llm": "ollama",
5858
"llmModel": "DEEPSEEK_R1_1_5B"
59-
}' http://localhost:3000/process
59+
}' http://localhost:3000/api/process
6060
```
6161

6262
### File Type
@@ -65,7 +65,7 @@ curl --json '{
6565
curl --json '{
6666
"type": "file",
6767
"filePath": "content/audio.mp3"
68-
}' http://localhost:3000/process
68+
}' http://localhost:3000/api/process
6969
```
7070

7171
```bash
@@ -74,7 +74,7 @@ curl --json '{
7474
"filePath": "content/audio.mp3",
7575
"whisperModel": "tiny",
7676
"llm": "ollama"
77-
}' http://localhost:3000/process
77+
}' http://localhost:3000/api/process
7878
```
7979

8080
```bash
@@ -84,7 +84,7 @@ curl --json '{
8484
"prompts": ["titles"],
8585
"whisperModel": "tiny",
8686
"llm": "ollama"
87-
}' http://localhost:3000/process
87+
}' http://localhost:3000/api/process
8888
```
8989

9090
## Language Model (LLM) Options
@@ -96,7 +96,7 @@ curl --json '{
9696
"type": "video",
9797
"url": "https://www.youtube.com/watch?v=MORMZXEaONk",
9898
"llm": "chatgpt"
99-
}' http://localhost:3000/process
99+
}' http://localhost:3000/api/process
100100
```
101101

102102
```bash
@@ -105,7 +105,7 @@ curl --json '{
105105
"url": "https://www.youtube.com/watch?v=MORMZXEaONk",
106106
"llm": "chatgpt",
107107
"llmModel": "GPT_4o_MINI"
108-
}' http://localhost:3000/process
108+
}' http://localhost:3000/api/process
109109
```
110110

111111
### Claude
@@ -115,7 +115,7 @@ curl --json '{
115115
"type": "video",
116116
"url": "https://www.youtube.com/watch?v=MORMZXEaONk",
117117
"llm": "claude"
118-
}' http://localhost:3000/process
118+
}' http://localhost:3000/api/process
119119
```
120120

121121
```bash
@@ -124,7 +124,7 @@ curl --json '{
124124
"url": "https://www.youtube.com/watch?v=MORMZXEaONk",
125125
"llm": "claude",
126126
"llmModel": "CLAUDE_3_SONNET"
127-
}' http://localhost:3000/process
127+
}' http://localhost:3000/api/process
128128
```
129129

130130
### Gemini
@@ -134,7 +134,7 @@ curl --json '{
134134
"type": "video",
135135
"url": "https://www.youtube.com/watch?v=MORMZXEaONk",
136136
"llm": "gemini"
137-
}' http://localhost:3000/process
137+
}' http://localhost:3000/api/process
138138
```
139139

140140
```bash
@@ -143,7 +143,7 @@ curl --json '{
143143
"url": "https://www.youtube.com/watch?v=MORMZXEaONk",
144144
"llm": "gemini",
145145
"llmModel": "GEMINI_1_5_FLASH"
146-
}' http://localhost:3000/process
146+
}' http://localhost:3000/api/process
147147
```
148148

149149
### Cohere
@@ -153,7 +153,7 @@ curl --json '{
153153
"type": "video",
154154
"url": "https://www.youtube.com/watch?v=MORMZXEaONk",
155155
"llm": "cohere"
156-
}' http://localhost:3000/process
156+
}' http://localhost:3000/api/process
157157
```
158158

159159
```bash
@@ -162,7 +162,7 @@ curl --json '{
162162
"url": "https://www.youtube.com/watch?v=MORMZXEaONk",
163163
"llm": "cohere",
164164
"llmModel": "COMMAND_R_PLUS"
165-
}' http://localhost:3000/process
165+
}' http://localhost:3000/api/process
166166
```
167167

168168
### Mistral
@@ -172,7 +172,7 @@ curl --json '{
172172
"type": "video",
173173
"url": "https://www.youtube.com/watch?v=MORMZXEaONk",
174174
"llm": "mistral"
175-
}' http://localhost:3000/process
175+
}' http://localhost:3000/api/process
176176
```
177177

178178
```bash
@@ -181,7 +181,7 @@ curl --json '{
181181
"url": "https://www.youtube.com/watch?v=MORMZXEaONk",
182182
"llm": "mistral",
183183
"llmModel": "MIXTRAL_8x7b"
184-
}' http://localhost:3000/process
184+
}' http://localhost:3000/api/process
185185
```
186186

187187
## Transcription Options
@@ -193,7 +193,7 @@ curl --json '{
193193
"type": "video",
194194
"url": "https://www.youtube.com/watch?v=MORMZXEaONk",
195195
"whisperModel": "tiny"
196-
}' http://localhost:3000/process
196+
}' http://localhost:3000/api/process
197197
```
198198

199199
### Deepgram
@@ -203,7 +203,7 @@ curl --json '{
203203
"type": "video",
204204
"url": "https://www.youtube.com/watch?v=MORMZXEaONk",
205205
"transcriptServices": "deepgram"
206-
}' http://localhost:3000/process
206+
}' http://localhost:3000/api/process
207207
```
208208

209209
```bash
@@ -212,7 +212,7 @@ curl --json '{
212212
"url": "https://www.youtube.com/watch?v=MORMZXEaONk",
213213
"transcriptServices": "deepgram",
214214
"llm": "ollama"
215-
}' http://localhost:3000/process
215+
}' http://localhost:3000/api/process
216216
```
217217

218218
### Assembly
@@ -222,7 +222,7 @@ curl --json '{
222222
"type": "video",
223223
"url": "https://www.youtube.com/watch?v=MORMZXEaONk",
224224
"transcriptServices": "assembly"
225-
}' http://localhost:3000/process
225+
}' http://localhost:3000/api/process
226226
```
227227

228228
```bash
@@ -231,7 +231,7 @@ curl --json '{
231231
"url": "https://www.youtube.com/watch?v=MORMZXEaONk",
232232
"transcriptServices": "assembly",
233233
"llm": "ollama"
234-
}' http://localhost:3000/process
234+
}' http://localhost:3000/api/process
235235
```
236236

237237
```bash
@@ -240,7 +240,7 @@ curl --json '{
240240
"url": "https://ajc.pics/audio/fsjam-short.mp3",
241241
"transcriptServices": "assembly",
242242
"speakerLabels": true
243-
}' http://localhost:3000/process
243+
}' http://localhost:3000/api/process
244244
```
245245

246246
```bash
@@ -250,7 +250,7 @@ curl --json '{
250250
"transcriptServices": "assembly",
251251
"speakerLabels": true,
252252
"llm": "ollama"
253-
}' http://localhost:3000/process
253+
}' http://localhost:3000/api/process
254254
```
255255

256256
## Prompt Options
@@ -260,15 +260,15 @@ curl --json '{
260260
"type": "video",
261261
"url": "https://www.youtube.com/watch?v=MORMZXEaONk",
262262
"prompts": ["titles", "mediumChapters"]
263-
}' http://localhost:3000/process
263+
}' http://localhost:3000/api/process
264264
```
265265

266266
```bash
267267
curl --json '{
268268
"type": "video",
269269
"url": "https://www.youtube.com/watch?v=MORMZXEaONk",
270270
"prompts": ["titles", "summary", "shortChapters", "takeaways", "questions"]
271-
}' http://localhost:3000/process
271+
}' http://localhost:3000/api/process
272272
```
273273

274274
```bash
@@ -278,7 +278,7 @@ curl --json '{
278278
"prompts": ["titles", "summary", "shortChapters", "takeaways", "questions"],
279279
"whisperModel": "tiny",
280280
"llm": "ollama"
281-
}' http://localhost:3000/process
281+
}' http://localhost:3000/api/process
282282
```
283283

284284
## Test Requests

0 commit comments

Comments
 (0)