Skip to content

Commit c7aee27

Browse files
authored
fix extra semicolon (#1000)
1 parent bda484b commit c7aee27

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

pgml-apps/pgml-chat/pgml_chat/main.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import asyncio
2-
from pgml import Collection, Model, Splitter, Pipeline
2+
from pgml import Collection, Model, Splitter, Pipeline, migrate, init_logger
33
import logging
44
from rich.logging import RichHandler
55
from rich.progress import track
@@ -121,6 +121,7 @@ async def generate_response(
121121
messages, openai_api_key, temperature=0.7, max_tokens=256, top_p=0.9
122122
):
123123
openai.api_key = openai_api_key
124+
log.debug("Generating response from OpenAI API: " + str(messages))
124125
response = openai.ChatCompletion.create(
125126
model="gpt-3.5-turbo",
126127
messages=messages,
@@ -170,7 +171,7 @@ async def chat_cli():
170171
response = await generate_response(
171172
messages, openai_api_key, max_tokens=512, temperature=0.0
172173
)
173-
print("PgBot: " + response)
174+
log.info("PgBot: " + response)
174175

175176
user_input = input("User (Ctrl-C to exit): ")
176177
except KeyboardInterrupt:
@@ -241,8 +242,8 @@ async def run():
241242
The `main` function connects to a database, ingests documents from a specified folder, generates
242243
chunks, and logs the total number of documents and chunks.
243244
"""
244-
print("Starting pgml-chat.... ")
245-
245+
log.info("Starting pgml-chat.... ")
246+
# await migrate()
246247
if stage == "ingest":
247248
root_dir = args.root_dir
248249
await ingest_documents(root_dir)
@@ -255,6 +256,7 @@ async def run():
255256

256257

257258
def main():
259+
init_logger()
258260
if (
259261
stage == "chat"
260262
and chat_interface == "discord"

pgml-sdks/pgml/src/queries.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ CREATE TABLE IF NOT EXISTS pgml.collections (
88
name text NOT NULL,
99
active BOOLEAN DEFAULT TRUE,
1010
project_id int8 NOT NULL REFERENCES pgml.projects ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE INITIALLY DEFERRED,
11-
sdk_version text;
11+
sdk_version text
1212
UNIQUE (name)
1313
);
1414
"#;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy