pipeline-sdlc/wwwroot/api/get_pipeline_options.dspy
yumoqing 72cd262cdb feat(cockpit): product-grade LLM integration with context + model mgmt
Backend:
- cockpit_chat.dspy: real LLM calls via llm table config, Hermes-style
  context (system prompt + project/iteration + history), auto model
  selection (multimodal if files, text otherwise)
- cockpit_model_options.dspy: returns active models with capabilities
- llm table: added capabilities column (text/vision/multimodal)

Frontend:
- inputed script: no page reload, updates agent bubble with LLM reply
- stats_row refreshed on success, error shown in bubble

DB:
- sd_agent_settings table for per-user agent preferences
2026-07-31 18:06:27 +08:00

11 lines
486 B
Plaintext

import json
result = json.dumps([{'value': '', 'text': '请选择'}], ensure_ascii=False)
try:
async with get_sor_context(request._run_ns, 'pipeline') as sor:
rows = await sor.sqlExe("select id as value, name as text from pipelines order by name")
r = [{'value': '', 'text': '请选择'}] + list(rows)
return json.dumps(r, ensure_ascii=False)
except Exception as e:
debug(f'get_pipeline_options error: {e}')
return json.dumps(result, ensure_ascii=False)