فهرست منبع

Merge pull request #12549 from ulagbulag/fix/500-when-unknown-models

fix: internal server error when calling completions API with non-existent model names
Timothy Jaeryang Baek 2 ماه پیش
والد
کامیت
d1a77a9110
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      backend/open_webui/main.py

+ 3 - 0
backend/open_webui/main.py

@@ -1053,6 +1053,9 @@ async def chat_completion(
     model_item = form_data.pop("model_item", {})
     tasks = form_data.pop("background_tasks", None)
 
+    # placeholder
+    metadata = {}
+
     try:
         if not model_item.get("direct", False):
             model_id = form_data.get("model", None)