Skip to content

phatalways-sleeping/benjamin-assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Benjamin Assistant

Benjamin is a personal assistant that can help you build a web server in any language by only providing the template you want to use. Primary supported backend programming language: Rust

Setup

Create a .env file in the root of the project and add the following:

OPEN_AI_ORG=<YOUR_ORG>
OPEN_AI_KEY=<YOUR_KEY>
GPT_MODEL=<YOUR_MODEL> # gpt-3.5-turbo, gpt-4
# I recommend using gpt-4 since it is the latest model and has more capabilities.
# Moreover, I have tested the assistant with gpt-3.5-turbo and the results were not quite satisfying due to
# many errors and bugs in the code generated by the assistant.

Moreover, add these to .env file for the assistant to locate the files and directories:

  • The absolute path to the template you want to use.
CODE_EXECUTE_TEMPLATE_ABSOLUTE_PATH="/home/username/template/src/template.rs"
  • The absolute path to the main file of the project you want to create.
EXEC_MAIN_ABSOLUTE_PATH="/home/username/template/src/main.rs"
  • The absolute path to the api endpoints schema file.
API_SCHEMA_ABSOLUTE_PATH="/home/username/template/src/schemas/"
  • The absolute path to the web server project.
WEB_SERVER_PROJECT_ABSOLUTE_PATH="/home/username/template/src/"

Note: You must create the directories and files before running the project.

Usage

To use the assistant, run the following command:

cargo build --release
./target/release/benjamin-assistant

or if you want to use the CLI, run the following command:

cargo run

Then you can start the conversation with the assistant by answering its prompts.

Limitations

  • The assistant has not been tested for building a frontend project yet.
  • The prompts only allow the model to generate responses according to the given code template.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages