Spaces:
Runtime error
Runtime error
spacing
Browse files1 unmodified line23456789101122 unmodified lines34353637383917 unmodified lines5758596061621 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 linesthrow new Error("No response from the model");}export function isSystemPromptSupported(model: ModelEntryWithTokenizer) {return model.tokenizerConfig?.chat_template?.includes("system");}1 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 linesthrow 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