From 6330b735d5390d326bed2701026333f2dab213a8 Mon Sep 17 00:00:00 2001 From: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com> Date: Thu, 1 Feb 2024 09:48:10 -0800 Subject: [PATCH] READMEs --- README.md | 2 ++ sdk/README.md | 15 +++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 040fc679..08b1f679 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/sdk/README.md b/sdk/README.md index b68fee3b..d2fedf5b 100644 --- a/sdk/README.md +++ b/sdk/README.md @@ -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)