add support for TogetherAI (#1890)
### What problem does this PR solve? #1853 add support for TogetherAI ### Type of change - [x] New Feature (non-breaking change which adds functionality) --------- Co-authored-by: Zhedong Cen <cenzhedong2@126.com> Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
This commit is contained in:
@@ -245,3 +245,11 @@ class CoHereRerank(Base):
|
||||
rank = np.array([d.relevance_score for d in res.results])
|
||||
indexs = [d.index for d in res.results]
|
||||
return rank[indexs], token_count
|
||||
|
||||
|
||||
class TogetherAIRerank(Base):
|
||||
def __init__(self, key, model_name, base_url):
|
||||
pass
|
||||
|
||||
def similarity(self, query: str, texts: list):
|
||||
raise NotImplementedError("The api has not been implement")
|
||||
Reference in New Issue
Block a user