forked from elliotBraem/efizzybot
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b4a6558
commit 29689a5
Showing
5 changed files
with
193 additions
and
8 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
--- | ||
sidebar_position: 2 | ||
--- | ||
|
||
# 🤖 GPT Transform Plugin | ||
|
||
The GPT Transform plugin enables AI-powered content transformation using OpenRouter's API and GPT models. | ||
|
||
## 🔧 Setup Guide | ||
|
||
1. Define the plugin in your `curate.config.json`: | ||
|
||
```json | ||
{ | ||
"plugins": { | ||
"@curatedotfun/gpt-transform": { | ||
"type": "transformer", | ||
"url": "./external/gpt-transform" | ||
} | ||
} | ||
} | ||
``` | ||
|
||
2. Add the transformer to a feed's output stream or recap: | ||
|
||
```json | ||
{ | ||
"feeds": [ | ||
{ | ||
"id": "your-feed", | ||
"outputs": { | ||
"stream": { | ||
"enabled": true, | ||
"transform": { | ||
"plugin": "@curatedotfun/gpt-transform", | ||
"config": { | ||
"prompt": "Your system prompt here", | ||
"apiKey": "{OPENROUTER_API_KEY}" | ||
} | ||
}, | ||
"distribute": [ | ||
// Your distributors here | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} | ||
``` | ||
|
||
:::info | ||
The `{OPENROUTER_API_KEY}` has already been configured in the deployed environment and will get injected at runtime. | ||
::: | ||
|
||
### Example Configuration | ||
|
||
Here's an example that transforms content into a news-style format: | ||
|
||
```json | ||
{ | ||
"transform": { | ||
"plugin": "@curatedotfun/gpt-transform", | ||
"config": { | ||
"prompt": "You are a helpful assistant that summarizes content in a news-style format...", | ||
"apiKey": "{OPENROUTER_API_KEY}" | ||
} | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
sidebar_position: 2 | ||
--- | ||
|
||
# 📝 Simple Transform Plugin | ||
|
||
The Simple Transform plugin provides basic text transformation using a template-based approach with placeholders. | ||
|
||
## 🔧 Setup Guide | ||
|
||
1. Define the plugin in your `curate.config.json`: | ||
|
||
```json | ||
{ | ||
"plugins": { | ||
"@curatedotfun/simple-transform": { | ||
"type": "transformer", | ||
"url": "./external/simple-transform" | ||
} | ||
} | ||
} | ||
``` | ||
|
||
2. Add the transformer to a feed's output stream: | ||
|
||
```json | ||
{ | ||
"feeds": [ | ||
{ | ||
"id": "your-feed", | ||
"outputs": { | ||
"stream": { | ||
"enabled": true, | ||
"transform": { | ||
"plugin": "@curatedotfun/simple-transform", | ||
"config": { | ||
"format": "📝 {CONTENT}\nCurated by @{CURATOR}" | ||
} | ||
}, | ||
"distribute": [ | ||
// Your distributors here | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} | ||
``` | ||
|
||
### Available Placeholders | ||
|
||
The format string supports the following placeholders: | ||
|
||
- `{CONTENT}`: The original content | ||
- `{CURATOR}`: The curator's username | ||
- `{CURATOR_NOTES}`: Any notes added by the curator | ||
- `{SUBMISSION_ID}`: The submission ID | ||
|
||
### Example Configuration | ||
|
||
Here's a real example from the cryptofundraise feed: | ||
|
||
```json | ||
{ | ||
"transform": { | ||
"plugin": "@curatedotfun/simple-transform", | ||
"config": { | ||
"format": "📝 new fundraising announcement, curated by *{CURATOR}*\n{CONTENT}\n📌 source: [View Post](https://x.com/x/status/{SUBMISSION_ID})" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters