Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
montanalow merged 1 commit intomasterfrommontana/debug
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes fromall 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 deletionspgml-apps/pgml-chat/pgml_chat/main.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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 DownExpand 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 DownExpand 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 DownExpand 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 deletionpgml-sdks/pgml/src/queries.rs
View file
Open in desktop
Original file line numberDiff line numberDiff 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

[8]ページ先頭

©2009-2025 Movatter.jp