mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-03 19:24:59 +00:00
making image code more robust
This commit is contained in:
parent
f9ba8e7b41
commit
9ceaf97f08
3 changed files with 9 additions and 6 deletions
|
@ -1,5 +1,4 @@
|
|||
from pathlib import Path
|
||||
from openai import OpenAIError
|
||||
|
||||
# Set of image file extensions
|
||||
IMAGE_EXTENSIONS = {'.png', '.jpg', '.jpeg', '.gif', '.bmp', '.tiff', '.webp'}
|
||||
|
@ -42,6 +41,7 @@ def show_messages(messages, title=None, functions=None):
|
|||
|
||||
if functions:
|
||||
dump(functions)
|
||||
|
||||
def is_gpt4_with_openai_base_url(model_name, client):
|
||||
"""
|
||||
Check if the model_name starts with 'gpt-4' and the client base URL includes 'api.openai.com'.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue