[NEW] Adding consistency in the URLs

This commit is contained in:
Nil-Andreu
2023-01-08 21:01:15 +01:00
parent 412736f52c
commit e241a8bf28
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -285,7 +285,7 @@ async def tasks_interaction(
if not settings.DEBUG_SKIP_EMBEDDING_COMPUTATION:
try:
hugging_face_api = HuggingFaceAPI(
f"{HF_url.HUGGINGFACE_FEATURE_EXTRACTION.value}{HF_embeddingModel.MINILM.value}"
f"{HF_url.HUGGINGFACE_FEATURE_EXTRACTION.value}/{HF_embeddingModel.MINILM.value}"
)
embedding = await hugging_face_api.post(interaction.text)
pr.insert_message_embedding(
+1 -1
View File
@@ -8,7 +8,7 @@ from oasst_shared.exceptions import OasstError, OasstErrorCode
class HF_url(str, Enum):
HUGGINGFACE_TOXIC_ROBERTA = ("https://api-inference.huggingface.co/models/unitary/multilingual-toxic-xlm-roberta",)
HUGGINGFACE_FEATURE_EXTRACTION = "https://api-inference.huggingface.co/pipeline/feature-extraction/"
HUGGINGFACE_FEATURE_EXTRACTION = "https://api-inference.huggingface.co/pipeline/feature-extraction"
class HF_embeddingModel(str, Enum):