From 44980a2a99fe13d10d08b25a53eff3f3118634a8 Mon Sep 17 00:00:00 2001 From: Kevin Mingtarja Date: Thu, 6 Jun 2024 19:03:57 -0700 Subject: [PATCH 1/2] lowercase model name before invoking for hypermode hosted models --- models/models.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/models/models.go b/models/models.go index fc3a025c..679ad0a1 100644 --- a/models/models.go +++ b/models/models.go @@ -8,6 +8,7 @@ import ( "context" "fmt" "net/http" + "strings" "hmruntime/config" "hmruntime/db" @@ -58,7 +59,7 @@ func PostToModelEndpoint[TResult any](ctx context.Context, sentenceMap map[strin switch model.Host { case hosts.HypermodeHost: - endpoint = fmt.Sprintf("http://%s.%s/%s:predict", model.Name, config.ModelHost, model.Task) + endpoint = fmt.Sprintf("http://%s.%s/%s:predict", strings.ToLower(model.Name), config.ModelHost, model.Task) default: host, err := hosts.GetHost(model.Host) From c91979d08edd3bd8bdd578297f4c1a681fa5a844 Mon Sep 17 00:00:00 2001 From: Matt Johnson-Pint Date: Thu, 6 Jun 2024 19:08:26 -0700 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e5e51d2..f3f5d827 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## UNRELEASED + +- Lowercase model name before invoking for hypermode hosted models [#221](https://github.com/gohypermode/runtime/pull/221) + ## 2024-06-03 - Version 0.8.2 - Send backend ID with Sentry events [#211](https://github.com/gohypermode/runtime/pull/211) [#213](https://github.com/gohypermode/runtime/pull/213)