We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7f9f957 + 72768c2 commit 9901e3dCopy full SHA for 9901e3d
1 file changed
examples/pipelines/providers/openai_manifold_pipeline.py
@@ -59,14 +59,21 @@ def get_openai_models(self):
59
f"{self.valves.OPENAI_API_BASE_URL}/models", headers=headers
60
)
61
62
+ allowed_models = [
63
+ "gpt",
64
+ "o1",
65
+ "o3",
66
+ "o4",
67
+ ]
68
+
69
models = r.json()
70
return [
71
{
72
"id": model["id"],
73
"name": model["name"] if "name" in model else model["id"],
74
}
75
for model in models["data"]
- if "gpt" in model["id"] or "o1" in model["id"] or "o3" in model["id"]
76
+ if any(substring in model["id"] for substring in allowed_models)
77
]
78
79
except Exception as e:
0 commit comments