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 3434model = data .models [0 ].id ;
3535}
3636}
37+ let customPreprompt = $settings .customPrompts [$settings .activeModel ]
38+ ? $settings .customInstruction + " \n " + $settings .customPrompts [$settings .activeModel ]
39+ : undefined ;
3740const res = await fetch (` ${base }/conversation ` , {
3841method: " POST" ,
3942headers: {
4043" Content-Type" : " application/json" ,
4144},
4245body: JSON .stringify ({
4346model ,
44- preprompt: $settings . customPrompts [ $settings . activeModel ] ,
47+ preprompt: customPreprompt ,
4548assistantId: data .assistant ?._id ,
4649}),
4750});
Original file line number Diff line number Diff line change 1010import CarbonCheckmark from " ~icons/carbon/checkmark" ;
1111import CarbonAdd from " ~icons/carbon/add" ;
1212
13- import LicenseIcon from ' ~icons/carbon/license'
13+ import LicenseIcon from " ~icons/carbon/license" ;
1414import UserIcon from " ~icons/carbon/user" ;
1515import { fade , fly } from " svelte/transition" ;
1616export let data;
Original file line number Diff line number Diff line change 77$settings .customInstruction = " " ;
88}
99
10- $ : hasCustomInstruction =
11- $settings .customInstruction !== " " ;
10+ $ : hasCustomInstruction = $settings .customInstruction !== " " ;
1211 </script >
1312
1413<div class =" flex flex-col items-start" >
1817{#if hasCustomInstruction }
1918<button
2019class =" ml-auto underline decoration-gray-300 hover:decoration-gray-700"
21- on:click |stopPropagation ={() =>
22- ($settings .customInstruction = " " )}
20+ on:click |stopPropagation ={() => ($settings .customInstruction = " " )}
2321>
2422Reset
2523</button >
You can’t perform that action at this time.
0 commit comments