-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from yusufcanb/22-change-modelfile-naming-conv…
…ention ✨ Modelfile naming convention changed
- Loading branch information
Showing
16 changed files
with
72 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,30 @@ | ||
package explain | ||
|
||
import ( | ||
_ "embed" | ||
"fmt" | ||
ollama "github.com/jmorganca/ollama/api" | ||
) | ||
|
||
//go:embed Modelfile.explain | ||
var modelFile string | ||
|
||
type Explain struct { | ||
api *ollama.Client | ||
modelfileName string | ||
api *ollama.Client | ||
|
||
tag string | ||
modelfile string | ||
} | ||
|
||
func (e *Explain) Tag() string { | ||
return e.tag | ||
} | ||
|
||
func (e *Explain) Modelfile() string { | ||
return e.modelfile | ||
} | ||
|
||
func New(api *ollama.Client) *Explain { | ||
e := &Explain{api: api, modelfileName: "explain:7b"} | ||
return e | ||
func New(api *ollama.Client, version string) *Explain { | ||
modelfileName := fmt.Sprintf("tlm:%s-e", version) | ||
return &Explain{api: api, tag: modelfileName, modelfile: modelFile} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,29 @@ | ||
package suggest | ||
|
||
import ( | ||
_ "embed" | ||
"fmt" | ||
ollama "github.com/jmorganca/ollama/api" | ||
) | ||
|
||
//go:embed Modelfile.suggest | ||
var suggestModelfile string | ||
|
||
type Suggest struct { | ||
api *ollama.Client | ||
modelfileName string | ||
api *ollama.Client | ||
tag string | ||
modelfile string | ||
} | ||
|
||
func (s *Suggest) Tag() string { | ||
return s.tag | ||
} | ||
|
||
func (s *Suggest) Modelfile() string { | ||
return s.modelfile | ||
} | ||
|
||
func New(api *ollama.Client) *Suggest { | ||
return &Suggest{api: api, modelfileName: "suggest:7b"} | ||
func New(api *ollama.Client, version string) *Suggest { | ||
tag := fmt.Sprintf("tlm:%s-s", version) | ||
return &Suggest{api: api, tag: tag, modelfile: suggestModelfile} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters