Skip to content

frankliniwobi/larachat-gpt

Repository files navigation

Lara Chat GPT


Lara Chat GPT is a project that help developers to be more efficient by assessing AI on the command line without needing to leave their code base.

Get Started

Requires PHP 8.1+

First, clone this repo:

git clone https://github.com/frankliniwobi/larachat-gpt.git

Next, install dependencies via composer :

composer install 

Next, build assets via npm :

npm install && npm run build

Next, copy the env.example file to a .env file :

cp .env.example .env

Next, set your OpenAI key and Organization key :

OPENAI_API_KEY=sk-...
OPENAI_ORGANIZATION=org-...

Finally, generate application key:

php artisan key:generate

Usage

Chat with AI on the terminal

After carrying out the steps above, you can then start a chat session by opening your terminal and running the following artisan command

php artisan chat

You can also prompt the AI to act or respond a certain way by providing the optional system flag. For example, I want my AI to act as a poet

php artisan chat --system="You are a professional poet"

Or as a programmer

php artisan chat --system="You are a talented programmer"

Configuration

OpenAI API Key and Organization

Specify your OpenAI API Key and organization. This will be used to authenticate with the OpenAI API - you can find your API key and organization on your OpenAI dashboard, at https://openai.com. Log into your OpenAI account and get the keys.

OPENAI_API_KEY=
OPENAI_ORGANIZATION=

Lara Chat GPT is free for use.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages