You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to send a grammar to the server and getting encoding errors. For example,
$ export contents=$(<./grammars/chess.gbnf)
$ export json='{
"prompt": "1. e2 e4 \n",
"n_predict": 128,
"temperature": 0.6,
"grammar": "'"$contents"'"
}'
$ curl -X POST --url http://localhost:8080/completion -H "Content-Type: application/json" --data-binary "$json" | jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 992 100 340 100 652 299k 573k --:--:-- --:--:-- --:--:-- 968k
{
"error": {
"code": 500,
"message": "[json.exception.parse_error.101] parse error at line 6, column 0: syntax error while parsing value - invalid string: control character U+000A (LF) must be escaped to \\u000A or \\n; last read: '\"# Specifies chess moves as a list in algebraic notation, using PGN conventions<U+000A>'",
"type": "server_error"
}
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to send a grammar to the server and getting encoding errors. For example,
How to fix this?
Beta Was this translation helpful? Give feedback.
All reactions