Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

testing chatgpt logic

Daniel Avila39781f531821
diff --git a/app/chatgpt.js b/app/chatgpt.js
new file mode 100644
index 0000000000..8e1dbcf450
--- /dev/null
+++ b/app/chatgpt.js
@@ -0,0 +1,10 @@
+require('dotenv').config();
+(async () => {
+ const { ChatGPTAPI } = await import('chatgpt');
+
+ const api = new ChatGPTAPI({ apiKey: process.env.OPENAI_KEY });
+
+ // send a message and wait for the response
+ let res = await api.sendMessage('What is OpenAI?');
+ console.log(res);
+})();