Skip to content

Commit

Permalink
fix(storage) Remove Prepared Statements to make compatible with Supav…
Browse files Browse the repository at this point in the history
…isor
  • Loading branch information
VVoruganti committed Nov 12, 2024
1 parent 17ff380 commit c9da341
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions docs/getting-started/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Next, we want to register an application with the Honcho client:
<CodeGroup>

```python Python
app = client.apps.get_or_create(
app = honcho.apps.get_or_create(
name="string",
)
```
Expand Down Expand Up @@ -81,11 +81,11 @@ Now let's create a session for that application. Honcho is a user context manage
<CodeGroup>

```python Python
session = client.apps.users.sessions.create(user.id, app.id, location_id=default)
session = honcho.apps.users.sessions.create(user.id, app.id)
```

```javascript NodeJS
const session = client.apps.users.sessions.create(app.id, user.id, { location_id: "default"}) -> Session
const session = honcho.apps.users.sessions.create(app.id, user.id) -> Session
```

</CodeGroup>
Expand All @@ -95,11 +95,11 @@ Let's add a user message and an AI message to that session:
<CodeGroup>

```python Python
client.apps.users.sessions.messages.create(session.id, app.id, user.id, content="Test", is_user=True)
honcho.apps.users.sessions.messages.create(session.id, app.id, user.id, content="Test", is_user=True)
```

```javascript NodeJS
client.apps.users.sessions.messages.create(app.id, user.id, session.id, { content: "Test", is_user: true })
honcho.apps.users.sessions.messages.create(app.id, user.id, session.id, { content: "Test", is_user: true })
```

</CodeGroup>
Expand All @@ -109,7 +109,7 @@ You can also easily query Honcho to get the session objects for that user with t
<CodeGroup>

```python Python
async for session in client.apps.users.list(app.id, user.id):
async for session in honcho.apps.users.list(app.id, user.id):
doSomethingWith(session)
```

Expand All @@ -124,4 +124,4 @@ for await (const session of honcho.apps.users.sessions.list(app.id, user.id)) {

This is a super simple overview of how to get up and running with the Honcho SDK. We covered the basic methods for reading and writing from the hosted storage service. Next, we'll cover alternative forms of hosting Honcho.

For a more detailed look at the SDK check out the SDK reference [here](https://api.python.honcho.dev/).
For a more detailed look at the SDK check out the SDK reference [here](/api-reference).
8 changes: 4 additions & 4 deletions src/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
from sqlalchemy.ext.asyncio import async_sessionmaker, create_async_engine
from sqlalchemy.orm import declarative_base

# from sqlalchemy.ext.declarative import declarative_base

load_dotenv()

connect_args = {}
connect_args = {
"prepare_threshold": None,
}

# if (
# os.environ["DATABASE_TYPE"] == "sqlite"
Expand All @@ -19,7 +19,7 @@
engine = create_async_engine(
os.environ["CONNECTION_URI"],
connect_args=connect_args,
echo=True,
echo=False,
pool_pre_ping=True,
)

Expand Down

0 comments on commit c9da341

Please sign in to comment.