emilia-bot

command module
v0.0.0-...-cb0babb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Emilia AI - ChatGPT Bot Telegram

Ini adalah bot Telegram yang dibuat dengan ChatGPT dan Golang. Bot ini menggunakan model bahasa GPT-3 Turbo OpenAI untuk menghasilkan respons pesan pengguna secara real-time.

Prerequisites

Untuk menjalankan bot ini, Anda harus memiliki perangkat lunak berikut yang terinstal di sistem Anda:

  • Go language (versi terbaru)

Features

  • Menghasilkan respons seperti manusia terhadap pesan pengguna menggunakan ChatGPT API
  • Menyimpan pesan pengguna dengan sqlite
  • Dukungan Telegram
  • Dibangun dengan Go untuk kinerja yang cepat dan efisien?

Sebelum Anda dapat menggunakan bot, Anda harus membuat bot Telegram menggunakan kerangka kerja BotFather. Setelah Anda membuat bot dan mendapatkan token API, Anda juga memerlukan API key dari OpenAI

Copy .env.example dengan perintah berikut

mv .env.example .env

# Atau

cp .env.example .env

Ini adalah contoh file .env

TELEGRAM_API_KEY=""
OPENAI_TOKEN=""
RETAIN_HISTORY="false"

RETAIN_HISTORY="true" mengirimkan percakapan sebelumnya dengan teks saat ini, lihat di sini, tetapi jika false, ini hanya mengirimkan prompt + teks pengguna saat ini, hal ini mengurangi jumlah token yang dikirim per permintaan.

membuat prompt.txt atau mengganti nama file contoh

$ mv prompt.example.txt prompt.txt

# Atau

$ cp prompt.example.txt prompt.txt

prompt membantu Anda menyesuaikan bagaimana bot akan bereaksi terhadap pesan

Installing

Pertama, clone repositori ini:

$ git clone https://github.com/rakarmp/emilia-bot.git

Lalu, arahkan ke direktori project:

$ cd emilia-bot

Terakhir Bangun Project Dan Run:

$ go build -o file_name

$ ./file_name

License

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

Resources

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址