This commit is contained in:
Vineeth Voruganti 2024-02-01 09:48:10 -08:00
parent bb4fa915f3
commit 6330b735d5
2 changed files with 13 additions and 4 deletions

View File

@ -10,6 +10,8 @@ applications.
Read about the motivation of this project [here](https://blog.plasticlabs.ai).
Read the user documenation [here](https://docs.honcho.dev)
## Project Structure
The Honcho repo is a monorepo containing the server/API that manages database

View File

@ -5,6 +5,8 @@ applications.
Read about the motivation of this project [here](https://blog.plasticlabs.ai).
Read the full documentation of this project [here](https://docs.honcho.dev)
## Installation
Install honcho:
@ -24,19 +26,24 @@ poetry add honcho-ai
The Honcho SDK exposes a top level client that contains methods for managing the
lifecycle of different conversations and sessions in an LLM powered application.
There is a demo server being run at https://demo.honcho.dev that the client uses
by default if no other string is provided.
```python
from uuid import uuid4
from honcho import Client as HonchoClient
honcho = HonchoClient(base_url="http://localhost:8000")
app_id = str(uuid4())
honcho = HonchoClient(app_id=app_id)
user_id = "test"
session = honcho.create_session(user_id=user_id)
session_id = session["session_id"]
honcho.create_message_for_session(user_id=user_id, session_id=session_id, is_user=True, content="Hello")
session.create_message(is_user=True, content="Hello I'm a human")
session.create_message(is_user=False, content="Hello I'm an AI")
```
The honcho sdk code contains docstrings - see the full sdk on
The honcho sdk code contains docstrings see the full sdk on
[GitHub](https://github.com/plastic-labs/honcho/tree/main/sdk/honcho/client.py)
See more examples of how to use the SDK on [GitHub](https://github.com/plastic-labs/honcho/tree/main/example)