clean oai
This commit is contained in:
@@ -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):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user