Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions client/src/components/apps/AppApiExamples.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ url = '${window.location.origin}/api/apps/${app?.uuid}/run'

payload = {
"input": {
${Object.keys(app?.input_schema?.properties || {})
.map((k) => `"${k}": "<${k}_value>"`)
${app?.data.input_fields
.map(({ name }) => `"${name}": "<${name}_value>"`)
.join(",\n ")}
},
"stream": False,
Expand All @@ -53,8 +53,8 @@ url = '${window.location.origin}/api/apps/${app?.uuid}/run'

payload = {
"input": {
${Object.keys(app?.input_schema?.properties || {})
.map((k) => `"${k}": "<${k}_value>"`)
${app?.data.input_fields
.map(({ name }) => `"${name}": "<${name}_value>"`)
.join(",\n ")}
},
"stream": True,
Expand All @@ -75,8 +75,8 @@ for line in response.iter_lines():
--header 'Authorization: Token ${profile?.token}' \\
--data-raw '{
"input": {
${Object.keys(app?.input_schema?.properties || {})
.map((k) => `"${k}": "<${k}_value>"`)
${app?.data.input_fields
.map(({ name }) => `"${name}": "<${name}_value>"`)
.join(",\n ")}
},
"stream": false
Expand All @@ -88,8 +88,8 @@ for line in response.iter_lines():
--header 'Authorization: Token ${profile?.token}' \\
--data-raw '{
"input": {
${Object.keys(app?.input_schema?.properties || {})
.map((k) => `"${k}": "<${k}_value>"`)
${app?.data.input_fields
.map(({ name }) => `"${name}": "<${name}_value>"`)
.join(",\n ")}
},
"stream": true
Expand All @@ -101,8 +101,8 @@ const url = '${window.location.origin}/api/apps/${app?.uuid}/run';
const PROMPTLY_TOKEN = '${profile?.token}';
const payload = {
"input": {
${Object.keys(app?.input_schema?.properties || {})
.map((k) => `"${k}": "<${k}_value>"`)
${app?.data.input_fields
.map(({ name }) => `"${name}": "<${name}_value>"`)
.join(",\n ")}
},
"stream": false,
Expand All @@ -124,8 +124,8 @@ const url = '${window.location.origin}/api/apps/${app?.uuid}/run';
const PROMPTLY_TOKEN = '${profile?.token}';
const payload = {
"input": {
${Object.keys(app?.input_schema?.properties || {})
.map((k) => `"${k}": "<${k}_value>"`)
${app?.data.input_fields
.map(({ name }) => `"${name}": "<${name}_value>"`)
.join(",\n ")}
},
"stream": true,
Expand Down