Skip to content

Commit

Permalink
Merge pull request #122 from ajcwebdev/migrate
Browse files Browse the repository at this point in the history
Continue using Fastify for Docker
  • Loading branch information
ajcwebdev authored Jan 31, 2025
2 parents 21f7fde + 6f1d489 commit 0b50a0f
Show file tree
Hide file tree
Showing 4 changed files with 1,586 additions and 1,929 deletions.
54 changes: 27 additions & 27 deletions docs/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ Version 20 enters its maintenance period in October 2024 and end-of-life in Apri

## Process Endpoint

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

### Video Type

```bash
curl --json '{
"type": "video",
"url": "https://www.youtube.com/watch?v=MORMZXEaONk"
}' http://localhost:3000/process
}' http://localhost:3000/api/process
```

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

```bash
Expand All @@ -56,7 +56,7 @@ curl --json '{
"whisperModel": "tiny",
"llm": "ollama",
"llmModel": "DEEPSEEK_R1_1_5B"
}' http://localhost:3000/process
}' http://localhost:3000/api/process
```

### File Type
Expand All @@ -65,7 +65,7 @@ curl --json '{
curl --json '{
"type": "file",
"filePath": "content/audio.mp3"
}' http://localhost:3000/process
}' http://localhost:3000/api/process
```

```bash
Expand All @@ -74,7 +74,7 @@ curl --json '{
"filePath": "content/audio.mp3",
"whisperModel": "tiny",
"llm": "ollama"
}' http://localhost:3000/process
}' http://localhost:3000/api/process
```

```bash
Expand All @@ -84,7 +84,7 @@ curl --json '{
"prompts": ["titles"],
"whisperModel": "tiny",
"llm": "ollama"
}' http://localhost:3000/process
}' http://localhost:3000/api/process
```

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

```bash
Expand All @@ -240,7 +240,7 @@ curl --json '{
"url": "https://ajc.pics/audio/fsjam-short.mp3",
"transcriptServices": "assembly",
"speakerLabels": true
}' http://localhost:3000/process
}' http://localhost:3000/api/process
```

```bash
Expand All @@ -250,7 +250,7 @@ curl --json '{
"transcriptServices": "assembly",
"speakerLabels": true,
"llm": "ollama"
}' http://localhost:3000/process
}' http://localhost:3000/api/process
```

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

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

```bash
Expand All @@ -278,7 +278,7 @@ curl --json '{
"prompts": ["titles", "summary", "shortChapters", "takeaways", "questions"],
"whisperModel": "tiny",
"llm": "ollama"
}' http://localhost:3000/process
}' http://localhost:3000/api/process
```

## Test Requests
Expand Down
Loading

0 comments on commit 0b50a0f

Please sign in to comment.