chore: deno fmt
This commit is contained in:
@@ -283,4 +283,3 @@ export default function useDebouncedCallback<
|
||||
|
||||
return debounced;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,4 +52,3 @@ const useThrottledCallback = (
|
||||
};
|
||||
|
||||
export default useThrottledCallback;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ async function addImageToResource<T extends GenericResource>(
|
||||
if (imageUrl) {
|
||||
try {
|
||||
const absoluteImageUrl = (imageUrl.startsWith("https://") ||
|
||||
imageUrl.startsWith("http://"))
|
||||
imageUrl.startsWith("http://"))
|
||||
? imageUrl
|
||||
: `${url}/${imageUrl}`;
|
||||
const image = await getImage(absoluteImageUrl);
|
||||
|
||||
@@ -35,7 +35,8 @@ export async function summarize(content: string) {
|
||||
{
|
||||
role: "user",
|
||||
content:
|
||||
`Please summarize the article in one sentence as short as possible: ${content.slice(0, 2000)
|
||||
`Please summarize the article in one sentence as short as possible: ${
|
||||
content.slice(0, 2000)
|
||||
}`,
|
||||
},
|
||||
],
|
||||
@@ -102,7 +103,8 @@ export async function createGenres(
|
||||
{
|
||||
role: "system",
|
||||
content:
|
||||
`you create some keywords that can be used in a recommendation system. The keywords are based on a ${type} description or title. If you do not know the title, take into account the description aswell. Create a range of keywords from very specific ones that describe the general vibe. ${title ? `The name of the ${type} is ${title}` : ""
|
||||
`you create some keywords that can be used in a recommendation system. The keywords are based on a ${type} description or title. If you do not know the title, take into account the description aswell. Create a range of keywords from very specific ones that describe the general vibe. ${
|
||||
title ? `The name of the ${type} is ${title}` : ""
|
||||
}. Return a list of around 20 keywords seperated by commas`,
|
||||
},
|
||||
{
|
||||
@@ -166,7 +168,8 @@ export const getMovieRecommendations = async (
|
||||
|
||||
${keywords}
|
||||
|
||||
The movies should be similar to but not include ${exclude.join(", ")
|
||||
The movies should be similar to but not include ${
|
||||
exclude.join(", ")
|
||||
} or remakes of that.
|
||||
|
||||
respond with a plain unordered list each item starting with the year the movie was released and then the title of the movie seperated by a -`,
|
||||
|
||||
@@ -48,8 +48,9 @@ export async function endTask(chatId: string): Promise<string | null> {
|
||||
finalNote += "**[Voice message could not be transcribed]**\n\n";
|
||||
}
|
||||
} else if (entry.type === "photo") {
|
||||
const photoUrl = `${task.noteName.replace(/\.md$/, "")
|
||||
}/photo-${photoIndex++}.jpg`;
|
||||
const photoUrl = `${
|
||||
task.noteName.replace(/\.md$/, "")
|
||||
}/photo-${photoIndex++}.jpg`;
|
||||
|
||||
finalNote += `**Photo**:\n ${photoUrl}\n\n`;
|
||||
photoTasks.push({
|
||||
|
||||
Reference in New Issue
Block a user