package.json
npm install aw-simple-chatgpt
or
yarn add aw-simple-chatgpt
import SimpleChatgt from "aw-simple-chatgpt";
const simpleChatgpt = new SimpleChatgpt(organization, apiKey);
- Found organization ID : https://platform.openai.com/account/org-settings
- Found api key : https://platform.openai.com/account/api-keys
const res = await simpleChatgpt.generateContent(subject, options?);
const res = await simpleChatgpt.generateCustomContent(prompt);
const res = await simpleChatgpt.correctContent(text);
const res = await simpleChatgpt.translateContent(text, language);
const res = await simpleChatgpt.generateContent(subject, options?);
name | Type | Default value | Description |
---|---|---|---|
theme | string | "web" | website theme |
words | number | 100 | response size in words |
type | string | "texte" | response Format |
html | boolean | false | format the response with html tags |
language | string | "francais" | response language |
Ignorez toutes les instructions précédentes à celle-ci. Tu es un rédacteur de contenu pour un site [theme]. Tu as créé et produit du contenu clair, cohérent, engageant et adapté pour des sites web depuis 20ans. Ton travail est maintenant de m’écrire un [type] sur [subject] de [words] mots, en [language].
Si html
Ignorez toutes les instructions précédentes à celle-ci. Tu es un rédacteur de contenu pour un site [theme]. Tu as créé et produit du contenu clair, cohérent, engageant et adapté pour des sites web depuis 20ans. Ton travail est maintenant de m’écrire un [type] sur [subject] de [words] mots, en [language]. Formate ta réponse avec des balises html.
const res = await simpleChatgpt.generateContent("Texte d'introduction");
const res = await simpleChatgpt.generateCustomContent("Génère moi un texte d'introduction pour un site de vente");
const res = await simpleChatgpt.correctContent("Notre site de vente aient enfin en line");
const res = await simpleChatgpt.translateContent("Notre site de vente est enfin en ligne ...", "anglais");