Skip to content

Commit 29689a5

Browse files
committed
adds docs
1 parent b4a6558 commit 29689a5

File tree

5 files changed

+193
-8
lines changed

5 files changed

+193
-8
lines changed
File renamed without changes.

docs/docs/plugins/index.md

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,45 @@ sidebar_position: 0
66

77
curate.fun supports various plugins that extend its functionality, particularly for content distribution. Each plugin enables you to distribute curated content to different platforms and channels.
88

9-
## Available Plugins
9+
## Plugin Structure
1010

11-
### [📱 Telegram Plugin](./telegram.md)
11+
Plugins are defined in two parts in your `curate.config.json`:
1212

13-
Distribute curated content to Telegram channels and topics.
13+
1. Plugin Registration:
1414

15-
## Plugin Structure
15+
```json
16+
{
17+
"plugins": {
18+
"@curatedotfun/telegram": {
19+
"type": "distributor",
20+
"url": "./external/telegram"
21+
},
22+
"@curatedotfun/gpt-transform": {
23+
"type": "transformer",
24+
"url": "./external/gpt-transform"
25+
}
26+
}
27+
}
28+
```
1629

17-
Each plugin follows a consistent configuration structure in your `curate.config.json`:
30+
2. Plugin Usage in Feeds:
1831

1932
```json
2033
{
2134
"outputs": {
2235
"stream": {
2336
"enabled": true,
37+
"transform": {
38+
"plugin": "@curatedotfun/gpt-transform",
39+
"config": {
40+
// Transformer-specific configuration
41+
}
42+
},
2443
"distribute": [
2544
{
26-
"plugin": "@curatedotfun/[plugin-name]",
45+
"plugin": "@curatedotfun/telegram",
2746
"config": {
28-
// Plugin-specific configuration
47+
// Distributor-specific configuration
2948
}
3049
}
3150
]
@@ -35,3 +54,17 @@ Each plugin follows a consistent configuration structure in your `curate.config.
3554
```
3655

3756
Select a plugin from the sidebar to view its detailed configuration and setup instructions.
57+
58+
## Available Plugins
59+
60+
### [📱 Telegram Plugin](./distributors/telegram.md)
61+
62+
Distribute curated content to Telegram channels and topics.
63+
64+
### [🤖 GPT Transform](./transformers/gpt-transform.md)
65+
66+
Transform content using OpenRouter's GPT models for AI-powered content enhancement.
67+
68+
### [📝 Simple Transform](./transformers/simple-transform.md)
69+
70+
Format content using a template-based approach with customizable placeholders.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
sidebar_position: 2
3+
---
4+
5+
# 🤖 GPT Transform Plugin
6+
7+
The GPT Transform plugin enables AI-powered content transformation using OpenRouter's API and GPT models.
8+
9+
## 🔧 Setup Guide
10+
11+
1. Define the plugin in your `curate.config.json`:
12+
13+
```json
14+
{
15+
"plugins": {
16+
"@curatedotfun/gpt-transform": {
17+
"type": "transformer",
18+
"url": "./external/gpt-transform"
19+
}
20+
}
21+
}
22+
```
23+
24+
2. Add the transformer to a feed's output stream or recap:
25+
26+
```json
27+
{
28+
"feeds": [
29+
{
30+
"id": "your-feed",
31+
"outputs": {
32+
"stream": {
33+
"enabled": true,
34+
"transform": {
35+
"plugin": "@curatedotfun/gpt-transform",
36+
"config": {
37+
"prompt": "Your system prompt here",
38+
"apiKey": "{OPENROUTER_API_KEY}"
39+
}
40+
},
41+
"distribute": [
42+
// Your distributors here
43+
]
44+
}
45+
}
46+
}
47+
]
48+
}
49+
```
50+
51+
:::info
52+
The `{OPENROUTER_API_KEY}` has already been configured in the deployed environment and will get injected at runtime.
53+
:::
54+
55+
### Example Configuration
56+
57+
Here's an example that transforms content into a news-style format:
58+
59+
```json
60+
{
61+
"transform": {
62+
"plugin": "@curatedotfun/gpt-transform",
63+
"config": {
64+
"prompt": "You are a helpful assistant that summarizes content in a news-style format...",
65+
"apiKey": "{OPENROUTER_API_KEY}"
66+
}
67+
}
68+
}
69+
```
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
sidebar_position: 2
3+
---
4+
5+
# 📝 Simple Transform Plugin
6+
7+
The Simple Transform plugin provides basic text transformation using a template-based approach with placeholders.
8+
9+
## 🔧 Setup Guide
10+
11+
1. Define the plugin in your `curate.config.json`:
12+
13+
```json
14+
{
15+
"plugins": {
16+
"@curatedotfun/simple-transform": {
17+
"type": "transformer",
18+
"url": "./external/simple-transform"
19+
}
20+
}
21+
}
22+
```
23+
24+
2. Add the transformer to a feed's output stream:
25+
26+
```json
27+
{
28+
"feeds": [
29+
{
30+
"id": "your-feed",
31+
"outputs": {
32+
"stream": {
33+
"enabled": true,
34+
"transform": {
35+
"plugin": "@curatedotfun/simple-transform",
36+
"config": {
37+
"format": "📝 {CONTENT}\nCurated by @{CURATOR}"
38+
}
39+
},
40+
"distribute": [
41+
// Your distributors here
42+
]
43+
}
44+
}
45+
}
46+
]
47+
}
48+
```
49+
50+
### Available Placeholders
51+
52+
The format string supports the following placeholders:
53+
54+
- `{CONTENT}`: The original content
55+
- `{CURATOR}`: The curator's username
56+
- `{CURATOR_NOTES}`: Any notes added by the curator
57+
- `{SUBMISSION_ID}`: The submission ID
58+
59+
### Example Configuration
60+
61+
Here's a real example from the cryptofundraise feed:
62+
63+
```json
64+
{
65+
"transform": {
66+
"plugin": "@curatedotfun/simple-transform",
67+
"config": {
68+
"format": "📝 new fundraising announcement, curated by *{CURATOR}*\n{CONTENT}\n📌 source: [View Post](https://x.com/x/status/{SUBMISSION_ID})"
69+
}
70+
}
71+
}

docs/sidebars.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,19 @@ const sidebars: SidebarsConfig = {
3434
{
3535
type: "category",
3636
label: "Plugins",
37-
items: ["plugins/telegram"],
37+
items: [
38+
"plugins/index",
39+
{
40+
type: "category",
41+
label: "Distributors",
42+
items: ["plugins/distributors/telegram"]
43+
},
44+
{
45+
type: "category",
46+
label: "Transformers",
47+
items: ["plugins/transformers/gpt-transform", "plugins/transformers/simple-transform"]
48+
}
49+
],
3850
},
3951
],
4052
};

0 commit comments

Comments
 (0)