Delphic Project Overview
Delphic is a user-friendly framework designed to help developers build and deploy Large Language Model (LLM) agents for analyzing and manipulating textual data from documents. While Delphic offers a robust proof of concept, it is recommended to explore the more modern OpenContracts application for production-ready environments, as Delphic is not actively maintained.
Key Features
- Integration with LlamaIndex: Delphic uses LlamaIndex to power LLM agents, offering seamless integration and deployment capabilities.
- Flexible Framework: The framework is compatible with Langchain, allowing for easy incorporation of other language models beyond OpenAI's API.
- Initial Focus on OpenAI: Delphic's first release heavily relies on OpenAI's API, which is renowned for its capability and ease of deployment. However, there is an intention to support other LLMs in future iterations.
Setting Up Delphic
Running Locally
To start using Delphic on your local machine, you need Docker and Docker Compose. A straightforward setup guide is as follows:
- Clone the Repository: Get the source code by cloning the repository.
- Directory Change: Navigate into the Delphic directory.
- Environment Configuration: Copy the provided sample environment files to the appropriate location and update any necessary configurations, such as your OpenAI API key.
- Docker Build: Build the Docker images using Docker Compose.
- Launch the Application: Once built, you can start the application by executing a specific Docker command. Access the front end at
localhost:3000
.
Development and Customization
For those interested in developing or modifying the frontend, it is recommended not to use the --profile=fullstack
flag to avoid frequent container rebuilds after each change. Instead, set up the development environment separately for more efficient changes.
Application Usage
User Setup
To use the application, you need to set up an authenticated user. Initially, create a Django superuser who has comprehensive permissions to manage users and data collections within the application.
- Create a Superuser: Follow the command provided to create a superuser, which involves setting up a username, email, and password.
- Additional User Management: Use the Django admin interface to add more users or manage their permissions.
Managing Collections
Note: Using OpenAI as your LLM engine will incur API costs. Users must comply with OpenAI's terms of service when integrating their API key.
To engage with the question-answering interface, start the fullstack and access it via http://localhost:3000
.
Development Environment Setup
If contributing or modifying Delphic, setting up the development environment is crucial:
Backend Setup
- Python Environment: Ensure a working Python environment, preferably using pyenv with Python version 3.10 or higher.
- Pre-Commit Checks: Install necessary dependencies and pre-commit tools for automatic code formatting and style checks.
Frontend Setup
The frontend is built using Node.js version 18.15.0, with nvm assumed for version management. Essential steps include:
- Dependency Installation: Use yarn to install necessary frontend packages.
- Development Server: Launch the development server to work on frontend tasks, making sure the backend is running for full functionality.
Overall, Delphic serves as an approachable framework for those seeking to deploy LLM agents with a straightforward initial setup and potential for future model integrations. However, users should be aware of current limitations and consider exploring more maintained alternatives for production use.