Skip to content

Kyo-Development/chatbot_OpenAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Screenshot (run in terminal)

Screen Shot
chatgpt-chatbot/
│
├── config/
│   └── open-ai.js           # Configuration for OpenAI API client
│
├── node_modules/             # Node.js dependencies (auto-generated, no need to edit manually)
│
├── .env                      # Environment variables, storing sensitive information like the OpenAI API key (should be ignored in .gitignore)
├── .gitignore                # List of files to ignore, such as .env and node_modules
├── chat_history.txt          # File recording the history of all chatbot conversations (optional)
├── index.js                  # Main program entry, contains chatbot logic
├── package.json              # Project dependencies and script definitions
├── package-lock.json         # Dependency descriptor file with exact version locking
└── README.md                 # Project documentation file (optional)

🚀 Custom Chatbot using OpenAI API

This project is a custom-built chatbot that leverages the powerful capabilities of the OpenAI API to engage in meaningful and dynamic conversations. The chatbot is designed to handle user queries in real-time, generating intelligent and context-aware responses.


✨ Features

  • 🤖 Integrates with OpenAI's GPT-4o-mini model for natural language processing.
  • 📝 Supports conversation history to maintain context throughout interactions.
  • 🎨 User-friendly terminal interface with color-coded input and output.
  • 🔧 Easily customizable and extensible for various use cases, including customer support, personal assistants, or educational tools.

⚙️ Requirements

  • Node.js
  • OpenAI API Key

📦 NPM Packages:

  • openai
  • readline-sync
  • colors
  • dotenv

🛠️ How to Use

  1. Clone the repository:
    git clone https://github.com/Kyo-Development/chatbot_OpenAI.git
    cd chatbot_OpenAI
    

Install the required dependencies:

npm install

Set up your OpenAI API key in a .env file:

OPENAI_API_KEY=your-openai-api-key

Run the chatbot in the terminal:

npm start

🚀 OpenAI APIを利用したカスタムチャットボット

このプロジェクトは、カスタム構築されたチャットボットであり、OpenAI API の強力な機能を活用して、意味のある動的な会話を行います。このチャットボットは、リアルタイムでユーザーの質問に対応し、知的で文脈に基づいた応答を生成するように設計されています。

✨ 特徴

🤖 OpenAIのGPT-4o-miniモデルと統合し、自然言語処理を実現。 📝 会話履歴をサポートして、インタラクション全体の文脈を維持。 🎨 入力と出力を色分けしたユーザーフレンドリーなターミナルインターフェース。 🔧 カスタマイズや拡張が容易で、カスタマーサポート、個人アシスタント、教育ツールなどの多様なユースケースに対応可能。 ⚙️ 必要条件

Node.js OpenAI APIキー 📦 必要なNPMパッケージ: openai readline-sync colors dotenv 🛠️ 使い方

リポジトリをクローンします:

git clone https://github.com/Kyo-Development/chatbot_OpenAI.git
cd chatbot_OpenAI

🚀 使用 OpenAI API 的自訂聊天機器人

這個專案是一個自訂構建的聊天機器人,利用 OpenAI API 的強大功能來進行有意義且動態的對話。這個聊天機器人旨在即時處理用戶的查詢,生成智能且具上下文的回應。

✨ 功能特色

🤖 整合了 OpenAI 的 GPT-4o-mini 模型,實現自然語言處理。 📝 支援對話歷史,可在互動中保持上下文連貫性。 🎨 使用者友好的終端介面,具有顏色區分的輸入與輸出。 🔧 容易定制和擴展,可應用於客戶支持、個人助理或教育工具等多種場景。 ⚙️ 系統需求

Node.js OpenAI API 金鑰 📦 NPM 套件: openai readline-sync colors dotenv 🛠️ 使用方式

克隆此儲存庫:

git clone https://github.com/Kyo-Development/chatbot_OpenAI.git
cd chatbot_OpenAI

About

custom chatbot used by OpenAI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published