diff --git a/load_path.sh b/load_path.sh new file mode 100644 index 0000000..ac3c4a9 --- /dev/null +++ b/load_path.sh @@ -0,0 +1,5 @@ +for s in $(ls ls pkgs/*/scripts/load_path.py) +do + echo $s + python $s +done diff --git a/wwwroot/appbase b/wwwroot/appbase new file mode 120000 index 0000000..63a1cc7 --- /dev/null +++ b/wwwroot/appbase @@ -0,0 +1 @@ +../pkgs/appbase/wwwroot \ No newline at end of file diff --git a/wwwroot/pipeline-sdlc b/wwwroot/pipeline-sdlc new file mode 120000 index 0000000..08b9fd6 --- /dev/null +++ b/wwwroot/pipeline-sdlc @@ -0,0 +1 @@ +../pkgs/pipeline-sdlc/wwwroot \ No newline at end of file diff --git a/wwwroot/pipeline_core b/wwwroot/pipeline_core new file mode 120000 index 0000000..1dd2050 --- /dev/null +++ b/wwwroot/pipeline_core @@ -0,0 +1 @@ +/d/apitest/pipeline-app/pkgs/pipeline_core/wwwroot \ No newline at end of file diff --git a/wwwroot/pipeline_core/index.ui b/wwwroot/pipeline_core/index.ui deleted file mode 100644 index 0e4a3bd..0000000 --- a/wwwroot/pipeline_core/index.ui +++ /dev/null @@ -1,89 +0,0 @@ -{ - "widgettype": "VBox", - "options": { - "width": "100%", - "padding": "32px", - "spacing": "24px" - }, - "subwidgets": [ - { - "widgettype": "Title2", - "options": { - "text": "产线管理" - } - }, - { - "widgettype": "Text", - "options": { - "text": "产线定义、步骤配置与发布管理", - "cfontsize": 1.2 - } - }, - { - "widgettype": "ResponsableBox", - "options": { - "gap": "16px", - "minWidth": "250px" - }, - "subwidgets": [ - { - "widgettype": "Button", - "options": { - "label": "产线定义", - "css": "card", - "cwidth": 23, - "cheight": 8 - }, - "binds": [{ - "wid": "self", - "event": "click", - "actiontype": "urlwidget", - "target": "-main_content", - "options": { - "url": "{{entire_url('pipelines/')}}" - }, - "mode": "replace" - }] - }, - { - "widgettype": "Button", - "options": { - "label": "产线步骤", - "css": "card", - "cwidth": 23, - "cheight": 8 - }, - "binds": [{ - "wid": "self", - "event": "click", - "actiontype": "urlwidget", - "target": "-main_content", - "options": { - "url": "{{entire_url('pipeline_steps/')}}" - }, - "mode": "replace" - }] - }, - { - "widgettype": "Button", - "options": { - "label": "发布记录", - "css": "card", - "cwidth": 23, - "cheight": 8 - }, - "binds": [{ - "wid": "self", - "event": "click", - "actiontype": "urlwidget", - "target": "-main_content", - "options": { - "url": "{{entire_url('pipeline_versions/')}}" - }, - "mode": "replace" - }] - } - ] - } - ] -} diff --git a/wwwroot/pipeline_core/llm/create_llm.dspy b/wwwroot/pipeline_core/llm/create_llm.dspy deleted file mode 100644 index 8b81dde..0000000 --- a/wwwroot/pipeline_core/llm/create_llm.dspy +++ /dev/null @@ -1,5 +0,0 @@ -func = create_llm -if func is None: - return json.dumps({'status': 'error', 'message': 'function not found'}) -result = await func(params_kw) -return result diff --git a/wwwroot/pipeline_core/llm/delete_llm.dspy b/wwwroot/pipeline_core/llm/delete_llm.dspy deleted file mode 100644 index 43d74cf..0000000 --- a/wwwroot/pipeline_core/llm/delete_llm.dspy +++ /dev/null @@ -1,5 +0,0 @@ -func = delete_llm -if func is None: - return json.dumps({'status': 'error', 'message': 'function not found'}) -result = await func(params_kw) -return result diff --git a/wwwroot/pipeline_core/llm/get_llms.dspy b/wwwroot/pipeline_core/llm/get_llms.dspy deleted file mode 100644 index 931ad3a..0000000 --- a/wwwroot/pipeline_core/llm/get_llms.dspy +++ /dev/null @@ -1,11 +0,0 @@ -from sqlor.dbpools import DBPools - -async def main(): - dbname = get_module_dbname('pipeline_core') - async with DBPools().sqlorContext(dbname) as sor: - recs = await sor.R('llm', {'status': 'active'}) - if not recs: - recs = await sor.R('llm', {}) - if not recs: - recs = [] - return recs diff --git a/wwwroot/pipeline_core/llm/index.ui b/wwwroot/pipeline_core/llm/index.ui deleted file mode 100644 index 8757abd..0000000 --- a/wwwroot/pipeline_core/llm/index.ui +++ /dev/null @@ -1,187 +0,0 @@ - -{ - "widgettype":"VBox", - "options":{"height":"100%","width":"100%"}, - "subwidgets":[ -{ - "id":"llm_tbl", - "widgettype":"Tabular", - "options":{ - "width":"100%", - "height":"100%", - - - "title":"大语言模型表", - - - - - "css":"card", - - - "editable":{ - - "new_data_url": "{{entire_url('./add_llm.dspy')}}", - - - "delete_data_url": "{{entire_url('./delete_llm.dspy')}}", - - - "update_data_url": "{{entire_url('./update_llm.dspy')}}" - - - }, - - - "data_url":"{{entire_url('./get_llm.dspy')}}", - - "data_method":"GET", - "data_params":{{json.dumps(params_kw, indent=4, ensure_ascii=False)}}, - "row_options":{ - - - - "browserfields": { - "exclouded": [ - "id", - "api_key" - ], - "cwidth": {} -}, - - - "editexclouded":[ - "id", - "created_at", - "updated_at" -], - - "fields":[ - { - "name": "id", - "title": "主键", - "type": "str", - "length": 32, - "nullable": "no", - "cwidth": 18, - "uitype": "str", - "datatype": "str", - "label": "主键" - }, - { - "name": "name", - "title": "模型名称", - "type": "str", - "length": 100, - "nullable": "no", - "cwidth": 18, - "uitype": "str", - "datatype": "str", - "label": "模型名称" - }, - { - "name": "provider", - "title": "供应商", - "type": "str", - "length": 50, - "nullable": "no", - "cwidth": 18, - "uitype": "str", - "datatype": "str", - "label": "供应商" - }, - { - "name": "model_id", - "title": "模型标识", - "type": "str", - "length": 100, - "cwidth": 18, - "uitype": "str", - "datatype": "str", - "label": "模型标识" - }, - { - "name": "api_base", - "title": "API地址", - "type": "str", - "length": 500, - "cwidth": 18, - "uitype": "str", - "datatype": "str", - "label": "API地址" - }, - { - "name": "api_key", - "title": "API密钥", - "type": "str", - "length": 500, - "cwidth": 18, - "uitype": "password", - "datatype": "str", - "label": "API密钥" - }, - { - "name": "max_tokens", - "title": "最大Token", - "type": "int", - "default": "8192", - "length": 0, - "uitype": "int", - "datatype": "int", - "label": "最大Token" - }, - { - "name": "status", - "title": "状态", - "type": "str", - "length": 20, - "default": "active", - "cwidth": 18, - "uitype": "str", - "datatype": "str", - "label": "状态" - }, - { - "name": "description", - "title": "描述", - "type": "text", - "length": 0, - "uitype": "text", - "datatype": "text", - "label": "描述" - }, - { - "name": "created_at", - "title": "创建时间", - "type": "timestamp", - "length": 0, - "uitype": "str", - "datatype": "timestamp", - "label": "创建时间" - }, - { - "name": "updated_at", - "title": "更新时间", - "type": "timestamp", - "length": 0, - "uitype": "str", - "datatype": "timestamp", - "label": "更新时间" - } -] - }, - - - - - - - - "page_rows":160, - "cache_limit":5 - } - - ,"binds":[] - -}] -} \ No newline at end of file diff --git a/wwwroot/pipeline_core/llm/update_llm.dspy b/wwwroot/pipeline_core/llm/update_llm.dspy deleted file mode 100644 index 00b969e..0000000 --- a/wwwroot/pipeline_core/llm/update_llm.dspy +++ /dev/null @@ -1,5 +0,0 @@ -func = update_llm -if func is None: - return json.dumps({'status': 'error', 'message': 'function not found'}) -result = await func(params_kw) -return result diff --git a/wwwroot/pipeline_core/pipelines/create_pipeline.dspy b/wwwroot/pipeline_core/pipelines/create_pipeline.dspy deleted file mode 100644 index ef6e24b..0000000 --- a/wwwroot/pipeline_core/pipelines/create_pipeline.dspy +++ /dev/null @@ -1,5 +0,0 @@ -func = create_pipeline -if func is None: - return json.dumps({'status': 'error', 'message': 'function not found'}) -result = await func(params_kw) -return result diff --git a/wwwroot/pipeline_core/pipelines/delete_pipeline.dspy b/wwwroot/pipeline_core/pipelines/delete_pipeline.dspy deleted file mode 100644 index 3a07d83..0000000 --- a/wwwroot/pipeline_core/pipelines/delete_pipeline.dspy +++ /dev/null @@ -1,5 +0,0 @@ -func = delete_pipeline -if func is None: - return json.dumps({'status': 'error', 'message': 'function not found'}) -result = await func(params_kw) -return result diff --git a/wwwroot/pipeline_core/pipelines/get_llm_list.dspy b/wwwroot/pipeline_core/pipelines/get_llm_list.dspy deleted file mode 100644 index aae52b1..0000000 --- a/wwwroot/pipeline_core/pipelines/get_llm_list.dspy +++ /dev/null @@ -1,8 +0,0 @@ -from sqlor.dbpools import DBPools - -async def main(): - dbname = get_module_dbname('pipeline_core') - async with DBPools().sqlorContext(dbname) as sor: - recs = await sor.R('llm', {'status': 'active'}) - result = [{'value': r.api_base or '', 'text': r.name, 'api_base': r.api_base or '', 'name': r.name, 'provider': r.provider} for r in recs] - return json.dumps(result) diff --git a/wwwroot/pipeline_core/pipelines/get_pipelines.dspy b/wwwroot/pipeline_core/pipelines/get_pipelines.dspy deleted file mode 100644 index 3e2f2b8..0000000 --- a/wwwroot/pipeline_core/pipelines/get_pipelines.dspy +++ /dev/null @@ -1,11 +0,0 @@ -from sqlor.dbpools import DBPools - -async def main(): - dbname = get_module_dbname('pipeline_core') - async with DBPools().sqlorContext(dbname) as sor: - recs = await sor.R('pipelines', {'status': 'published'}) - if not recs: - recs = await sor.R('pipelines', {}) - if not recs: - recs = [] - return recs diff --git a/wwwroot/pipeline_core/pipelines/index.ui b/wwwroot/pipeline_core/pipelines/index.ui deleted file mode 100644 index 0cb6ec3..0000000 --- a/wwwroot/pipeline_core/pipelines/index.ui +++ /dev/null @@ -1,58 +0,0 @@ -{ - "widgettype": "Tabular", - "id": "pipelines_tbl", - "options": { - "width": "100%", - "title": "产线定义", - "css": "card", - "data_url": "{{entire_url('./get_pipelines.dspy')}}", - "data_method": "GET", - "editable": { - "new_data_url": "{{entire_url('./create_pipeline.dspy')}}", - "update_data_url": "{{entire_url('./update_pipeline.dspy')}}", - "delete_data_url": "{{entire_url('./delete_pipeline.dspy')}}" - }, - "browserfields": { - "exclouded": ["id", "model_api_key", "pipeline_config"], - "alters": { - "pipeline_type": { - "uitype": "code", - "data": [ - {"value": "dev", "text": "开发"}, - {"value": "test", "text": "测试"}, - {"value": "ktv", "text": "KTV"}, - {"value": "deploy", "text": "部署"}, - {"value": "ops", "text": "运维"} - ] - }, - "status": { - "uitype": "code", - "data": [ - {"value": "draft", "text": "草稿"}, - {"value": "published", "text": "已发布"}, - {"value": "archived", "text": "已归档"} - ] - }, - "model_api_url": { - "uitype": "code", - "dataurl": "{{entire_url('./get_llm_list.dspy')}}", - "valueField": "api_base", - "textField": "name" - } - } - }, - "editexclouded": ["id", "created_at", "updated_at"], - "fields": [ - {"name": "id", "title": "ID", "type": "str", "cwidth": 0}, - {"name": "name", "title": "产线名称", "type": "str", "cwidth": 18}, - {"name": "description", "title": "描述", "type": "str", "cwidth": 18}, - {"name": "pipeline_type", "title": "产线类型", "type": "str", "cwidth": 12}, - {"name": "version", "title": "版本", "type": "str", "cwidth": 10}, - {"name": "status", "title": "状态", "type": "str", "cwidth": 10}, - {"name": "org_id", "title": "所属机构", "type": "str", "cwidth": 10}, - {"name": "created_by", "title": "创建人", "type": "str", "cwidth": 10}, - {"name": "created_at", "title": "创建时间", "type": "str", "cwidth": 14}, - {"name": "updated_at", "title": "更新时间", "type": "str", "cwidth": 14} - ] - } -} diff --git a/wwwroot/pipeline_core/pipelines/update_pipeline.dspy b/wwwroot/pipeline_core/pipelines/update_pipeline.dspy deleted file mode 100644 index ed3b6c0..0000000 --- a/wwwroot/pipeline_core/pipelines/update_pipeline.dspy +++ /dev/null @@ -1,5 +0,0 @@ -func = update_pipeline -if func is None: - return json.dumps({'status': 'error', 'message': 'function not found'}) -result = await func(params_kw) -return result diff --git a/wwwroot/pipeline_sdlc b/wwwroot/pipeline_sdlc new file mode 120000 index 0000000..ffd9d7a --- /dev/null +++ b/wwwroot/pipeline_sdlc @@ -0,0 +1 @@ +pipeline-sdlc \ No newline at end of file diff --git a/wwwroot/pipeline_task b/wwwroot/pipeline_task new file mode 120000 index 0000000..d49245e --- /dev/null +++ b/wwwroot/pipeline_task @@ -0,0 +1 @@ +/d/apitest/pipeline-app/pkgs/pipeline-task/wwwroot \ No newline at end of file diff --git a/wwwroot/pipeline_task.bak/index.ui b/wwwroot/pipeline_task.bak/index.ui new file mode 100644 index 0000000..eabbf3b --- /dev/null +++ b/wwwroot/pipeline_task.bak/index.ui @@ -0,0 +1 @@ +{"widgettype":"VBox","options":{"padding":"24px"},"subwidgets":[{"widgettype":"Title2","options":{"text":"任务中心"}},{"widgettype":"Text","options":{"text":"查看和管理产线任务执行情况","cfontsize":1.1,"color":"#888"}}]} diff --git a/wwwroot/rbac b/wwwroot/rbac new file mode 120000 index 0000000..d514a57 --- /dev/null +++ b/wwwroot/rbac @@ -0,0 +1 @@ +../pkgs/rbac/wwwroot \ No newline at end of file diff --git a/wwwroot/showcase b/wwwroot/showcase new file mode 120000 index 0000000..2c5f9df --- /dev/null +++ b/wwwroot/showcase @@ -0,0 +1 @@ +../pkgs/showcase/wwwroot \ No newline at end of file diff --git a/wwwroot/tenant b/wwwroot/tenant new file mode 120000 index 0000000..edf7778 --- /dev/null +++ b/wwwroot/tenant @@ -0,0 +1 @@ +../pkgs/tenant/wwwroot \ No newline at end of file