gustabin/chatgpt-php

Chatbot using openai API chatgpt in PHP

Installs: 8

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Language:HTML

Type:project

dev-main 2023-07-20 00:48 UTC

This package is auto-updated.

Last update: 2024-05-20 02:33:40 UTC


README

Description

This is a simple chatbot that uses the OpenAI API to generate responses based on user-input messages. The chatbot is capable of generating coherent and relevant text, maintaining conversation context, and performing specific tasks.

Usage

  1. Clone this repository.
  2. Open the index.html file in your web browser.
  3. Interact with the chatbot by entering messages in the input field and clicking "Send."

Files

  • index.html: Main file containing the chatbot's interface.
  • chat.js: Script for the chat's functionality.
  • chatApi.js: Script to make requests to the OpenAI API and obtain chatbot responses.
  • chatHistory.js: Chat history to keep a record of conversations.
  • chat.php: PHP file to process chatbot requests to the OpenAI API.

Credits

Notes

Free preview. ChatGPT may produce inaccurate information about people, places, or facts.

License

This project is under the MIT License. See the LICENSE file for more details.

Installation

composer create-project gustabin/chatgpt-php