Skip to content

fix extra semicolon #1000

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions pgml-apps/pgml-chat/pgml_chat/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import asyncio
from pgml import Collection, Model, Splitter, Pipeline
from pgml import Collection, Model, Splitter, Pipeline, migrate, init_logger
import logging
from rich.logging import RichHandler
from rich.progress import track
Expand Down Expand Up @@ -121,6 +121,7 @@ async def generate_response(
messages, openai_api_key, temperature=0.7, max_tokens=256, top_p=0.9
):
openai.api_key = openai_api_key
log.debug("Generating response from OpenAI API: " + str(messages))
response = openai.ChatCompletion.create(
model="gpt-3.5-turbo",
messages=messages,
Expand Down Expand Up @@ -170,7 +171,7 @@ async def chat_cli():
response = await generate_response(
messages, openai_api_key, max_tokens=512, temperature=0.0
)
print("PgBot: " + response)
log.info("PgBot: " + response)

user_input = input("User (Ctrl-C to exit): ")
except KeyboardInterrupt:
Expand Down Expand Up @@ -241,8 +242,8 @@ async def run():
The `main` function connects to a database, ingests documents from a specified folder, generates
chunks, and logs the total number of documents and chunks.
"""
print("Starting pgml-chat.... ")

log.info("Starting pgml-chat.... ")
# await migrate()
if stage == "ingest":
root_dir = args.root_dir
await ingest_documents(root_dir)
Expand All @@ -255,6 +256,7 @@ async def run():


def main():
init_logger()
if (
stage == "chat"
and chat_interface == "discord"
Expand Down
2 changes: 1 addition & 1 deletion pgml-sdks/pgml/src/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ CREATE TABLE IF NOT EXISTS pgml.collections (
name text NOT NULL,
active BOOLEAN DEFAULT TRUE,
project_id int8 NOT NULL REFERENCES pgml.projects ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE INITIALLY DEFERRED,
sdk_version text;
sdk_version text
UNIQUE (name)
);
"#;
Expand Down
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