소스 검색

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 5 달 전
부모
커밋
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)