diff --git a/extensions/openai/script.py b/extensions/openai/script.py index 039c4699..c5c5f2bb 100644 --- a/extensions/openai/script.py +++ b/extensions/openai/script.py @@ -6,6 +6,7 @@ import requests import yaml from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer from threading import Thread +from modules.utils import get_available_models import numpy as np @@ -184,6 +185,8 @@ class Handler(BaseHTTPRequestHandler): "permission": [] }] + models.extend([{ "id": id, "object": "model", "owned_by": "user", "permission": [] } for id in get_available_models() ]) + response = '' if self.path == '/v1/models': response = json.dumps({