Create gpt4free.yaml
Browse files- gpt4free.yaml +63 -0
gpt4free.yaml
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
_id: gpt4free
|
| 2 |
+
author: Anton Breslavskii | https://github.com/breslavsky
|
| 3 |
+
description: Free generative AI service providers
|
| 4 |
+
readme: Testing release v5
|
| 5 |
+
title: GPT for free
|
| 6 |
+
url: https://huggingface.co/PiperMy/Node-Packages/resolve/main/gpt4free.yaml
|
| 7 |
+
version: 8
|
| 8 |
+
nodes:
|
| 9 |
+
generate_image_gpt4free:
|
| 10 |
+
_id: generate_image_gpt4free
|
| 11 |
+
arrange:
|
| 12 |
+
x: 240
|
| 13 |
+
y: 160
|
| 14 |
+
category:
|
| 15 |
+
id: generate_images
|
| 16 |
+
title: en=Generate images;ru=Генерация изображений
|
| 17 |
+
environment: {}
|
| 18 |
+
inputs:
|
| 19 |
+
prompt:
|
| 20 |
+
title: Prompt
|
| 21 |
+
type: string
|
| 22 |
+
required: true
|
| 23 |
+
multiline: true
|
| 24 |
+
default: cat at a moon
|
| 25 |
+
model:
|
| 26 |
+
title: Model
|
| 27 |
+
type: string
|
| 28 |
+
default: flux
|
| 29 |
+
enum:
|
| 30 |
+
- flux|Flux
|
| 31 |
+
- flux-pro|Flux Pro
|
| 32 |
+
- flux-dev|Flux Dev
|
| 33 |
+
outputs:
|
| 34 |
+
image:
|
| 35 |
+
title: Image
|
| 36 |
+
type: image
|
| 37 |
+
provider:
|
| 38 |
+
title: Provider
|
| 39 |
+
type: string
|
| 40 |
+
package: gpt4free
|
| 41 |
+
script: |
|
| 42 |
+
(async () => {
|
| 43 |
+
|
| 44 |
+
const { prompt, model } = inputs;
|
| 45 |
+
|
| 46 |
+
const {data: {provider, data: [{ b64_json }]}} = await httpClient({
|
| 47 |
+
method: 'post',
|
| 48 |
+
url: `http://${NODE_ENV === 'test' ? '0.0.0.0' : 'gpt4free'}:1337/v1/images/generate`,
|
| 49 |
+
timeout: 20000,
|
| 50 |
+
data: {
|
| 51 |
+
prompt,
|
| 52 |
+
model: model || 'flux',
|
| 53 |
+
response_format: 'b64_json'
|
| 54 |
+
},
|
| 55 |
+
headers: {
|
| 56 |
+
'Content-Type': 'application/json',
|
| 57 |
+
}
|
| 58 |
+
});
|
| 59 |
+
return next({outputs: {image: Buffer.from(b64_json, 'base64'), provider}});
|
| 60 |
+
})();
|
| 61 |
+
source: catalog
|
| 62 |
+
title: en=Generate image for free;ru=Генерация изображения бесплатно
|
| 63 |
+
version: 5
|