(mimeType string, data []byte)
| 198 | } |
| 199 | |
| 200 | func dataURL(mimeType string, data []byte) string { |
| 201 | mt := mimeType |
| 202 | if mt == "" { |
| 203 | mt = "application/octet-stream" |
| 204 | } |
| 205 | return "data:" + mt + ";base64," + base64.StdEncoding.EncodeToString(data) |
| 206 | } |
| 207 | |
| 208 | // samplingModelOptions translates the server's advisory preferences into |
| 209 | // the host's model options. Only MaxTokens is honoured today (with an |
no outgoing calls