mirror of
https://github.com/ollama/ollama.git
synced 2026-04-22 00:36:11 +02:00
prealloc
This commit is contained in:
@@ -309,9 +309,9 @@ func (tp ToolProperty) ToTypeScriptType() string {
|
||||
return mapToTypeScriptType(tp.Type[0])
|
||||
}
|
||||
|
||||
var types []string
|
||||
for _, t := range tp.Type {
|
||||
types = append(types, mapToTypeScriptType(t))
|
||||
types := make([]string, len(tp.Type))
|
||||
for i, t := range tp.Type {
|
||||
types[i] = mapToTypeScriptType(t)
|
||||
}
|
||||
return strings.Join(types, " | ")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user