Spaces:
Running on Zero
Running on Zero
Download backend/llama.cpp/tools/ui/src/lib/utils/stream-identity.ts from kazutab/mindmap-studio: direct link, hf CLI and curl.
- Browser
- Download file 582 Bytes
-
https://huggingface.co/spaces/kazutab/mindmap-studio/resolve/main/backend/llama.cpp/tools/ui/src/lib/utils/stream-identity.ts
- Command line
-
hf download hf://spaces/kazutab/mindmap-studio/backend/llama.cpp/tools/ui/src/lib/utils/stream-identity.ts
-
curl -L -o stream-identity.ts https://huggingface.co/spaces/kazutab/mindmap-studio/resolve/main/backend/llama.cpp/tools/ui/src/lib/utils/stream-identity.ts
582 Bytes
| /** | |
| * Build the conversation identity used by the server side replay buffer. | |
| * | |
| * The server identifies a stream session by a conversation id sent in the | |
| * X-Conversation-Id header. When the user has explicitly picked a model the | |
| * client appends ::modelName, so a per model session stays distinct and the | |
| * router resolves the owning child through its conv_id -> model map. | |
| */ | |
| export function streamIdentity(conversationId: string, model?: string | null): string { | |
| if (!conversationId) return ''; | |
| if (!model) return conversationId; | |
| return `${conversationId}::${model}`; | |
| } | |