Allow underscore in embeddings path

This commit is contained in:
cmdr2 2023-08-31 22:19:04 +05:30
parent 670768e5b3
commit a5962dae33

View File

@ -1345,7 +1345,7 @@ function setEmbeddings(task) {
let prompt = task.reqBody.prompt
let negativePrompt = task.reqBody.negative_prompt
let overallPrompt = (prompt + " " + negativePrompt).toLowerCase()
overallPrompt = overallPrompt.replaceAll(/[^a-z0-9\-\.]/g, " ") // only allow alpha-numeric, dots and hyphens
overallPrompt = overallPrompt.replaceAll(/[^a-z0-9\-_\.]/g, " ") // only allow alpha-numeric, dots and hyphens
overallPrompt = overallPrompt.split(" ")
let embeddingsTree = modelsOptions["embeddings"]