Spaces:
Runtime error
Runtime error
Rm jsonMode
Browse filesFiles changed (4)
20 unmodified lines2122232424252627100 unmodified lines12812913013113113213311 unmodified lines145146147149148149150233 unmodified lines38438538638938738838939020 unmodified lines { id: String(Math.random()), model: '01-ai/Yi-1.5-34B-Chat', config: { temperature: 0.5, maxTokens: 2048, streaming: true, jsonMode: false }, config: { temperature: 0.5, maxTokens: 2048, streaming: true }, messages: startMessages } ];100 unmodified lines requestMessages, conversation.config.temperature, conversation.config.maxTokens, conversation.config.jsonMode, (content) => { if (streamingMessage) { streamingMessage.content = content;11 unmodified lines requestMessages, conversation.config.temperature, conversation.config.maxTokens, conversation.config.jsonMode ); // check if the user did not abort the request if (waitForNonStreaming) {233 unmodified lines { id: String(Math.random()), model: e.target.value, config: { temperature: 0.5, maxTokens: 2048, streaming: true, jsonMode: false }, config: { temperature: 0.5, maxTokens: 2048, streaming: true }, messages: [...conversations[0].messages] } ];123456234<script lang="ts"> // export let temperature = 0.5; // export let maxTokens = 2048; // export let streaming = true; // export let jsonMode = true;
export let config; export let classNames = '';</script>17 unmodified lines181920212122235 unmodified lines2930313332333417 unmodified lines525354575556575859606461626317 unmodified lines messages: ChatCompletionInputMessage[], temperature: number, maxTokens: number, jsonMode: boolean, onChunk: (content: string) => void, abortController: AbortController): Promise<void> {5 unmodified lines messages: messages, temperature: temperature, max_tokens: maxTokens, json_mode: jsonMode }, { signal: abortController.signal } )) {17 unmodified lines messages: ChatCompletionInputMessage[], temperature: number, maxTokens: number, jsonMode: boolean): Promise<ChatCompletionInputMessage> { const response = await hf.chatCompletion({ model: model, messages: messages, temperature: temperature, max_tokens: maxTokens, json_mode: jsonMode });
if (response.choices && response.choices.length > 0) {6 unmodified lines789101011126 unmodified lines temperature: number; maxTokens: number; streaming: boolean; jsonMode: boolean;};
type Conversation = {src/lib/components/InferencePlayground/InferencePlayground.svelte+2-4
src/lib/components/InferencePlayground/InferencePlaygroundGenerationConfig.svelte-5
src/lib/components/InferencePlayground/inferencePlaygroundUtils.ts-4
src/lib/types/index.d.ts-1