rag/wwwroot/engine_configs_list/engine_options.dspy

8 lines
320 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import json
env = request._run_ns
async with get_sor_context(env, 'rag') as sor:
recs = await sor.sqlExe(
"SELECT name, model_id FROM llm WHERE status='active' ORDER BY name", {})
rows = [{"value": r.model_id, "text": f"{r.name}{r.model_id}"} for r in recs]
return json.dumps(rows, ensure_ascii=False)