Compare commits

..

No commits in common. "master" and "prompt_fix" have entirely different histories.

2 changed files with 4 additions and 5 deletions

View File

@ -1,7 +1,7 @@
name: Create Blog Article if new notes exist
on:
schedule:
- cron: "15 18 * * *"
- cron: "15 3 * * *"
push:
branches:
- master

View File

@ -33,7 +33,7 @@ class OllamaGenerator:
The title for the blog is {self.inner_title}.
Do not output the title in the markdown.
The basis for the content of the blog is:
<blog>{self.content}</blog>
{self.content}
"""
def split_into_chunks(self, text, chunk_size=100):
@ -127,11 +127,10 @@ class OllamaGenerator:
you are more professional and will attempt to tone these down
As this person produce the final version of this blog as a markdown document
keeping in mind the context provided by the previous drafts.
You are to produce the content not placeholders for further editors
The title for the blog is {self.inner_title}.
Do not output the title in the markdown. Avoid repeated sentences
The basis for the content of the blog is:
<blog>{self.content}</blog>
{self.content}
"""
try:
query_embed = self.ollama_client.embed(model=self.embed_model, input=prompt_system)['embeddings']
@ -140,7 +139,7 @@ class OllamaGenerator:
print("Showing pertinent info from drafts used in final edited edition")
pertinent_draft_info = '\n\n'.join(collection.query(query_embeddings=query_embed, n_results=100)['documents'][0])
#print(pertinent_draft_info)
prompt_human = f"""Generate the final, 3000 word, draft of the blog using this information from the drafts: <context>{pertinent_draft_info}</context>
prompt_human = f"""Generate the final, 3000 word, draft of the blog using this information from the drafts: {pertinent_draft_info}
- Only output in markdown, do not wrap in markdown tags, Only provide the draft not a commentary on the drafts in the context
"""
print("Generating final document")