mirror of
https://github.com/james-m-jordan/morphik-core.git
synced 2025-05-09 19:32:38 +00:00
add vision tag to openai gpt4o
This commit is contained in:
parent
d7b9b68eb6
commit
70a93020ad
@ -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)
|
||||
|
@ -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."""
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user