Skip to content

Commit

Permalink
Merge pull request #27 from plastic-labs/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
hyusap committed Feb 22, 2024
2 parents 555c848 + 197a658 commit 260a70a
Show file tree
Hide file tree
Showing 42 changed files with 7,183 additions and 519 deletions.
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Honcho

![Static Badge](https://img.shields.io/badge/Version-0.0.2-blue)
![Static Badge](https://img.shields.io/badge/Version-0.0.3-blue)
[![Discord](https://img.shields.io/discord/1016845111637839922?style=flat&logo=discord&logoColor=23ffffff&label=Plastic%20Labs&labelColor=235865F2)](https://discord.gg/plasticlabs)
![GitHub License](https://img.shields.io/github/license/plastic-labs/honcho)
![GitHub Repo stars](https://img.shields.io/github/stars/plastic-labs/honcho)
Expand Down Expand Up @@ -53,14 +53,21 @@ poetry install # install dependencies
connection_uri. For testing sqlite is fine. The below example uses an
in-memory sqlite database.

> Honcho has been tested with Postgresql and SQLite
> Honcho has been tested with Postgresql and PGVector
```env
DATABASE_TYPE=sqlite
CONNECTION_URI=sqlite://
DATABASE_TYPE=postgres
CONNECTION_URI=postgresql://testuser:testpwd@localhost:5432/honcho
```

3. Run the API via uvicorn
3. launch a postgresd with pgvector enabled with docker-compose

```bash
cd honcho/api/local
docker-compose up -d
```

4. Run the API via uvicorn

```bash
cd honcho/api # change to the api directory
Expand Down Expand Up @@ -88,7 +95,7 @@ The API can also be deployed on fly.io. Follow the [Fly.io
Docs](https://fly.io/docs/getting-started/) to setup your environment and the
`flyctl`.

Once `flyctl` is set up use the the following commands to launch the application:
Once `flyctl` is set up use the following commands to launch the application:

```bash
cd honcho/api
Expand Down
5 changes: 5 additions & 0 deletions api/.env.template
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
DATABASE_TYPE=sqlite
CONNECTION_URI=sqlite://

DATABASE_TYPE=postgres
CONNECTION_URI=postgresql://testuser:testpwd@localhost:5432/honcho

OPENAI_API_KEY=
16 changes: 16 additions & 0 deletions api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [0.0.3] — 2024-02-15

### Added

* Collections table to reference a collection of embedding documents
* Documents table to hold vector embeddings for RAG workflows
* Local scripts for running a postgres database with pgvector installed
* OpenAI Dependency for embedding models
* PGvector dependency for vector db support

### Changed

* session_data is now metadata
* session_data is a JSON field used python `dict` for compatability


## [0.0.2] — 2024-02-01

### Added
Expand Down
14 changes: 14 additions & 0 deletions api/local/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
services:
db:
hostname: db
image: ankane/pgvector
ports:
- 5432:5432
restart: always
environment:
- POSTGRES_DB=honcho
- POSTGRES_USER=testuser
- POSTGRES_PASSWORD=testpwd
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
1 change: 1 addition & 0 deletions api/local/init.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE EXTENSION IF NOT EXISTS vector;
Loading

0 comments on commit 260a70a

Please sign in to comment.