Fix customEmbeddingUrl handling in HypaProcesser

This commit is contained in:
sub-hub
2024-04-27 22:41:48 +09:00
parent 96622482b3
commit cefdc1ad11

View File

@@ -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:{