Getting Started¶
Running the Wikipedia generation example¶
Join our Discord server to ask questions or get involved in our project!
To get an idea of what CELI can do, we have prepackaged an example use case. In this case, we will have CELI write a wiki page on a topic given an example page and a set of references.
Install CELI¶
First, install celi using PIP with the following command:
pip install celi-framework
You can also clone the GitHub repo and install CELI from source. See Running CELI from Source for info on how to do that.
Set up a mongo DB server to store documents¶
CELI uses Mongo to cache LLM responses, store documentsm inspect runs. If you already have a Mongo server running, you can point Celi to it and it will create a new database called ‘celi’. If not, you can quickly spin up a local mongo server using this docker command:
docker run --name mongodb -p 27017:27017 -d mongo
Configure your environment¶
The main script for CELI loads some configuration from environment variables. The python-dotenv
package is used to load these files from a file called .env
in the current directory.
Create a .env file with an example configuration, copying the file below and substituting in your OpenAI API key. If you have the repo cloned, you can copy the .env.example file.
OPENAI_API_KEY=<REPLACE WITH YOUR OPENAI API KEY>
OUTPUT_DIR=target/celi_output
DB_URL=mongodb://localhost:27017/
EXTERNAL_DB=True
NO_MONITOR=True
JOB_DESCRIPTION=celi_framework.examples.wikipedia.job_description.job_description
TOOL_CONFIG_JSON=celi_framework/examples/wikipedia/example_config.json
PARSER_MODEL_CLASS=llm_core.parsers.OpenAIParser
PARSER_MODEL_NAME=gpt-3.5-turbo-16k
Run the example use case¶
Once you have the steps above done, you can test your setup by running:
python -m celi_framework.main
This example use case uses the wikipedia page for Led Zeppelin as the example document, and then creates a new wiki page for the Jonas Brothers based on the references cited from their wikipedia page. The result will be put in the target/drafts
directory.
Note that running this takes around 30 minutes (give or take).