diff --git a/wwwroot/api/llm_create.dspy b/wwwroot/api/llm_create.dspy index 17b7d4e..3453614 100644 --- a/wwwroot/api/llm_create.dspy +++ b/wwwroot/api/llm_create.dspy @@ -3,6 +3,7 @@ result = {"widgettype":"Error","options":{"title":"操作失败","message":"Invalid request","cwidth":16,"cheight":9,"timeout":3}} try: + env = request._run_ns dbname = get_module_dbname('llmage') async with DBPools().sqlorContext(dbname) as sor: data = params_kw.copy() @@ -10,6 +11,7 @@ try: data.pop('rows', None) data.pop('data_filter', None) data['id'] = getID() + data['ownerid'] = data.get('ownerid') or await env.get_userorgid() await sor.C('llm', data) result = {"widgettype":"Message","options":{"title":"创建成功","message":"ok","cwidth":16,"cheight":9,"timeout":3}} except Exception as e: