add support for LM Studio (#1663)
### What problem does this PR solve? #1602 ### Type of change - [x] New Feature (non-breaking change which adds functionality) --------- Co-authored-by: Zhedong Cen <cenzhedong2@126.com>
This commit is contained in:
@@ -202,3 +202,11 @@ class NvidiaRerank(Base):
|
||||
}
|
||||
res = requests.post(self.base_url, headers=self.headers, json=data).json()
|
||||
return (np.array([d["logit"] for d in res["rankings"]]), token_count)
|
||||
|
||||
|
||||
class LmStudioRerank(Base):
|
||||
def __init__(self, key, model_name, base_url):
|
||||
pass
|
||||
|
||||
def similarity(self, query: str, texts: list):
|
||||
raise NotImplementedError("The LmStudioRerank has not been implement")
|
||||
|
||||
Reference in New Issue
Block a user