Skip to content

CLI tool for generating and using custom OpenAI models

License

Notifications You must be signed in to change notification settings

Swafox/trainify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Trainify
Trainify

CLI tool for generating and using custom AI models

Typescript

White paperSetupUsageReleaseCreditsLicense

White paper

Concept

Trainify makes it easy to create and use custom AI models. It is built using Typescript and Deno runtime. Deno is secure by default and allows trainify to stay lightweight. Apart from creating models, trainify removes the necessary effort to set up infrastructure for using the generated models. Within 4 commands, trainify creates an API server to be used with any existing application.

All functions are executed locally and do not require any external services. The only exception is the OpenAI API, which is used to train the models. The API key is stored locally in the .env file.

Commands follow a human-native structure. For example, to list all custom models, you would run trainify list models. The same applies to other commands. This makes it easy to remember and use.

Further development

List of core functionality that is currently in progress:

  • API server for interacting with custom models
  • Cost calculation
  • Sync with local/external database
  • Manual data entry
  • Implement the prepare file from OpenAI tools to verify files
  • Add organization support
  • Error handling and input serialization
  • Moderation module for user input to prevent hateful, offensive, or other content that violates the terms of service

Disclaimer

Trainify is in early stages of development and works only with correct syntax. Most functions will output the entire response from the OpenAI API. This is to make it easier to debug and understand the API. In the future, this will be changed to a more user-friendly output. Furthermore, the code is not optimized and will be improved in the future. At the moment, the focus is on functionality.

Setup

To run trainify, you'll need to install Git and Deno. Additionally, generate an OpenAI API Key

# Clone this repository
$ git clone https://github.com/Swafox/trainify.git

# Create the .env file and fill the API key

cp .env.example .env

# Run the initialization script
trainify init

Usage

Add deno run --allow-all before every command. E.g.: deno run --allow-all trainify.ts help

Models

trainify list models # List all custom models
trainify create <file_id> # Create a new model with a training file
trainify get model <id> # Get information about a custom model
trainify cancel <id> # Cancel a model training
trainify ask <name> <prompt> # Ask a question to the custom model

Files

trainify upload <file_path> # Upload a file to OpenAI
trainify delete file <file_id> # Delete a file
trainify list files # List all files
trainify get file <file_id> # Get information about a file

Utility

trainify help # Show help
trainify version # Show version
trainify config # Show current config

Release

Run the following command to build the project:

deno compile trainify.ts

Credits

This software uses the following technologies:

License

GNU General Public License v3.0

Author

swafox.com  ·  GitHub @Swafox  ·  Twitter @swafox_

About

CLI tool for generating and using custom OpenAI models

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published