From bb018460d7a3de640d76f94236e4bebb8b02c4be Mon Sep 17 00:00:00 2001 From: "Thomas Dhome Casanova (from Dev Box)" Date: Wed, 22 Jan 2025 21:25:40 -0800 Subject: [PATCH] clean oai --- .../computer_use_demo/gui_agent/llm_utils/oai.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/demo/gradio/computer_use_demo/gui_agent/llm_utils/oai.py b/demo/gradio/computer_use_demo/gui_agent/llm_utils/oai.py index 36cf60b..0ab3760 100644 --- a/demo/gradio/computer_use_demo/gui_agent/llm_utils/oai.py +++ b/demo/gradio/computer_use_demo/gui_agent/llm_utils/oai.py @@ -4,8 +4,6 @@ import logging import base64 import requests -# from computer_use_demo.gui_agent.llm_utils import is_image_path, encode_image - def is_image_path(text): # Checking if the input text ends with typical image file extensions image_extensions = (".jpg", ".jpeg", ".png", ".gif", ".bmp", ".tiff", ".tif") @@ -18,14 +16,6 @@ def encode_image(image_path): """Encode image file to base64.""" with open(image_path, "rb") as image_file: return base64.b64encode(image_file.read()).decode("utf-8") - - - -# from openai import OpenAI -# client = OpenAI( -# api_key=os.environ.get("OPENAI_API_KEY") -# ) - def run_oai_interleaved(messages: list, system: str, llm: str, api_key: str, max_tokens=256, temperature=0):