File size: 334 Bytes
105b369
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
from os import getenv
from typing import Optional

from phi.embedder.openai import OpenAIEmbedder


class TogetherEmbedder(OpenAIEmbedder):
    model: str = "togethercomputer/m2-bert-80M-32k-retrieval"
    dimensions: int = 768
    api_key: Optional[str] = getenv("TOGETHER_API_KEY")
    base_url: str = "https://api.together.xyz/v1"