File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
src/lib/components/InferencePlayground Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export async function handleStreamingResponse(
26
26
temperature : conversation . config . temperature ,
27
27
max_tokens : conversation . config . maxTokens ,
28
28
} ,
29
- { signal : abortController . signal }
29
+ { signal : abortController . signal , use_cache : false }
30
30
) ) {
31
31
if ( chunk . choices && chunk . choices . length > 0 && chunk . choices [ 0 ] ?. delta ?. content ) {
32
32
out += chunk . choices [ 0 ] . delta . content ;
@@ -45,12 +45,15 @@ export async function handleNonStreamingResponse(
45
45
...conversation . messages ,
46
46
] ;
47
47
48
- const response = await hf . chatCompletion ( {
49
- model : model . id ,
50
- messages,
51
- temperature : conversation . config . temperature ,
52
- max_tokens : conversation . config . maxTokens ,
53
- } ) ;
48
+ const response = await hf . chatCompletion (
49
+ {
50
+ model : model . id ,
51
+ messages,
52
+ temperature : conversation . config . temperature ,
53
+ max_tokens : conversation . config . maxTokens ,
54
+ } ,
55
+ { use_cache : false }
56
+ ) ;
54
57
55
58
if ( response . choices && response . choices . length > 0 ) {
56
59
const { message } = response . choices [ 0 ] ;
You can’t perform that action at this time.
0 commit comments