Thomas G. Lopes commited on
Commit
01e9501
·
1 Parent(s): 01e2d92
Files changed (1) hide show
  1. src/lib/stores/session.ts +3 -4
src/lib/stores/session.ts CHANGED
@@ -1,7 +1,7 @@
1
  import { browser } from "$app/environment";
2
  import { goto } from "$app/navigation";
3
  import { defaultGenerationConfig } from "$lib/components/InferencePlayground/generationConfigSettings";
4
- import { defaultSystemMessage } from "$lib/components/InferencePlayground/inferencePlaygroundUtils";
5
  import {
6
  PipelineTag,
7
  type Conversation,
@@ -9,9 +9,8 @@ import {
9
  type ModelWithTokenizer,
10
  type Session,
11
  } from "$lib/types";
12
- import { models } from "$lib/stores/models";
13
- import { get, writable } from "svelte/store";
14
  import { getTrending } from "$lib/utils/model";
 
15
 
16
  const LOCAL_STORAGE_KEY = "hf_inference_playground_session";
17
 
@@ -37,7 +36,7 @@ const emptyModel: ModelWithTokenizer = {
37
  };
38
 
39
  function createSessionStore() {
40
- const store = writable<Session>(undefined, (set, update) => {
41
  const $models = get(models);
42
  const featured = getTrending($models);
43
  const defaultModel = featured[0] ?? $models[0] ?? emptyModel;
 
1
  import { browser } from "$app/environment";
2
  import { goto } from "$app/navigation";
3
  import { defaultGenerationConfig } from "$lib/components/InferencePlayground/generationConfigSettings";
4
+ import { models } from "$lib/stores/models";
5
  import {
6
  PipelineTag,
7
  type Conversation,
 
9
  type ModelWithTokenizer,
10
  type Session,
11
  } from "$lib/types";
 
 
12
  import { getTrending } from "$lib/utils/model";
13
+ import { get, writable } from "svelte/store";
14
 
15
  const LOCAL_STORAGE_KEY = "hf_inference_playground_session";
16
 
 
36
  };
37
 
38
  function createSessionStore() {
39
+ const store = writable<Session>(undefined, set => {
40
  const $models = get(models);
41
  const featured = getTrending($models);
42
  const defaultModel = featured[0] ?? $models[0] ?? emptyModel;