mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-03-14 15:57:27 +00:00
Tree: Format
This commit is contained in:
@@ -22,14 +22,12 @@ class MultimodalEmbeddingWrapper(BaseModel):
|
||||
async def add(self, url: str):
|
||||
# Determine the type of vision embedding to use
|
||||
if not self.type:
|
||||
if (
|
||||
dependencies.exllamav2 and
|
||||
isinstance(model.container.vision_model, ExLlamaV2VisionTower)
|
||||
if dependencies.exllamav2 and isinstance(
|
||||
model.container.vision_model, ExLlamaV2VisionTower
|
||||
):
|
||||
self.type = "ExLlamaV2MMEmbedding"
|
||||
elif (
|
||||
dependencies.exllamav3 and
|
||||
isinstance(model.container.vision_model, Model)
|
||||
elif dependencies.exllamav3 and isinstance(
|
||||
model.container.vision_model, Model
|
||||
):
|
||||
self.type = "MMEmbedding"
|
||||
|
||||
@@ -43,4 +41,4 @@ class MultimodalEmbeddingWrapper(BaseModel):
|
||||
self.content.append(embedding)
|
||||
self.text_alias.append(embedding.text_alias)
|
||||
else:
|
||||
logger.error("No valid vision model to create embedding")
|
||||
logger.error("No valid vision model to create embedding")
|
||||
|
||||
Reference in New Issue
Block a user