Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vipin10100001/openai-chatbot-javascript
A simple chatbot which is built using Javascript and OpenAi API.
https://github.com/vipin10100001/openai-chatbot-javascript
chatbot chatgpt-api chatpgt openai openai-api
Last synced: 1 day ago
JSON representation
A simple chatbot which is built using Javascript and OpenAi API.
- Host: GitHub
- URL: https://github.com/vipin10100001/openai-chatbot-javascript
- Owner: vipin10100001
- Created: 2023-09-28T17:55:42.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-24T05:55:00.000Z (over 1 year ago)
- Last Synced: 2024-11-26T13:11:51.814Z (2 months ago)
- Topics: chatbot, chatgpt-api, chatpgt, openai, openai-api
- Language: JavaScript
- Homepage: https://openai-chatbot-javascript.vercel.app
- Size: 128 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OPEN-AI CHATBOT USING JAVASCRIPT
A simple chatbot made using JavaScript and OPENAI API.
## Axios Library usage
// Use axios library to make a POST request to the OpenAI API
const response = await axios.post(
"https://api.openai.com/v1/completions",
{
prompt: message,
model: "text-davinci-003",
temperature: 0,
max_tokens: 1000,
top_p: 1,
frequency_penalty: 0.0,
presence_penalty: 0.0,
},
{
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${apiKey}`,
},
});const chatbotResponse = response.data.choices[0].text;## Feedback
If you have any feedback, please reach out to us at [email protected]