feat: CURRENT_DATE, USER_NAME prompt variable support

This commit is contained in:
Timothy J. Baek
2024-05-31 11:11:28 -07:00
parent 7674229e3a
commit 9dfa334a83
5 changed files with 73 additions and 27 deletions

View File

@@ -1,5 +1,5 @@
import { OLLAMA_API_BASE_URL } from '$lib/constants';
import { promptTemplate } from '$lib/utils';
import { titleGenerationTemplate } from '$lib/utils';
export const getOllamaConfig = async (token: string = '') => {
let error = null;
@@ -212,7 +212,7 @@ export const generateTitle = async (
) => {
let error = null;
template = promptTemplate(template, prompt);
template = titleGenerationTemplate(template, prompt);
console.log(template);