Skip to content

Commit

Permalink
feat: Expand variables in model path
Browse files Browse the repository at this point in the history
Allow define model path in config file as `${HOME}/model.gguf`.
  • Loading branch information
macie committed Dec 30, 2023
1 parent 230e1d8 commit 0379822
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/boludo/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"fmt"
"io"
"io/fs"
"os"
"os/signal"
"strings"
"time"
Expand Down Expand Up @@ -162,7 +163,7 @@ func (c *ConfigFile) UnmarshalTOML(data interface{}) error {
for k, v := range definedConfigs[configId].(map[string]interface{}) {
switch k {
case "model":
defaultSpec.Model = v.(string)
defaultSpec.Model = os.ExpandEnv(v.(string))
case "creativity":
defaultSpec.Creativity = (float32)(v.(float64))
case "cutoff":
Expand Down

0 comments on commit 0379822

Please sign in to comment.