mypiper commited on
Commit
ce4ba97
·
verified ·
1 Parent(s): 0a479db

Update gpt4free.yaml

Browse files
Files changed (1) hide show
  1. gpt4free.yaml +10 -10
gpt4free.yaml CHANGED
@@ -1,10 +1,10 @@
1
  _id: gpt4free
2
  author: Anton Breslavskii | https://github.com/breslavsky
3
  description: Free generative AI service providers
4
- readme: Added ask LLM agent
5
  title: GPT for free
6
  url: https://huggingface.co/PiperMy/Node-Packages/resolve/main/gpt4free.yaml
7
- version: 11
8
  nodes:
9
  ask_llm_agent_gpt4free:
10
  _id: ask_llm_agent_gpt4free
@@ -139,14 +139,14 @@ nodes:
139
  export async function run({ inputs }) {
140
 
141
  const { NextNode } = DEFINITIONS;
142
- const { model, instructions, question } = inputs;
143
 
144
  const { data } = await httpClient({
145
  method: 'post',
146
  url: `http://${NODE_ENV === 'test' ? '0.0.0.0:8080' : 'gpt4free:1337'}/v1/chat/completions`,
147
  timeout: 60000,
148
  data: {
149
- model: model || 'gpt-4o-mini',
150
  stream: false,
151
  messages: [
152
  ...(!!instructions ? [{
@@ -156,7 +156,7 @@ nodes:
156
  ...[
157
  {
158
  role: 'user',
159
- content: question || 'Are you AI?'
160
  }
161
  ]
162
  ]
@@ -171,7 +171,7 @@ nodes:
171
  }
172
  source: catalog
173
  title: en=Ask LLM agent for free;ru=Спросить LLM агента бесп.
174
- version: 1
175
  generate_image_gpt4free:
176
  _id: generate_image_gpt4free
177
  arrange:
@@ -221,15 +221,15 @@ nodes:
221
  export async function run({ inputs }) {
222
 
223
  const { NextNode } = DEFINITIONS;
224
- const { model, prompt } = inputs;
225
 
226
  const { data } = await httpClient({
227
  method: 'post',
228
  url: `http://${NODE_ENV === 'test' ? '0.0.0.0:8080' : 'gpt4free:1337'}/v1/images/generate`,
229
  timeout: 60000,
230
  data: {
231
- model: model || 'flux-dev',
232
- prompt: prompt || 'superhero game card',
233
  response_format: 'b64_json'
234
  },
235
  headers: {
@@ -242,4 +242,4 @@ nodes:
242
  }
243
  source: catalog
244
  title: en=Generate image for free;ru=Генерация изобр. бесп.
245
- version: 5
 
1
  _id: gpt4free
2
  author: Anton Breslavskii | https://github.com/breslavsky
3
  description: Free generative AI service providers
4
+ readme: Small internal refactor
5
  title: GPT for free
6
  url: https://huggingface.co/PiperMy/Node-Packages/resolve/main/gpt4free.yaml
7
+ version: 12
8
  nodes:
9
  ask_llm_agent_gpt4free:
10
  _id: ask_llm_agent_gpt4free
 
139
  export async function run({ inputs }) {
140
 
141
  const { NextNode } = DEFINITIONS;
142
+ const { model = 'gpt-4o-mini', instructions, question = 'Are you AI?' } = inputs;
143
 
144
  const { data } = await httpClient({
145
  method: 'post',
146
  url: `http://${NODE_ENV === 'test' ? '0.0.0.0:8080' : 'gpt4free:1337'}/v1/chat/completions`,
147
  timeout: 60000,
148
  data: {
149
+ model,
150
  stream: false,
151
  messages: [
152
  ...(!!instructions ? [{
 
156
  ...[
157
  {
158
  role: 'user',
159
+ content: question
160
  }
161
  ]
162
  ]
 
171
  }
172
  source: catalog
173
  title: en=Ask LLM agent for free;ru=Спросить LLM агента бесп.
174
+ version: 2
175
  generate_image_gpt4free:
176
  _id: generate_image_gpt4free
177
  arrange:
 
221
  export async function run({ inputs }) {
222
 
223
  const { NextNode } = DEFINITIONS;
224
+ const { model = 'flux-dev', prompt = 'superhero game card' } = inputs;
225
 
226
  const { data } = await httpClient({
227
  method: 'post',
228
  url: `http://${NODE_ENV === 'test' ? '0.0.0.0:8080' : 'gpt4free:1337'}/v1/images/generate`,
229
  timeout: 60000,
230
  data: {
231
+ model,
232
+ prompt,
233
  response_format: 'b64_json'
234
  },
235
  headers: {
 
242
  }
243
  source: catalog
244
  title: en=Generate image for free;ru=Генерация изобр. бесп.
245
+ version: 6