64e4c79fc3
Add a new Rerank tab to the playground that lets users test /v1/rerank endpoints. Supports a visual table editor and a JSON editor mode that stay in sync when toggling between them. - add rerankApi.ts with typed wrapper for /v1/rerank - add RerankInterface.svelte with query input, sortable document table, color-coded scores, auto-add row, cancel/clear, and token usage - add rerankLoading store to playgroundActivity derived store - register Rerank tab in Playground.svelte Updates #481
21 lines
619 B
TypeScript
21 lines
619 B
TypeScript
import { writable, derived } from "svelte/store";
|
|
|
|
const chatStreaming = writable(false);
|
|
const imageGenerating = writable(false);
|
|
const speechGenerating = writable(false);
|
|
const audioTranscribing = writable(false);
|
|
const rerankLoading = writable(false);
|
|
|
|
export const playgroundActivity = derived(
|
|
[chatStreaming, imageGenerating, speechGenerating, audioTranscribing, rerankLoading],
|
|
([$chat, $image, $speech, $audio, $rerank]) => $chat || $image || $speech || $audio || $rerank
|
|
);
|
|
|
|
export const playgroundStores = {
|
|
chatStreaming,
|
|
imageGenerating,
|
|
speechGenerating,
|
|
audioTranscribing,
|
|
rerankLoading,
|
|
};
|