diff --git a/package.json b/package.json index 47bad32..72ca2df 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "exif-ai", - "version": "3.2.2", + "version": "3.2.3", "description": "A Node.js CLI and library that uses Ollama, ZhipuAI, Google Gemini, Coze or OpenAI to intelligently write image description and/or tags to exif metadata by it's content.", "homepage": "https://github.com/tychenjiajun/exif-ai", "repository": { diff --git a/src/exif-ai.ts b/src/exif-ai.ts index 2da534f..172b468 100644 --- a/src/exif-ai.ts +++ b/src/exif-ai.ts @@ -31,7 +31,7 @@ async function findFilesRecursive( } const program = new Command(); program - .version("3.2.2") + .version("3.2.3") .description(getText("description") ?? "") .requiredOption("-a, --api-provider ", getText("api-provider")) .option("-T, --tasks ", getText("tasks")) diff --git a/src/provider/zhipu.ts b/src/provider/zhipu.ts index 564beb5..a527884 100644 --- a/src/provider/zhipu.ts +++ b/src/provider/zhipu.ts @@ -72,7 +72,6 @@ export async function getDescription({ ], }, ], - temperature: 0.5, }), }, ); @@ -129,7 +128,6 @@ export async function getTags({ ], }, ], - temperature: 0.5, }), }, ); @@ -146,4 +144,4 @@ export async function getTags({ console.error("An error occurred while getting the tags:", error); throw error; // Re-throw the error to be handled by the caller } -} \ No newline at end of file +} diff --git a/src/tasks/tags.ts b/src/tasks/tags.ts index 757aa5b..44b4d51 100644 --- a/src/tasks/tags.ts +++ b/src/tasks/tags.ts @@ -23,6 +23,7 @@ function formatTags(tags: string | string[] | undefined): string[] { .replaceAll(/[\[\]\.{}<>/*'"()。]/g, "") .replace(/\n$/g, "") .replace(/[0-9]+(.*)/g, "$1") + .replace(/[::]*/g, "") .trim(); }) ?? []) : (tags @@ -37,7 +38,8 @@ function formatTags(tags: string | string[] | undefined): string[] { s .trim() .replace(/\n$/g, "") - .replace(/[0-9]+[ ]+(.*)/g, "$1"), + .replace(/[0-9]+[ ]+(.*)/g, "$1") + .replace(/[::]*/g, ""), ) .filter( (s) =>