"git@developer.sourcefind.cn:OpenDAS/ollama.git" did not exist on "648f0974c6ad7cfff4eafade5891b1aefb3a1926"
Commit f27bc261 authored by Michael Yang's avatar Michael Yang
Browse files

s/parmeter/parameter/

parent 21e6197c
...@@ -225,12 +225,12 @@ func (opts *Options) FromMap(m map[string]interface{}) error { ...@@ -225,12 +225,12 @@ func (opts *Options) FromMap(m map[string]interface{}) error {
// when JSON unmarshals numbers, it uses float64, not int // when JSON unmarshals numbers, it uses float64, not int
field.SetInt(int64(t)) field.SetInt(int64(t))
default: default:
log.Printf("could not convert model parmeter %v to int, skipped", key) log.Printf("could not convert model parameter %v to int, skipped", key)
} }
case reflect.Bool: case reflect.Bool:
val, ok := val.(bool) val, ok := val.(bool)
if !ok { if !ok {
log.Printf("could not convert model parmeter %v to bool, skipped", key) log.Printf("could not convert model parameter %v to bool, skipped", key)
continue continue
} }
field.SetBool(val) field.SetBool(val)
...@@ -238,14 +238,14 @@ func (opts *Options) FromMap(m map[string]interface{}) error { ...@@ -238,14 +238,14 @@ func (opts *Options) FromMap(m map[string]interface{}) error {
// JSON unmarshals to float64 // JSON unmarshals to float64
val, ok := val.(float64) val, ok := val.(float64)
if !ok { if !ok {
log.Printf("could not convert model parmeter %v to float32, skipped", key) log.Printf("could not convert model parameter %v to float32, skipped", key)
continue continue
} }
field.SetFloat(val) field.SetFloat(val)
case reflect.String: case reflect.String:
val, ok := val.(string) val, ok := val.(string)
if !ok { if !ok {
log.Printf("could not convert model parmeter %v to string, skipped", key) log.Printf("could not convert model parameter %v to string, skipped", key)
continue continue
} }
field.SetString(val) field.SetString(val)
...@@ -253,7 +253,7 @@ func (opts *Options) FromMap(m map[string]interface{}) error { ...@@ -253,7 +253,7 @@ func (opts *Options) FromMap(m map[string]interface{}) error {
// JSON unmarshals to []interface{}, not []string // JSON unmarshals to []interface{}, not []string
val, ok := val.([]interface{}) val, ok := val.([]interface{})
if !ok { if !ok {
log.Printf("could not convert model parmeter %v to slice, skipped", key) log.Printf("could not convert model parameter %v to slice, skipped", key)
continue continue
} }
// convert []interface{} to []string // convert []interface{} to []string
...@@ -261,7 +261,7 @@ func (opts *Options) FromMap(m map[string]interface{}) error { ...@@ -261,7 +261,7 @@ func (opts *Options) FromMap(m map[string]interface{}) error {
for i, item := range val { for i, item := range val {
str, ok := item.(string) str, ok := item.(string)
if !ok { if !ok {
log.Printf("could not convert model parmeter %v to slice of strings, skipped", key) log.Printf("could not convert model parameter %v to slice of strings, skipped", key)
continue continue
} }
slice[i] = str slice[i] = str
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment