* 🧪 asyncify tests * ✨ asyncify client * Basic Test for Page based pagination * add sync buildstep and client * add vscode DX * Added Testing for generators and updated examples * feat: example updates * readme exists now * Stylistic changes and generic message * Metamessages with other refactoring - untested * Work with unit tests * Fix Examples * MEME-78 Update Changelogs * Docstrings to client * 🧪 autogenerate sync tests * test one * add db type * sync client * add status badge * add coverage * add file * give perms * properly output coverage * split test and coverage * rename action * 🧪 autogenerate sync tests (#16) * Vector Support (#18) * Scaffold for PGVector support * Buggy crud with logic skeleton on api * Crud logic and schema definition for pgvector * Populate all routes and refactor to name Collection * vince's progress * AsyncCollection progress * Local PGVector Docker Container * client methods for sdk except document delete and update * Vector Support Passing All Test Cases * Docs Updates --------- Co-authored-by: vintro <vince@plasticlabs.ai> * Add reverse parameters for paginated routes * Address dependabot * Formatting * initial commit on honcho dspy personas * working, hit token limit and can't test dspy optimization * initial version working, need to test optimization * optimizers working, but appending any example * ready for user object (tbomk) * Revert "add test actions and coverage" * Refactor to add User and App Tables * User Object passing test cases * Update examples * DSPy Todo and documentation updates * Add is_active filtering * Add is_active filtering to the generator * Fix update user metadata * working, but weird compiler error * fixed str error in optimizer * ship * sentry * Open Telemetry * optional logging with environment variables * add actions again? (#29) * add postgres * add openai key * readd coverage * desyncify and add detailed coverage * ⚙️ chore: update start script in VS Code to include poetry install --no-root before running uvicorn (#33) * Refactored code but need to tweak asyncpg * Working Async API using Psycopg3 * Update Workflow Connection URI * Update Workflow Connection URI in coverage test as well * Skeleton for Dialectic API * Fixes DEV-217 URL Encoding * Add Built-in Langchain Utility function * Sphinx Docs MVP * Metadata filtering for all fixes dev-261 * Basic Dialectic Endpoint fixes dev-253 * Working Fact Deriver * 0.0.5 Docs and README updates * Cloudflare Sphinx * update example to use right function (#36) * 🚀 feat: add support for running API using docker-compose with configurable environment variables and update docker-compose.yml for API and database services. (#34) Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com> * add interrogate * routerify everything * full docstring coverage * remove unused imports and fix env issue * Update docker-compose connection uri and remove auto-stop to deriver process * Docstrings and langchain message converter in reverse * Sentry, OTEL, langchain both directions, fly.toml for deriver * Rename to deriver * Fix favicon and remove metadata from schema * 0.0.6 Notes * Changelog edit * Route bug fix * Route bug fix again * Langchain Utilities Refactor (#48) * [0.0.6] - 3-21-2024 Bug Fixes (#47) * 🧪 asyncify tests * ✨ asyncify client * Basic Test for Page based pagination * add sync buildstep and client * add vscode DX * Added Testing for generators and updated examples * feat: example updates * readme exists now * Stylistic changes and generic message * Metamessages with other refactoring - untested * Work with unit tests * Fix Examples * MEME-78 Update Changelogs * Docstrings to client * 🧪 autogenerate sync tests * test one * add db type * sync client * add status badge * add coverage * add file * give perms * properly output coverage * split test and coverage * rename action * 🧪 autogenerate sync tests (#16) * Vector Support (#18) * Scaffold for PGVector support * Buggy crud with logic skeleton on api * Crud logic and schema definition for pgvector * Populate all routes and refactor to name Collection * vince's progress * AsyncCollection progress * Local PGVector Docker Container * client methods for sdk except document delete and update * Vector Support Passing All Test Cases * Docs Updates --------- Co-authored-by: vintro <vince@plasticlabs.ai> * Add reverse parameters for paginated routes * Address dependabot * Formatting * initial commit on honcho dspy personas * working, hit token limit and can't test dspy optimization * initial version working, need to test optimization * optimizers working, but appending any example * ready for user object (tbomk) * Revert "add test actions and coverage" * Refactor to add User and App Tables * User Object passing test cases * Update examples * DSPy Todo and documentation updates * Add is_active filtering * Add is_active filtering to the generator * Fix update user metadata * working, but weird compiler error * fixed str error in optimizer * ship * sentry * Open Telemetry * optional logging with environment variables * add actions again? (#29) * add postgres * add openai key * readd coverage * desyncify and add detailed coverage * ⚙️ chore: update start script in VS Code to include poetry install --no-root before running uvicorn (#33) * Refactored code but need to tweak asyncpg * Working Async API using Psycopg3 * Update Workflow Connection URI * Update Workflow Connection URI in coverage test as well * Skeleton for Dialectic API * Fixes DEV-217 URL Encoding * Add Built-in Langchain Utility function * Sphinx Docs MVP * Metadata filtering for all fixes dev-261 * Basic Dialectic Endpoint fixes dev-253 * Working Fact Deriver * 0.0.5 Docs and README updates * Cloudflare Sphinx * update example to use right function (#36) * 🚀 feat: add support for running API using docker-compose with configurable environment variables and update docker-compose.yml for API and database services. (#34) Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com> * add interrogate * routerify everything * full docstring coverage * remove unused imports and fix env issue * Update docker-compose connection uri and remove auto-stop to deriver process * Docstrings and langchain message converter in reverse * Sentry, OTEL, langchain both directions, fly.toml for deriver * Rename to deriver * Fix favicon and remove metadata from schema * 0.0.6 Notes * Changelog edit * Route bug fix * Route bug fix again --------- Co-authored-by: hyusap <paulayush@gmail.com> Co-authored-by: vintro <vince@plasticlabs.ai> Co-authored-by: vintro <77507980+vintrocode@users.noreply.github.com> * Port Docs * Update Examples with new langchain utilites * Rename decorator * Synchronize * Fix API SessionLocal --------- Co-authored-by: hyusap <paulayush@gmail.com> Co-authored-by: vintro <vince@plasticlabs.ai> Co-authored-by: vintro <77507980+vintrocode@users.noreply.github.com> * Basic Auth Header validation * Basic Auth Service * Deriver reliability and default auth revoke * .env.template * 0.0.7 Updates --------- Co-authored-by: hyusap <paulayush@gmail.com> Co-authored-by: vintro <vince@plasticlabs.ai> Co-authored-by: vintro <77507980+vintrocode@users.noreply.github.com> |
||
|---|---|---|
| .github/workflows | ||
| .vscode | ||
| api | ||
| docs | ||
| example | ||
| scripts | ||
| sdk | ||
| .gitignore | ||
| LICENSE | ||
| README.md | ||
README.md
🫡 Honcho
Honcho is a platform for making AI agents and LLM powered applications that are personalized to their end users. Honcho is a platform for making AI agents and LLM powered applications that are personalized to their end users.
Read about the motivation of this project here.
Read the user documenation here
Table of Contents
Table of Contents
Project Structure
The Honcho repo is a monorepo containing the server/API that manages database interactions and storing data about an application's state along with the python sdk for interacting with the API.
The folders are structured as follows:
api/- contains a FastAPI application that provides user context management routessdk/- contains the code for the python sdk and package hosted on PyPIexample/- contains example code for different use cases of honcho
This project utilizes poetry for dependency management
A separate changelog is managed for the sdk and api in their respective directories.
Usage
API
Docker
The API can be run using docker-compose. The docker-compose.yml.example file can be copied to docker-compose.yml and the environment variables can be set in the .env file.
cd honcho/api
cp docker-compose.yml.example docker-compose.yml
[ update the file with openai key and other wanted environment variables ]
docker compose up -d
Manually
Docker
The API can be run using docker-compose. The docker-compose.yml.example file can be copied to docker-compose.yml and the environment variables can be set in the .env file.
cd honcho/api
cp docker-compose.yml.example docker-compose.yml
[ update the file with openai key and other wanted environment variables ]
docker compose up -d
Manually
The API can be run either by installing the necessary dependencies and then specifying the appropriate environment variables.
- Create a virtualenv and install the API's dependencies
cd honcho/api/ # change to the api directory
poetry shell # Activate virutal environment
poetry install # install dependencies
- Copy the
.env.templatefile and specify the type of database and connection_uri. For testing sqlite is fine. The below example uses an in-memory sqlite database. in-memory sqlite database.
Honcho has been tested with Postgresql and PGVector
DATABASE_TYPE=postgres
CONNECTION_URI=postgresql://testuser:testpwd@localhost:5432/honcho
- launch a postgresd with pgvector enabled with docker-compose
cd honcho/api/local
docker-compose up -d
- Run the API via uvicorn
cd honcho/api # change to the api directory
poetry shell # Activate virtual environment if not already enabled
python -m uvicorn src.main:app --reload
Deploy on Fly
The API can also be deployed on fly.io. Follow the Fly.io
Docs to setup your environment and the
flyctl.
flyctl.
Once flyctl is set up use the following commands to launch the application:
cd honcho/api
flyctl launch --no-deploy # Follow the prompts and edit as you see fit
cat .env | flyctl secrets import # Load in your secrets
flyctl deploy # Deploy with appropriate environment variables
Client SDK
Install the honcho client sdk from a python project with the following command:
pip install honcho-ai
alternatively if you are using poetry run:
poetry add honcho-ai
checkout the SDK Reference for a detailed look at the different methods and how to use them.
Also, check out theexample folder for examples of how to use the sdk checkout the SDK Reference for a detailed look at the different methods and how to use them.
Also, check out theexample folder for examples of how to use the sdk
Use Locally
For local development of the sdk you can add the local directory as a package using poetry with the following commands.
poetry add --editable ./{path_to_honcho}/honcho/sdk
See more information here
Contributing
This project is completely open source and welcomes any and all open source contributions. The workflow for contributing is to make a fork of the repository. You can claim an issue in the issues tab or start a new thread to indicate a feature or bug fix you are working on. indicate a feature or bug fix you are working on.
Once you have finished your contribution make a PR pointed at the staging
branch, and it will be reviewed by a project manager. Feel free to join us in
our discord to discuss your changes or get
help.
help.
Once your changes are accepted and merged into staging they will undergo a
period of live testing before entering the upstream into main
License
Honcho is licensed under the AGPL-3.0 License. Learn more at the License file