Skip to content

Commit

Permalink
refactor(backend): split by slash
Browse files Browse the repository at this point in the history
  • Loading branch information
kwaa committed Dec 20, 2024
1 parent ab7050b commit ab8601e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/backend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ func Speech(c echo.Context) mo.Result[any] {
}

backendAndModel := lo.Ternary(
strings.Contains(options.Model, ":"),
strings.SplitN(options.Model, ":", 2), //nolint:mnd
strings.Contains(options.Model, "/"),
strings.SplitN(options.Model, "/", 2), //nolint:mnd
[]string{options.Model, ""},
)

Expand Down

0 comments on commit ab8601e

Please sign in to comment.