Welcome to the exciting world of Delphic, a simple framework designed for building and deploying Large Language Model (LLM) agents capable of analyzing and manipulating text data from various documents. While it’s important to note that Delphic is not actively maintained and is based solely on OpenAI’s API, this framework serves as a robust proof of concept. In this guide, we’ll take you through the setup process, using the application, and essential troubleshooting tips.
Getting Setup
Ready to dive into building your application? Let’s start with the prerequisites and steps to get Delphic up and running.
Word of Caution
- This initial release revolves around OpenAI’s API. Please ensure their terms of service align with your usage plans, as any interaction with the API will incur costs.
- The future promise of the framework is its compatibility with multiple LLMs, but currently, text processing will exclusively involve OpenAI.
Getting Started Locally
Just Run the Application
To deploy Delphic locally with ease, you’ll need Docker and Docker Compose. For detailed setup instructions, check out the DigitalOcean’s guide or the official Docker instructions.
- First, clone the repository:
- Navigate into the directory:
- Copy the sample env files:
- Update your .django configuration with your OPENAI API KEY.
- Build the docker images:
- Launch the application:
- Visit http://localhost:3000 to access the frontend.
git clone https://github.com/your-repository/delphic.git
cd delphic
mkdir -p ../envs.local
cp -a .docs/sample_envs/local.frontend .frontend
cp -a .docs/sample_envs/local.django ../envs.local
cp -a .docs/sample_envs/local.postgres ../envs.local
sudo docker-compose --profile fullstack -f local.yml build
sudo docker-compose --profile fullstack -f local.yml up
I Want to Develop Modify the Frontend
If you’re keen on modifying the frontend and want faster iteration, avoid the –profile=fullstack flag.
Production Deployment
For those looking to deploy Delphic on the internet using a proper domain, additional configurations will be necessary. Documentation for this will be provided in the future.
Using the Application
Setup Users
To utilize Delphic effectively, you need to set up user accounts. Here’s how you can do it:
Setting Up a Django Superuser
- Create a superuser:
- Follow the prompts to set your username, email, and password.
sudo docker-compose -f local.yml run django python manage.py createsuperuser
Keep in mind, all logged-in users currently possess full permissions, and proper roles-based control measures will be implemented in the future.
Creating and Querying a Collection
To engage with the application’s question-answering interface, ensure you bring up the fullstack before accessing http://localhost:3000.
Warning: Interacting with collections using OpenAI’s LLM will cost credits, so tread carefully!
Development Environment
Backend Setup
To run pre-commit checks, set up a working Python environment:
pip install -r .requirements/local.txt
pre-commit install
Your code formatting and style checks will run automatically on staging commits.
Frontend Setup
To get started with the frontend, follow these steps:
cd frontend
nvm use
npm install
yarn install
yarn start
Remember, the backend must be operational for the frontend to function correctly.
Troubleshooting
If you encounter issues during setup or usage, consider the following troubleshooting tips:
- Ensure Docker and Docker Compose are installed correctly.
- Double-check your API keys and configuration settings.
- If permissions seem off, revisit the user setup process to ensure accurate configurations.
- For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.
Now go ahead and immerse yourself in building advanced LLM applications with Delphic! Happy coding!