Fix open AI compatible rerank issue. (#3866)

### What problem does this PR solve?
#3700
### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu
2024-12-05 10:26:21 +08:00
committed by GitHub
parent 84afb4259c
commit 78601ee1bd
2 changed files with 27 additions and 25 deletions

View File

@ -286,7 +286,7 @@ class OpenAI_APIRerank(Base):
"Content-Type": "application/json",
"Authorization": f"Bearer {key}"
}
self.model_name = model_name
self.model_name = model_name.split("___")[0]
def similarity(self, query: str, texts: list):
# noway to config Ragflow , use fix setting