Skip to content

Commit d2d46e1

Browse files
committed
Filter image models only as far as possible
1 parent 166e249 commit d2d46e1

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

pyqt_openai/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,9 @@ def move_bin(filename, dst_dir):
411411
# This has to be managed separately since some of the arguments are different with usual models
412412
O1_MODELS = ["o1-preview", "o1-mini"]
413413

414+
# For filtering out famous LLMs for image models
415+
FAMOUS_LLM_LIST = ["gpt", "claude", "gemini", "llama", "meta", "qwen", "falcon"]
416+
414417
# Overall API configuration data
415418
DEFAULT_API_CONFIGS = [
416419
# OpenAI

pyqt_openai/util/common.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
O1_MODELS,
6464
STT_MODEL,
6565
DEFAULT_DATETIME_FORMAT,
66-
DEFAULT_TOKEN_CHUNK_SIZE, DEFAULT_API_CONFIGS, INDENT_SIZE,
66+
DEFAULT_TOKEN_CHUNK_SIZE, DEFAULT_API_CONFIGS, INDENT_SIZE, FAMOUS_LLM_LIST,
6767
)
6868
from pyqt_openai.config_loader import CONFIG_MANAGER
6969
from pyqt_openai.globals import (
@@ -711,6 +711,8 @@ def get_g4f_image_models() -> list:
711711
index.append(parent.__name__)
712712

713713
models = [model["image_model"] for model in image_models]
714+
# Filter out the models in FAMOUS_LLM_LIST
715+
models = [model for model in models if model not in FAMOUS_LLM_LIST]
714716
return models
715717

716718

0 commit comments

Comments
 (0)