Code formatting and doc update (#2130)

This commit is contained in:
Dev Khant
2025-01-09 20:48:18 +05:30
committed by GitHub
parent 21854c6a24
commit a8f3ec25b7
10 changed files with 83 additions and 126 deletions

View File

@@ -16,7 +16,7 @@ class TogetherEmbedding(EmbeddingBase):
# TODO: check if this is correct
self.config.embedding_dims = self.config.embedding_dims or 768
self.client = Together(api_key=api_key)
def embed(self, text):
"""
Get the embedding for the given text using OpenAI.
@@ -28,4 +28,4 @@ class TogetherEmbedding(EmbeddingBase):
list: The embedding vector.
"""
return self.client.embeddings.create(model=self.config.model, input=text).data[0].embedding
return self.client.embeddings.create(model=self.config.model, input=text).data[0].embedding