mirror of
https://github.com/cpacker/MemGPT.git
synced 2025-06-03 04:30:22 +00:00
feat: fix model listing for openai (#1372)
This commit is contained in:
parent
e1ec91baff
commit
de16a17f65
@ -157,6 +157,23 @@ class OpenAIProvider(Provider):
|
||||
# if "config" in data and "chat_template" in data["config"] and "tools" not in data["config"]["chat_template"]:
|
||||
# continue
|
||||
|
||||
# for openai, filter models
|
||||
if self.base_url == "https://api.openai.com/v1":
|
||||
allowed_types = ["gpt-4", "o1", "o3"]
|
||||
disallowed_types = ["transcribe", "search", "realtime", "tts", "audio", "computer"]
|
||||
skip = True
|
||||
for model_type in allowed_types:
|
||||
if model_name.startswith(model_type):
|
||||
skip = False
|
||||
break
|
||||
for keyword in disallowed_types:
|
||||
if keyword in model_name:
|
||||
skip = True
|
||||
break
|
||||
# ignore this model
|
||||
if skip:
|
||||
continue
|
||||
|
||||
configs.append(
|
||||
LLMConfig(
|
||||
model=model_name,
|
||||
|
615
poetry.lock
generated
615
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@ -56,8 +56,8 @@ nltk = "^3.8.1"
|
||||
jinja2 = "^3.1.5"
|
||||
locust = {version = "^2.31.5", optional = true}
|
||||
wikipedia = {version = "^1.4.0", optional = true}
|
||||
composio-langchain = "^0.7.7"
|
||||
composio-core = "^0.7.7"
|
||||
composio-langchain = "^0.7.10"
|
||||
composio-core = "^0.7.10"
|
||||
alembic = "^1.13.3"
|
||||
pyhumps = "^3.8.0"
|
||||
psycopg2 = {version = "^2.9.10", optional = true}
|
||||
|
Loading…
Reference in New Issue
Block a user