Spaces:
Runtime error
Runtime error
spacing
Browse files1 unmodified line234567891011121322 unmodified lines3637383940414217 unmodified lines606162636465661 unmodified lineimport { HfInference } from "@huggingface/inference";import type { Conversation, ModelEntryWithTokenizer } from "$lib/types";
export function createHfInference(token: string): HfInference { return new HfInference(token);}
export async function handleStreamingResponse( hf: HfInference, conversation: Conversation,22 unmodified lines }}
export async function handleNonStreamingResponse( hf: HfInference, conversation: Conversation,17 unmodified lines throw new Error("No response from the model");}
export function isSystemPromptSupported(model: ModelEntryWithTokenizer) { return model.tokenizerConfig?.chat_template?.includes("system");}src/lib/components/InferencePlayground/inferencePlaygroundUtils.ts+4