char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
e21152dc9
char/aliceai-t5-moe
1import { CONVERSATION_ID_SEPARATOR } from '$lib/constants' ; 2 3/** 4* Build the conversation identity used by the server side replay buffer. 5* 6* The server identifies a stream session by a conversation id sent in the 7* X-Conversation-Id header. When the user has explicitly picked a model the 8* client appends ::modelName, so a per model session stays distinct and the 9* router resolves the owning child through its conv_id -> model map. 10*/ 11export function streamIdentity ( conversationId :string , model ?:string | null ) :string { 12if ( ! conversationId ) return '' ; 13 14if ( ! model ) return conversationId ; 15 16return ` ${ conversationId } ${ CONVERSATION_ID_SEPARATOR } ${ model } ` ; 17}