mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-03 19:24:59 +00:00
cleaned up client refs
This commit is contained in:
parent
f1a31d3944
commit
c770fc4380
7 changed files with 16 additions and 30 deletions
|
@ -106,14 +106,12 @@ def show_messages(messages, title=None, functions=None):
|
|||
dump(functions)
|
||||
|
||||
|
||||
def is_gpt4_with_openai_base_url(model_name, client):
|
||||
# TODO: fix this
|
||||
def is_gpt4_with_openai_base_url(model_name):
|
||||
"""
|
||||
Check if the model_name starts with 'gpt-4' and the client base URL includes 'api.openai.com'.
|
||||
|
||||
:param model_name: The name of the model to check.
|
||||
:param client: The OpenAI client instance.
|
||||
:return: True if conditions are met, False otherwise.
|
||||
"""
|
||||
if client is None or not hasattr(client, "base_url"):
|
||||
return False
|
||||
return model_name.startswith("gpt-4") and "api.openai.com" in client.base_url.host
|
||||
return model_name.startswith("gpt-4")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue