From 660bc0a734f45ba59bba929fdb0a220b8fa12f61 Mon Sep 17 00:00:00 2001 From: locker98 Date: Fri, 19 Apr 2024 23:33:54 -0400 Subject: [PATCH] updated prices on other-talk --- other-talk | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/other-talk b/other-talk index 81c3aab..c7d9006 100755 --- a/other-talk +++ b/other-talk @@ -43,7 +43,7 @@ def is_bulletpoint(s): def generate_text(model, prompt, system=""): - url = "http://localhost:11434/api/generate" + url = "http://100.:11434/api/generate" data = { "model": model, "prompt": prompt, @@ -139,12 +139,12 @@ for x in docs: chunk_text = context system_prompt = """ -You are a professional code summarizer. You will be be given a SQL query in chunk section. +You are a professional summarizer. You will be be given a information in chunk section. Take each chunk and create a very short concise single paragraph summery. The chunk will be under the # CHUNK heading. Only output the summery. -Do not under any circumstance output the # CHUNK section, SQL code, or bullet points. +Do not under any circumstance output the # CHUNK section, or bullet points. """ prompt = f""" -Write a paragraph summary of the following CHUNK of sql code. +Write a paragraph summary of the following CHUNK of text. # CHUNK {chunk_text} @@ -159,7 +159,7 @@ Write a paragraph summary of the following CHUNK of sql code. bullet_point = True if is_bulletpoint(outline.split("\n")[0]): - outline = " The SQL script performs the following tasks:\n" + outline.replace("\n", "\n\t") + outline = "The text contains the following information:\n" + outline.replace("\n", "\n\t") elif bullet_point: outline = outline.replace("\n", "\n\t") else: @@ -179,10 +179,10 @@ print("Compression Ratio: ", round(len(nltk_tokens_init)/len(nltk_tokens), 1)) # Final Summary -system_prompt = "You are an expert summarizer. Your Job it to take all the individual sections under each bullet point. Make sure that the summary is long and detailed. Do not mention anything about sections or chunks and only summarize in paragraph form. Never let your summary's contain outlines or built points" +system_prompt = "You are an expert summarizer. Your job is to take all the individual sections under each bullet point. Make sure that the summary is long and detailed. Do not mention anything about sections or chunks and only summarize in paragraph form. Never let your summary's contain outlines or built points" prompt = f""" -Here are a bunch of bulit points. Please summerize them: +Here are a bunch of bulit points. Please summerize them in paragraph form: {pre_summery} """ @@ -193,7 +193,7 @@ final_summery = generate_text(model, prompt, system_prompt) print("Done") pdf.add_section(Section(f"## Basic Overview\n{final_summery}\n\n")) -pdf.add_section(Section(f"## Code Outline\n{pre_summery}\n\n")) +pdf.add_section(Section(f"## Outline\n{pre_summery}\n\n")) pdf.meta["title"] = title pdf.meta["author"] = "locker98"