File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 34
34
model = data .models [0 ].id ;
35
35
}
36
36
}
37
+ let customPreprompt = $settings .customPrompts [$settings .activeModel ]
38
+ ? $settings .customInstruction + " \n " + $settings .customPrompts [$settings .activeModel ]
39
+ : undefined ;
37
40
const res = await fetch (` ${base }/conversation ` , {
38
41
method: " POST" ,
39
42
headers: {
40
43
" Content-Type" : " application/json" ,
41
44
},
42
45
body: JSON .stringify ({
43
46
model ,
44
- preprompt: $settings . customPrompts [ $settings . activeModel ] ,
47
+ preprompt: customPreprompt ,
45
48
assistantId: data .assistant ?._id ,
46
49
}),
47
50
});
Original file line number Diff line number Diff line change 10
10
import CarbonCheckmark from " ~icons/carbon/checkmark" ;
11
11
import CarbonAdd from " ~icons/carbon/add" ;
12
12
13
- import LicenseIcon from ' ~icons/carbon/license'
13
+ import LicenseIcon from " ~icons/carbon/license" ;
14
14
import UserIcon from " ~icons/carbon/user" ;
15
15
import { fade , fly } from " svelte/transition" ;
16
16
export let data;
Original file line number Diff line number Diff line change 7
7
$settings .customInstruction = " " ;
8
8
}
9
9
10
- $ : hasCustomInstruction =
11
- $settings .customInstruction !== " " ;
10
+ $ : hasCustomInstruction = $settings .customInstruction !== " " ;
12
11
</script >
13
12
14
13
<div class =" flex flex-col items-start" >
18
17
{#if hasCustomInstruction }
19
18
<button
20
19
class =" ml-auto underline decoration-gray-300 hover:decoration-gray-700"
21
- on:click |stopPropagation ={() =>
22
- ($settings .customInstruction = " " )}
20
+ on:click |stopPropagation ={() => ($settings .customInstruction = " " )}
23
21
>
24
22
Reset
25
23
</button >
You can’t perform that action at this time.
0 commit comments