File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 11import type { ModelData } from "./model-data" ;
22import type { PipelineType } from "./pipelines" ;
33
4- type Snippet = {
4+ interface Snippet {
55 title : string ;
66 setup : string ;
77 command : string ;
8- } ;
8+ }
99
1010/**
1111 * Elements configurable by a local app.
@@ -53,13 +53,13 @@ function isGgufModel(model: ModelData) {
5353 return model . tags . includes ( "gguf" ) ;
5454}
5555
56- const snippetLlamacpp = ( model : ModelData ) : Snippet [ ] => {
56+ const snippetLlamacpp = ( model : ModelData , filepath ?: string ) : Snippet [ ] => {
5757 const command = ( binary : string ) =>
5858 [
5959 "# Load and run the model:" ,
6060 `${ binary } \\` ,
61- ' --hf-repo "${model.id}" \\' ,
62- " --hf-file {{ GGUF_FILE}} \\" ,
61+ ` --hf-repo "${ model . id } " \\` ,
62+ ` --hf-file ${ filepath ?? "{{ GGUF_FILE}}" } \\` ,
6363 ' -p "You are a helpful assistant" \\' ,
6464 " --conversation" ,
6565 ] . join ( "\n" ) ;
You can’t perform that action at this time.
0 commit comments