mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-03 19:24:59 +00:00
handle switching to gpt4-vision-preview
This commit is contained in:
parent
90fb538015
commit
c919f9f0c6
4 changed files with 14 additions and 12 deletions
|
@ -1,7 +1,19 @@
|
|||
from pathlib import Path
|
||||
|
||||
# Set of image file extensions
|
||||
IMAGE_EXTENSIONS = {'.png', '.jpg', '.jpeg', '.gif', '.bmp', '.tiff', '.webp'}
|
||||
|
||||
from .dump import dump # noqa: F401
|
||||
|
||||
def is_image_file(file_name):
|
||||
"""
|
||||
Check if the given file name has an image file extension.
|
||||
|
||||
:param file_name: The name of the file to check.
|
||||
:return: True if the file is an image, False otherwise.
|
||||
"""
|
||||
return any(file_name.endswith(ext) for ext in IMAGE_EXTENSIONS)
|
||||
|
||||
|
||||
def safe_abs_path(res):
|
||||
"Gives an abs path, which safely returns a full (not 8.3) windows path"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue