Files
Sybil-2/web/src/lib/quick-question.ts
T

26 lines
569 B
TypeScript
Raw Normal View History

2026-08-27 19:30:37 -07:00
import type { Provider } from "./api";
export const QUICK_QUESTION_DEFAULT_MODEL = "chat-latest";
export function pickQuickQuestionModel(provider: Provider, options: string[], preferred: string | null = null) {
if (preferred?.trim()) return preferred.trim();
if (provider === "openai") return QUICK_QUESTION_DEFAULT_MODEL;
return options[0] ?? "";
}
2026-08-27 19:30:37 -07:00
export function buildQuickQuestionRequest({
provider,
model,
content,
}: {
provider: Provider;
model: string;
content: string;
}) {
return {
provider,
model,
question: content,
};
}