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
11 lines
486 B
Plaintext
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)
|