From 437ada7e3c1e7dce37b661116366cea3406affa7 Mon Sep 17 00:00:00 2001 From: Haouari haitam Kouider <57036855+haouarihk@users.noreply.github.com> Date: Tue, 16 Apr 2024 12:55:45 +0100 Subject: [PATCH] 0.1.0 --- manifest.json | 2 +- prompts/getPhoto.md | 2 +- prompts/getPhoto2.md | 2 +- prompts/getPhotos.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/manifest.json b/manifest.json index 9f9de23..e69b9dc 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "packageId": "dalle", "name": "OpenAI Dalle Package", - "version": "0.0.9", + "version": "0.1.0", "minTextGeneratorVersion": "0.7.0", "description": "The package contains some interessting Dalle-2/Dalle-3 prompt templates", "author": "Noureddine Haouari", diff --git a/prompts/getPhoto.md b/prompts/getPhoto.md index 2db2491..8725619 100644 --- a/prompts/getPhoto.md +++ b/prompts/getPhoto.md @@ -7,7 +7,7 @@ tags: - photo - dalle-3 version: 0.0.1 -sanatization_response: "// catch error\rif (res.status >= 300) {\r const err = data?.error?.message || JSON.stringify(data);\r throw err;\r}\r\r// get choices\rconst choices = data.data.map(c=> ({ type: \"image_url\", image_url: c.url}));\r\r// the return object should be in the format of \r// { content: string }[] \r// if there's only one response, put it in the array of choices.\rreturn choices;" +sanatization_response: "\r// catch error \rif (res.status >= 300) { \r const err = data?.error?.message || JSON.stringify(data); \r throw err; \r} \r\r// get choices\rtry{\rconst choices = data.data.map(c=> ({ type: \"image_url\", image_url: c.url})); \r // the return object should be in the format of // { content: string }[] \r // if there's only one response, put it in the array of choices. return choices;\r} catch{\r const err = data?.error?.message || JSON.stringify(data); \r throw err;\r}" provider: custom endpoint: https://api.openai.com/v1/images/generations body: '{n: 1, size: "1024x1024", prompt: "{{escp prompt}}", model: "dall-e-3"}' diff --git a/prompts/getPhoto2.md b/prompts/getPhoto2.md index 7876072..033f9b1 100644 --- a/prompts/getPhoto2.md +++ b/prompts/getPhoto2.md @@ -7,7 +7,7 @@ tags: - photo - dalle-2 version: 0.0.1 -sanatization_response: "// catch error\rif (res.status >= 300) {\r const err = data?.error?.message || JSON.stringify(data);\r throw err;\r}\r\r// get choices\rconst choices = data.data.map(c=> ({ type: \"image_url\", image_url: c.url}));\r\r// the return object should be in the format of \r// { content: string }[] \r// if there's only one response, put it in the array of choices.\rreturn choices;" +sanatization_response: "\r// catch error \rif (res.status >= 300) { \r const err = data?.error?.message || JSON.stringify(data); \r throw err; \r} \r\r// get choices\rtry{\rconst choices = data.data.map(c=> ({ type: \"image_url\", image_url: c.url})); \r // the return object should be in the format of // { content: string }[] \r // if there's only one response, put it in the array of choices. return choices;\r} catch{\r const err = data?.error?.message || JSON.stringify(data); \r throw err;\r}" provider: custom endpoint: https://api.openai.com/v1/images/generations body: '{n: 1, size: "1024x1024", prompt: "{{escp prompt}}", model: "dall-e-2"}' diff --git a/prompts/getPhotos.md b/prompts/getPhotos.md index 9a29978..431c8d1 100644 --- a/prompts/getPhotos.md +++ b/prompts/getPhotos.md @@ -7,7 +7,7 @@ tags: - photo - dalle-2 version: 0.0.1 -sanatization_response: "// catch error\rif (res.status >= 300) {\r const err = data?.error?.message || JSON.stringify(data);\r throw err;\r}\r\r// get choices\rconst choices = data.data.map(c=> ({ type: \"image_url\", image_url: c.url}));\r\r// the return object should be in the format of \r// { content: string }[] \r// if there's only one response, put it in the array of choices.\rreturn choices;" +sanatization_response: "\r// catch error \rif (res.status >= 300) { \r const err = data?.error?.message || JSON.stringify(data); \r throw err; \r} \r\r// get choices\rtry{\rconst choices = data.data.map(c=> ({ type: \"image_url\", image_url: c.url})); \r // the return object should be in the format of // { content: string }[] \r // if there's only one response, put it in the array of choices. return choices;\r} catch{\r const err = data?.error?.message || JSON.stringify(data); \r throw err;\r}" provider: custom endpoint: https://api.openai.com/v1/images/generations body: '{n: 4, size: "1024x1024", prompt: "{{escp prompt}}", model: "dall-e-2"}'