diff --git a/omnitool/gradio/agent/vlm_agent.py b/omnitool/gradio/agent/vlm_agent.py index 9f631a70..50aa6f04 100644 --- a/omnitool/gradio/agent/vlm_agent.py +++ b/omnitool/gradio/agent/vlm_agent.py @@ -41,6 +41,8 @@ def __init__( ): if model == "omniparser + gpt-4o": self.model = "gpt-4o-2024-11-20" + elif model == "omniparser + gpt-4.5-preview": + self.model = "gpt-4.5-preview" elif model == "omniparser + R1": self.model = "deepseek-r1-distill-llama-70b" elif model == "omniparser + qwen2.5vl": diff --git a/omnitool/gradio/agent/vlm_agent_with_orchestrator.py b/omnitool/gradio/agent/vlm_agent_with_orchestrator.py index 650a8e30..a8d9d7c8 100644 --- a/omnitool/gradio/agent/vlm_agent_with_orchestrator.py +++ b/omnitool/gradio/agent/vlm_agent_with_orchestrator.py @@ -77,6 +77,8 @@ def __init__( ): if model == "omniparser + gpt-4o" or model == "omniparser + gpt-4o-orchestrated": self.model = "gpt-4o-2024-11-20" + elif model == "omniparser + gpt-4.5-preview" or model == "omniparser + gpt-4.5-preview-orchestrated": + self.model = "gpt-4.5-preview" elif model == "omniparser + R1" or model == "omniparser + R1-orchestrated": self.model = "deepseek-r1-distill-llama-70b" elif model == "omniparser + qwen2.5vl" or model == "omniparser + qwen2.5vl-orchestrated": diff --git a/omnitool/gradio/app.py b/omnitool/gradio/app.py index 54cca8a0..b02226fb 100644 --- a/omnitool/gradio/app.py +++ b/omnitool/gradio/app.py @@ -302,7 +302,7 @@ def get_header_image_base64(): with gr.Column(): model = gr.Dropdown( label="Model", - choices=["omniparser + gpt-4o", "omniparser + o1", "omniparser + o3-mini", "omniparser + R1", "omniparser + qwen2.5vl", "claude-3-5-sonnet-20241022", "omniparser + gpt-4o-orchestrated", "omniparser + o1-orchestrated", "omniparser + o3-mini-orchestrated", "omniparser + R1-orchestrated", "omniparser + qwen2.5vl-orchestrated"], + choices=["omniparser + gpt-4.5-preview","omniparser + gpt-4.5-preview-orchestrated","omniparser + gpt-4o", "omniparser + o1", "omniparser + o3-mini", "omniparser + R1", "omniparser + qwen2.5vl", "claude-3-5-sonnet-20241022", "omniparser + gpt-4o-orchestrated", "omniparser + o1-orchestrated", "omniparser + o3-mini-orchestrated", "omniparser + R1-orchestrated", "omniparser + qwen2.5vl-orchestrated"], value="omniparser + gpt-4o", interactive=True, ) @@ -356,7 +356,7 @@ def update_model(model_selection, state): if model_selection == "claude-3-5-sonnet-20241022": provider_choices = [option.value for option in APIProvider if option.value != "openai"] - elif model_selection in set(["omniparser + gpt-4o", "omniparser + o1", "omniparser + o3-mini", "omniparser + gpt-4o-orchestrated", "omniparser + o1-orchestrated", "omniparser + o3-mini-orchestrated"]): + elif model_selection in set(["omniparser + gpt-4.5-preview","omniparser + gpt-4.5-preview-orchestrated","omniparser + gpt-4o", "omniparser + o1", "omniparser + o3-mini", "omniparser + gpt-4o-orchestrated", "omniparser + o1-orchestrated", "omniparser + o3-mini-orchestrated"]): provider_choices = ["openai"] elif model_selection == "omniparser + R1": provider_choices = ["groq"] diff --git a/omnitool/gradio/app_new.py b/omnitool/gradio/app_new.py index a9e5e6d2..454eaa0a 100644 --- a/omnitool/gradio/app_new.py +++ b/omnitool/gradio/app_new.py @@ -528,7 +528,7 @@ def auto_refresh_files(state): with gr.Column(): model = gr.Dropdown( label="Model", - choices=["omniparser + gpt-4o", "omniparser + o1", "omniparser + o3-mini", "omniparser + R1", "omniparser + qwen2.5vl", "claude-3-5-sonnet-20241022", "omniparser + gpt-4o-orchestrated", "omniparser + o1-orchestrated", "omniparser + o3-mini-orchestrated", "omniparser + R1-orchestrated", "omniparser + qwen2.5vl-orchestrated"], + choices=["omniparser + gpt-4.5-preview-orchestrated","omniparser + gpt-4.5-preview","omniparser + gpt-4o", "omniparser + o1", "omniparser + o3-mini", "omniparser + R1", "omniparser + qwen2.5vl", "claude-3-5-sonnet-20241022", "omniparser + gpt-4o-orchestrated", "omniparser + o1-orchestrated", "omniparser + o3-mini-orchestrated", "omniparser + R1-orchestrated", "omniparser + qwen2.5vl-orchestrated"], value="omniparser + gpt-4o-orchestrated", interactive=True, container=True @@ -623,7 +623,7 @@ def update_model(model_selection, state): if model_selection == "claude-3-5-sonnet-20241022": provider_choices = [option.value for option in APIProvider if option.value != "openai"] - elif model_selection in set(["omniparser + gpt-4o", "omniparser + o1", "omniparser + o3-mini", "omniparser + gpt-4o-orchestrated", "omniparser + o1-orchestrated", "omniparser + o3-mini-orchestrated"]): + elif model_selection in set(["omniparser + gpt-4.5-preview-orchestrated", "omniparser + gpt-4.5-preview","omniparser + gpt-4o", "omniparser + o1", "omniparser + o3-mini", "omniparser + gpt-4o-orchestrated", "omniparser + o1-orchestrated", "omniparser + o3-mini-orchestrated"]): provider_choices = ["openai"] elif model_selection == "omniparser + R1": provider_choices = ["groq"] diff --git a/omnitool/gradio/loop.py b/omnitool/gradio/loop.py index 9ce63169..23856667 100644 --- a/omnitool/gradio/loop.py +++ b/omnitool/gradio/loop.py @@ -66,7 +66,7 @@ def sampling_loop_sync( max_tokens=max_tokens, only_n_most_recent_images=only_n_most_recent_images ) - elif model in set(["omniparser + gpt-4o", "omniparser + o1", "omniparser + o3-mini", "omniparser + R1", "omniparser + qwen2.5vl"]): + elif model in set(["omniparser + gpt-4.5-preview","omniparser + gpt-4o", "omniparser + o1", "omniparser + o3-mini", "omniparser + R1", "omniparser + qwen2.5vl"]): actor = VLMAgent( model=model, provider=provider, @@ -76,7 +76,7 @@ def sampling_loop_sync( max_tokens=max_tokens, only_n_most_recent_images=only_n_most_recent_images ) - elif model in set(["omniparser + gpt-4o-orchestrated", "omniparser + o1-orchestrated", "omniparser + o3-mini-orchestrated", "omniparser + R1-orchestrated", "omniparser + qwen2.5vl-orchestrated"]): + elif model in set(["omniparser + gpt-4.5-preview-orchestrated","omniparser + gpt-4o-orchestrated", "omniparser + o1-orchestrated", "omniparser + o3-mini-orchestrated", "omniparser + R1-orchestrated", "omniparser + qwen2.5vl-orchestrated"]): actor = VLMOrchestratedAgent( model=model, provider=provider, @@ -115,7 +115,7 @@ def sampling_loop_sync( messages.append({"content": tool_result_content, "role": "user"}) - elif model in set(["omniparser + gpt-4o", "omniparser + o1", "omniparser + o3-mini", "omniparser + R1", "omniparser + qwen2.5vl", "omniparser + gpt-4o-orchestrated", "omniparser + o1-orchestrated", "omniparser + o3-mini-orchestrated", "omniparser + R1-orchestrated", "omniparser + qwen2.5vl-orchestrated"]): + elif model in set(["omniparser + gpt-4.5-preview","omniparser + gpt-4.5-preview-orchestrated","omniparser + gpt-4o", "omniparser + o1", "omniparser + o3-mini", "omniparser + R1", "omniparser + qwen2.5vl", "omniparser + gpt-4o-orchestrated", "omniparser + o1-orchestrated", "omniparser + o3-mini-orchestrated", "omniparser + R1-orchestrated", "omniparser + qwen2.5vl-orchestrated"]): while True: parsed_screen = omniparser_client() tools_use_needed, vlm_response_json = actor(messages=messages, parsed_screen=parsed_screen) diff --git a/requirements.txt b/requirements.txt index 901a27fa..80a3f3bc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ torch easyocr torchvision supervision==0.18.0 -openai==1.3.5 +openai==1.66.3 transformers ultralytics==8.3.70 azure-identity