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:
黄腾
2024-08-12 10:15:21 +08:00
committed by GitHub
parent 9a6dc89156
commit 94cb66ba80
10 changed files with 62 additions and 5 deletions

View File

@@ -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")