go-skynet / helm-charts

go-skynet helm chart repository
55 stars 40 forks source link

Bugfix/update model url templating #52

Open amsuggs37 opened 2 months ago

amsuggs37 commented 2 months ago

This Pull Request updates two simple parts of the deployment.yaml template to support this chart:

  1. The urls in the list value get concatenated into a CSV string as such: {{- $urls = printf "%s%s %s," $urls $model.url ($model.basicAuth | default "") }}. This would cause errors as it would leave a trailing comma at the end of the CSV string and cause the url to be invalid. I fix this by adding a template function to trim the suffix of the string from any commas and then trimming whitespace.
  2. The regex to validate the url did not consider underscores as an option in the regex matching. Consider the following file uri in the goskynet/model-gallery (https://github.com/go-skynet/model-gallery/blob/main/mixtral-Q6.yaml#L42). This change will allow underscores as valid urls moving forward.

If I have misunderstood any parts of how to use this chart and appropriately set values, please feel free to respond and reject this Pull Request. But this was the only way I was able to get my helm chart to work.