From cefdc1ad11bafb39b0364483bf8ff5eebfe5b753 Mon Sep 17 00:00:00 2001 From: sub-hub Date: Sat, 27 Apr 2024 22:41:48 +0900 Subject: [PATCH] Fix customEmbeddingUrl handling in HypaProcesser --- src/ts/process/memory/hypamemory.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ts/process/memory/hypamemory.ts b/src/ts/process/memory/hypamemory.ts index e9691155..90282e14 100644 --- a/src/ts/process/memory/hypamemory.ts +++ b/src/ts/process/memory/hypamemory.ts @@ -50,8 +50,8 @@ export class HypaProcesser{ alertError('Custom model requires a Custom Server URL') return [0] } - - const replaceUrl = appendLastPath(this.customEmbeddingUrl,'embeddings') + const {customEmbeddingUrl} = this + const replaceUrl = customEmbeddingUrl.endsWith('/embeddings')?customEmbeddingUrl:appendLastPath(customEmbeddingUrl,'embeddings') gf = await globalFetch(replaceUrl.toString(), { body:{