Phidata is an open-source project and we welcome contributions.
Please follow the fork and pull request workflow:
- Fork the repository.
- Create a new branch for your feature.
- Add your feature or improvement.
- Send a pull request.
- We appreciate your support & input!
- Clone the repository.
- Create a virtual environment using the
./scripts/create_venv.sh
script. This will:- Create a
phienv
virtual environment in the current directory. - Install the required packages.
- Install the
phidata
package in editable mode.
- Create a
- Activate the virtual environment using
source phienv/bin/activate
.
We provide a ./scripts/format.sh
script that runs ruff
, mypy
and pytest
.
Please run this script before submitting a pull request.
- Setup your local environment by following the Development setup.
- Create a new directory under
phi/vectordb
for the new vector database. - Create a Class for your VectorDb that implements the
VectorDb
interface- Your Class will be in the
phi/vectordb/<your_db>/<your_db>.py
file. - The
VectorDb
interface is defined in `phi/vectordb/base - Import your
VectorDb
Class inphi/vectordb/<your_db>/__init__.py
. - Checkout the
phi/vectordb/pgvector
directory for an example.
- Your Class will be in the
- Add a recipe for using your
VectorDb
undercookbook/<your_db>
.- Checkout
phidata/cookbook/pgvector
for an example (you do not need to add theresources.py
file).
- Checkout
- Important: Format and validate your code by running
./scripts/format.sh
. - Submit a pull request.
- Setup your local environment by following the Development setup.
- Create a new directory under
phi/llm
for the new LLM provider. - If the LLM provider supports the OpenAI API spec:
- Create a Class for your LLM provider that inherits the
OpenAILike
Class fromphi/llm/openai/like.py
. - Your Class will be in the
phi/llm/<your_llm>/<your_llm>.py
file. - Import your Class in the
phi/llm/<your_llm>/__init__.py
file. - Checkout the
phi/llm/together/together.py
file for an example.
- Create a Class for your LLM provider that inherits the
- If the LLM provider does not support the OpenAI API spec:
- Reach out to us on Discord or open an issue to discuss the best way to integrate your LLM provider.
- Add a recipe for using your LLM provider under
cookbook/<your_llm>
.- Checkout
phidata/cookbook/together
for an example.
- Checkout
- Important: Format and validate your code by running
./scripts/format.sh
. - Submit a pull request.
Message us on Discord if you have any questions or need help with credits.
This project is licensed under the terms of the MIT license