Restructure and SDK Scaffold

This commit is contained in:
Vineeth Voruganti 2024-01-16 23:11:25 -08:00
parent e2199b8090
commit b11d5664cf
12 changed files with 50 additions and 5 deletions

View File

@ -128,5 +128,3 @@ def get_messages_for_session(
# ):
# return crud.create_metacognition(db, metacognition, message_id)
if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=8000)

0
sdk/README.md Normal file
View File

0
sdk/honcho/__init__.py Normal file
View File

View File

@ -1,3 +1,4 @@
"""
Below is an implementation of a basic LRUcache that utilizes the built
in OrderedDict data structure.
@ -62,4 +63,3 @@ class LRUCache:
# Add or update the key-value pair at the end of the OrderedDict
self.cache[key] = value

47
sdk/honcho/client.py Normal file
View File

@ -0,0 +1,47 @@
import requests
from dotenv import load_dotenv
load_dotenv()
class Client:
def __init__(self, base_url):
self.base_url = base_url
def get_sessions(self, user_id):
url = f"{self.base_url}/"
pass
def get_session(self, user_id, session_id):
url = f"{self.base_url}/"
pass
def create_session(self, user_id, location_id):
url = f"{self.base_url}/"
pass
def update_session(self, user_id, session_id):
url = f"{self.base_url}/"
pass
def delete_session(self, user_id, session_id):
url = f"{self.base_url}/"
pass
def get_messages_for_session(self, user_id, session_id):
url = f"{self.base_url}/"
pass
def create_message_for_session(self, user_id, session_id):
url = f"{self.base_url}/"
pass
def get_data(self, endpoint, params=None):
url = f"{self.base_url}/{endpoint}"
response = requests.get(url, params=params)
return response.json()

View File

@ -2,10 +2,10 @@
name = "honcho-sdk"
version = "0.1.0"
description = "Python Client SDK for Honcho"
authors = ["Vineeth Voruganti"]
authors = ["Plastic Labs <hello@plasticlabs.ai>"]
license = "AGPL-3.0"
readme = "README.md"
packages = [{include = "honcho_sdk"}]
packages = [{include = "honcho"}]
[tool.poetry.dependencies]
python = "^3.11"