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
23 lines
610 B
Plaintext
23 lines
610 B
Plaintext
# cockpit_model_options.dspy - Returns active models with capabilities for dropdown
|
|
# Used by cockpit model selector
|
|
|
|
dbname = get_module_dbname('pipeline-sdlc')
|
|
|
|
async with DBPools().sqlorContext(dbname) as sor:
|
|
recs = await sor.sqlExe(
|
|
"SELECT id, name, provider, model_id, capabilities FROM llm WHERE status='active' ORDER BY name",
|
|
{}
|
|
)
|
|
|
|
rows = []
|
|
for r in recs:
|
|
rows.append({
|
|
'value': r.id,
|
|
'text': f"{r.name} ({r.provider})",
|
|
'provider': r.provider,
|
|
'model_id': r.model_id,
|
|
'capabilities': r.capabilities or 'text',
|
|
})
|
|
|
|
return rows
|