Fourth revision: OpenRouter, live tool stages, Explain layout, share sections
All checks were successful
Verify and publish V2 container / build-and-push (push) Successful in 29s
All checks were successful
Verify and publish V2 container / build-and-push (push) Successful in 29s
- Interactive blocks are encouraged by default; Explain gets a reduced library and never writes practice questions. - Assistant tool steps breathe while running, show live stages from generation and the Python check, and read in the past tense when done. - The assistant asks before searching the web when class materials do not cover a question; clarifying questions list every class's exams and never ask about format (always NCLEX). - Explain opens beside the question from 900px wide, moving the question left while open and back on the next one. - Generate dialog drops the practice set/exam switch (presets cover it) and the Generate buttons lose their icon. - Python check notes are green when every check passed, applied fixes neutral. - Share pages group by exam, then Quizzes, Flashcards, Notes, Class Materials, hiding empty groups; the class page uses the same order. "Documents" is now "Class Materials". - OpenRouter provider replaces the Ollama type; migration 6 turns Ollama connections into OpenAI-compatible ones at /v1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
c595e0ff2c
commit
25bc03ea75
45 changed files with 663 additions and 329 deletions
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* Generic Chat Completions (`POST {base}/chat/completions`) for OpenRouter, Groq,
|
||||
* Together, LM Studio, vLLM, llama.cpp and friends, and the engine behind the
|
||||
* Ollama adapter.
|
||||
* Generic Chat Completions (`POST {base}/chat/completions`) for Groq, Together, LM Studio,
|
||||
* vLLM, llama.cpp, Ollama and friends, and the engine behind the DeepSeek and OpenRouter
|
||||
* adapters.
|
||||
*
|
||||
* These servers agree on the basics and disagree on everything else, so this
|
||||
* adapter is deliberately forgiving:
|
||||
|
|
@ -358,6 +358,8 @@ export async function listCompatModels(o: CompatOptions, signal?: AbortSignal, t
|
|||
const pout = Number(m.pricing.completion);
|
||||
if (Number.isFinite(pin) && pin >= 0) model.priceIn = Math.round(pin * 1e9) / 1e3;
|
||||
if (Number.isFinite(pout) && pout >= 0) model.priceOut = Math.round(pout * 1e9) / 1e3;
|
||||
const pcache = Number(m.pricing.input_cache_read);
|
||||
if (m.pricing.input_cache_read !== undefined && Number.isFinite(pcache) && pcache >= 0) model.priceCachedIn = Math.round(pcache * 1e9) / 1e3;
|
||||
}
|
||||
const caps: Partial<ModelCapabilities> = {};
|
||||
if (Array.isArray(m.supported_parameters)) {
|
||||
|
|
@ -373,7 +375,7 @@ export async function listCompatModels(o: CompatOptions, signal?: AbortSignal, t
|
|||
return withCatalogDefaults(o.kind, found);
|
||||
}
|
||||
|
||||
/** OpenAI-style `/embeddings`, shared with Ollama's compatible endpoint. */
|
||||
/** OpenAI-style `/embeddings` (OpenAI-compatible servers, Ollama's included). */
|
||||
export async function compatEmbed(o: CompatOptions, req: EmbedRequest): Promise<EmbedResult> {
|
||||
const body: Record<string, unknown> = { model: req.model, input: req.inputs, encoding_format: 'float' };
|
||||
if (req.dimensions && /text-embedding-3/.test(req.model)) body.dimensions = req.dimensions;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue