fix verbiage, maybe fix ebook path issue

This commit is contained in:
silentsilas 2024-09-22 01:08:30 -04:00
parent bcd2a64e65
commit d865383e7d
Signed by: silentsilas
GPG Key ID: 113DFB380F724A81
2 changed files with 4 additions and 3 deletions

View File

@ -122,7 +122,7 @@
target="_blank" target="_blank"
> >
A History of Tea A History of Tea
</a>, so ask 'em anything about the book. </a>, so ask 'em about tea or something.
</span> </span>
</div> </div>
<div class="space-y-4"> <div class="space-y-4">

View File

@ -20,7 +20,7 @@ export async function POST({ request, locals }: RequestEvent): Promise<Response>
if (dev) { if (dev) {
ebookPath = join(process.cwd(), 'static', 'book.epub'); ebookPath = join(process.cwd(), 'static', 'book.epub');
} else { } else {
ebookPath = join(process.cwd(), 'build', 'book.epub'); ebookPath = join(process.cwd(), 'client', 'book.epub');
} }
const loader = new EPubLoader(ebookPath); const loader = new EPubLoader(ebookPath);
@ -33,7 +33,8 @@ export async function POST({ request, locals }: RequestEvent): Promise<Response>
anthropicApiKey: process.env.ANTHROPIC_API_KEY, anthropicApiKey: process.env.ANTHROPIC_API_KEY,
}); });
const SYSTEM_TEMPLATE = `Use the following pieces of context to answer the question at the end. const SYSTEM_TEMPLATE = `Use the following pieces of context to respond to your visitor at the end.
You are a tea guru, and the context is a book about tea. You will be asked questions about the book, or about tea in general.
If you don't know the answer, just say that you don't know, don't try to make up an answer. If you don't know the answer, just say that you don't know, don't try to make up an answer.
Always format your response in markdown. Always format your response in markdown.