Spaces:
Sleeping
Sleeping
wip
Browse files21 unmodified lines2223242526272829303132333435363779 unmodified lines1171181191201211221235 unmodified lines12913013113213313413521 unmodified linesconst startMessages: ChatCompletionInputMessage[] = [{ role: 'user', content: '' }];let conversations: Conversation[] = [{model: models[0],config: defaultGenerationConfig,messages: startMessages,streaming: true}];$: conversation = conversations[0];let systemMessage: ChatCompletionInputMessage = { role: 'system', content: '' };let hfToken: string | null = import.meta.env.VITE_HF_TOKEN;79 unmodified linesif (streamingMessage) {streamingMessage.content = content;conversation.messages = [...conversation.messages];conversations = conversations;}},abortController,5 unmodified lines// check if the user did not abort the requestif (waitForNonStreaming) {conversation.messages = [...conversation.messages, newMessage];conversations = conversations;}}21 unmodified lines22232425262728293031323379 unmodified lines1131141151161171185 unmodified lines12412512612712812921 unmodified linesconst startMessages: ChatCompletionInputMessage[] = [{ role: 'user', content: '' }];let conversation: Conversation = {model: models[0],config: defaultGenerationConfig,messages: startMessages,streaming: true};let systemMessage: ChatCompletionInputMessage = { role: 'system', content: '' };let hfToken: string | null = import.meta.env.VITE_HF_TOKEN;79 unmodified linesif (streamingMessage) {streamingMessage.content = content;conversation.messages = [...conversation.messages];}},abortController,5 unmodified lines// check if the user did not abort the requestif (waitForNonStreaming) {conversation.messages = [...conversation.messages, newMessage];}}
src/lib/components/InferencePlayground/InferencePlayground.svelte+6-12