Skip to content

aberaud/gpt-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GPT-Agent: A simple agent using OpenAI APIs

Environement (.env)

Put the required API keys in the file .env (VAR=VALUE, one per line).

Required:

  • OPENAI_API_KEY: OpenAI API key
  • OPENAI_ORG_ID: OpenAI organization ID

Optional:

  • SERPAPI_KEY: SerpAPI key
  • GOOGLE_API_KEY: Google API key
  • GOOGLE_SEARCH_ID: Google search ID

Usage

Using docker compose (recommended)

docker-compose build
docker-compose up

Using docker directly

You can place your .env file in the app directory.

docker build -t gpt-agent .
docker run -p 8080:8080 -v $(pwd)/results:/project -it gpt-agent

Run locally

Note that running the agent outside of a container is not recommended.

Install the dependencies using pip:

pip install -r requirements.txt
python3 app/agent.py