File tree 1 file changed +5
-5
lines changed 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
import type { ModelData } from "./model-data" ;
2
2
import type { PipelineType } from "./pipelines" ;
3
3
4
- type Snippet = {
4
+ interface Snippet {
5
5
title : string ;
6
6
setup : string ;
7
7
command : string ;
8
- } ;
8
+ }
9
9
10
10
/**
11
11
* Elements configurable by a local app.
@@ -53,13 +53,13 @@ function isGgufModel(model: ModelData) {
53
53
return model . tags . includes ( "gguf" ) ;
54
54
}
55
55
56
- const snippetLlamacpp = ( model : ModelData ) : Snippet [ ] => {
56
+ const snippetLlamacpp = ( model : ModelData , filepath ?: string ) : Snippet [ ] => {
57
57
const command = ( binary : string ) =>
58
58
[
59
59
"# Load and run the model:" ,
60
60
`${ binary } \\` ,
61
- ' --hf-repo "${model.id}" \\' ,
62
- " --hf-file {{ GGUF_FILE}} \\" ,
61
+ ` --hf-repo "${ model . id } " \\` ,
62
+ ` --hf-file ${ filepath ?? "{{ GGUF_FILE}}" } \\` ,
63
63
' -p "You are a helpful assistant" \\' ,
64
64
" --conversation" ,
65
65
] . join ( "\n" ) ;
You can’t perform that action at this time.
0 commit comments