Skip to content

Commit

Permalink
[0.0.5] - 03-14-2024 Dialectic Agent (#38)
Browse files Browse the repository at this point in the history
* 🧪 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 <[email protected]>

* 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

---------

Co-authored-by: hyusap <[email protected]>
Co-authored-by: vintro <[email protected]>
  • Loading branch information
3 people authored Mar 14, 2024
1 parent 611981f commit 995a6d0
Show file tree
Hide file tree
Showing 46 changed files with 5,474 additions and 1,118 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/run_coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Run Coverage
on: [pull_request]
jobs:
test:
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install poetry
run: |
pip install poetry
- name: Start Database
run: |
cd api/local
docker compose up --wait
cd ../..
- name: Start Server
run: |
cd api
poetry install --no-root
poetry run uvicorn src.main:app &
sleep 5
cd ..
env:
DATABASE_TYPE: postgres
CONNECTION_URI: postgresql+psycopg://testuser:testpwd@localhost:5432/honcho
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
- name: Run Tests
run: |
cd sdk
poetry install
poetry run coverage run -m pytest
poetry run coverage report --format=markdown > coverage.md
cd ..
- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
with:
recreate: true
path: sdk/coverage.md
- name: Stop Server
run: |
kill $(jobs -p) || true
46 changes: 46 additions & 0 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Run Tests
on: [push, pull_request]
jobs:
test:
permissions:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install poetry
run: |
pip install poetry
- name: Start Database
run: |
cd api/local
docker compose up --wait
cd ../..
- name: Start Server
run: |
cd api
poetry install --no-root
poetry run uvicorn src.main:app &
sleep 5
cd ..
env:
DATABASE_TYPE: postgres
CONNECTION_URI: postgresql+psycopg://testuser:testpwd@localhost:5432/honcho
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
- name: Run Tests
run: |
cd sdk
poetry install
poetry run pytest
cd ..
- name: Stop Database
run: |
cd api/local
docker compose down
cd ../..
- name: Stop Server
run: |
kill $(jobs -p) || true
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ instance/
.scrapy

# Sphinx documentation
docs/_build/
**/docs/_build/

# PyBuilder
.pybuilder/
Expand Down Expand Up @@ -165,3 +165,5 @@ cython_debug/
#.idea/

.DS_Store

supabase/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Honcho
![Static Badge](https://img.shields.io/badge/Version-0.0.4-blue)
![Static Badge](https://img.shields.io/badge/Version-0.0.5-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
29 changes: 25 additions & 4 deletions api/.env.template
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
DATABASE_TYPE=sqlite
CONNECTION_URI=sqlite://

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

OPENAI_API_KEY=

# Logging

OPENTELEMETRY_ENABLED=false # Set to true to enable OpenTelemetry logging and tracing
SENTRY_ENABLED=false # Set to true to enable Sentry logging and tracing

## Sentry
SENTRY_DSN=

## Open Telemetry

OTEL_SERVICE_NAME=honcho
OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true
OTEL_PYTHON_LOG_CORRELATION=true

OTEL_PYTHON_LOG_LEVEL=
OTEL_EXPORTER_OTLP_PROTOCOL=
OTEL_EXPORTER_OTLP_ENDPOINT=
OTEL_EXPORTER_OTLP_HEADERS=
OTEL_RESOURCE_ATTRIBUTES=

DEBUG_LOG_OTEL_TO_PROVIDER=false
DEBUG_LOG_OTEL_TO_CONSOLE=true

5 changes: 3 additions & 2 deletions api/.vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@
{
"label": "start",
"type": "shell",
"command": "poetry run uvicorn src.main:app --reload",
"command": "poetry install --no-root && poetry run uvicorn src.main:app --reload",
"group": "none",
"presentation": {
"reveal": "always",
"panel": "shared"
},
"runOptions": {
"runOn": "folderOpen"
}
},
"problemMatcher": []
}
]
}
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.5] — 2024-03-14

### Added

* Metadata to all data primitives (Users, Sessions, Messages, etc.)
* Ability to filter paginated GET requests by JSON filter based on metadata
* Optional Sentry error monitoring
* Optional Opentelemetry logging
* Dialectic API to interact with honcho agent and get insights about users
* Automatic Fact Derivation Script for automatically generating simple memory

### Changed

* API Server now uses async methods to make use of benefits of FastAPI


## [0.0.4] — 2024-02-22

### Added
Expand Down
3 changes: 2 additions & 1 deletion api/fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ kill_timeout = "5s"

[processes]
api = "python -m uvicorn src.main:app --host 0.0.0.0 --port 8000"
deriver = "python -m src.harvester"

[http_service]
internal_port = 8000
auto_stop_machines = true
auto_stop_machines = false
auto_start_machines = true
min_machines_running = 1
processes = ["api"]
Expand Down
Loading

0 comments on commit 995a6d0

Please sign in to comment.