add vision tag to openai gpt4o

This commit is contained in:
Arnav Agrawal 2025-04-13 18:51:55 -07:00
parent d7b9b68eb6
commit 70a93020ad
3 changed files with 4 additions and 4 deletions

View File

@ -95,7 +95,8 @@ class LiteLLMCompletionModel(BaseCompletionModel):
}
# Add up to 3 images
for img_url in image_urls[:3]:
NUM_IMAGES = min(3, len(image_urls))
for img_url in image_urls[:NUM_IMAGES]:
user_message["content"].append({"type": "image_url", "image_url": {"url": img_url}})
messages.append(user_message)

View File

@ -18,7 +18,6 @@ class UserService:
"""Initialize the UserService."""
self.settings = get_settings()
self.db = UserLimitsDatabase(uri=self.settings.POSTGRES_URI)
self.db.initialize()
async def initialize(self) -> bool:
"""Initialize database tables."""

View File

@ -13,7 +13,7 @@ dev_permissions = ["read", "write", "admin"] # Default dev permissions
#### Registered models
[registered_models]
# OpenAI models
openai_gpt4o = { model_name = "gpt-4o" }
openai_gpt4o = { model_name = "gpt-4o", vision = true }
openai_gpt4 = { model_name = "gpt-4" }
# Azure OpenAI models
@ -47,7 +47,7 @@ ollama_embedding_docker_docker = { model_name = "ollama/nomic-embed-text", api_b
#### Component configurations ####
[completion]
model = "ollama_llama" # Reference to a key in registered_models
model = "openai_gpt4o" # Reference to a key in registered_models
default_max_tokens = "1000"
default_temperature = 0.5