Skip to content

Commit

Permalink
Langchain Utilities Refactor (#48)
Browse files Browse the repository at this point in the history
* [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 <[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

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: vintro <[email protected]>
Co-authored-by: vintro <[email protected]>

* Port Docs

* Update Examples with new langchain utilites

* Rename decorator

* Synchronize

* Fix API SessionLocal

---------

Co-authored-by: hyusap <[email protected]>
Co-authored-by: vintro <[email protected]>
Co-authored-by: vintro <[email protected]>
  • Loading branch information
4 people authored Mar 25, 2024
1 parent 5fdfdbc commit f74125e
Show file tree
Hide file tree
Showing 72 changed files with 13,978 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,5 @@ cython_debug/
.DS_Store

supabase/

docs/node_modules
4 changes: 2 additions & 2 deletions api/src/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@


def scaffold_db():
"""Use a Sync Engine for scaffolding the database. DDL operations are unavailable
with Async Engines
"""use a sync engine for scaffolding the database. ddl operations are unavailable
with async engines
"""
engine = create_engine(os.environ["CONNECTION_URI"], echo=True)
Base.metadata.create_all(bind=engine)
Expand Down
3 changes: 2 additions & 1 deletion api/src/dependencies.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from fastapi import Depends
from .db import SessionLocal
from sqlalchemy.ext.asyncio import AsyncSession

from .db import SessionLocal


async def get_db():
"""FastAPI Dependency Generator for Database"""
Expand Down
43 changes: 43 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# honcho-docs

## Setting Up `honcho-docs` Locally

1. Clone the repository:
```
git clone [email protected]:plastic-labs/honcho-docs.git
```

2. Navigate into the `honcho-docs` folder:
```
cd honcho-docs/
```
The docs folder contains the markdown files that make up the documentation. The majority of the files are in the pages directory. Some notable files in this folder include:

`index.mdx`: The main documentation file.
`_app.js`: This file is used to customize the default Next.js application shell.
`theme.config.jsx`: This file is for configuring the Nextra theme for the documentation.

3. Verify that you have Node.js and npm installed in your system. You can check by running:
```
node --version
npm --version
```

4. If not installed, download Node.js and npm from the respective official websites.

5. Once you have Node.js and npm running, proceed to install `pnpm` - another package manager that helps to manage project dependencies:
```
npm install -g pnpm
```

6. Install the project dependencies using yarn:
```
pnpm i
```

7. After the successful installation of the project dependencies, start the local server:
```
pnpm dev
```

Now, you should be able to view the docs on your local environment by visiting `http://localhost:3000`. You can explore the different markdown files and make changes as you see fit.
63 changes: 63 additions & 0 deletions docs/_snippets/overview-shields.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<div
style={{
display: "flex"
}}
class="justify-center"
>
<a
style={{
borderStyle: "none",
marginTop: "0.125rem",
marginBottom: "0.125rem",
}}
href="https://pypi.org/project/honcho-ai/"
>
<img
style={{
margin: 0,
cursor: "pointer",
}}
noZoom
src="https://img.shields.io/pypi/v/honcho-ai?color=orange"
alt="Python package version"
/>
</a>
<a
style={{
borderStyle: "none",
marginTop: "0.125rem",
marginBottom: "0.125rem",
marginLeft: "0.25rem",
}}
href="https://github.com/plastic-labs/honcho"
>
<img
style={{
margin: 0,
cursor: "pointer",
}}
noZoom
src="https://img.shields.io/github/stars/plastic-labs/honcho?logo=github"
alt="GitHub Stars"
/>
</a>
<a
style={{
borderStyle: "none",
marginTop: "0.125rem",
marginBottom: "0.125rem",
marginLeft: "0.25rem",
}}
href="https://pepy.tech/project/honcho-ai"
>
<img
style={{
margin: 0,
cursor: "pointer",
}}
noZoom
src="https://static.pepy.tech/personalized-badge/honcho-ai?period=total&units=international_system&left_color=grey&right_color=blue&left_text=pip%20installs"
alt="pip installs"
/>
</a>
</div>
18 changes: 18 additions & 0 deletions docs/about/contributing.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: 'Contributing'
description: 'Guidelines for contributing to the Honcho Project'
icon: 'handshake-angle'
---

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.

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](http://discord.gg/plasticlabs) to discuss your changes or get
help.

Once your changes are accepted and merged into staging they will undergo a
period of live testing before entering the upstream into `main`
Loading

0 comments on commit f74125e

Please sign in to comment.