Skip to content

z-institute/Auto-finetune-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auto Fine-tune Bot

Add Line bot to your contact

Line Bot ID: @368ivokx

Update Fine Tuning Data in Line Bot

  • Enter any message to initialize the Line bor
  • Follow the Instruction on Line Bot
  • Get API Key in Openai API

Here are some examples

  • Enter any message at initial stage img

  • Update your base model or use default model: gpt-3.5-turbo img

  • Update your OpenAI API key (required) img

  • Update the instruction for the model (required) img

  • Update the conversation data (at least 10 to fine-tune) img

  • Delete the conversation data whenever you want img

  • Check if all requirements have been completed with check data img

  • After all requirements have been completed, you can fine-tune the model. The chatbot will check required data in advance to avoid error in fine-tuning. img

  • If you passed the checking process, the model will start fine-tuning and return the status every minute. The process usually takes 5-10 minutes with 10 coversation data and the time will increase with the amount of conversation data. img

  • You can see the fine tuning process in Openai platform as well. img

  • You can chat with the existing model or your own model (required data: API Key and Instruction)

    • Chat with gpt-3.5-turbo img img
    • Chat with your own model img
    • Press "Back to main page" whenever you want to stop chatting img

You can also run your own bot

Clone the repository

git clone https://github.com/z-institute/Auto-finetune-bot.git

Create a Line Bot

  • Register on the Line Developer website
  • Go to "Providers" and click "Create" to create a new provider
  • Create a new channel for Line bot
  • Find "Bot basic ID" in "Messageing API" Page, and add your Line bot to contact by this ID
  • Go to Line Official Account Manage Page
  • Disable automatic response messages to avoid original auto messages

set .env file

  • create an empty .env file in your folder
  • Back to Line Developer website
  • Go to "Basic Setting" in your Line bot, and you will see "channel secret"
  • Put your channel secret in .env file, the variable nane: LINE_CHANNEL_SECRET
  • Go to "Messaging API" to get "Channel Access Token"
  • Put your channel access token in .env file, the variable nane: LINE_ACCESS_TOKEN

Get a public URL from ngrok

  • Register on the ngrok
  • Go to "Setup & Installation" and follow the instruction to download ngrok to local
  • After this step, you can get a public URL by running ngrok http http://127.0.0.1:5000 in your terminal
  • Update the "Webhook URL" in "Messaging API" from Line Developer website, remember to add /callback at the end of the URL
  • You should update the URL everytime you run ngrok

Run Line bot

  • Access to the line bot folder cd bot
  • Run the Line bot in terminal python3 line_bot.py
  • Now, open Line and Update your data with Line bot

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages