]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
server : update json snippets in README.md [no ci] (#11492)
authorDaniel Bevenius <redacted>
Thu, 30 Jan 2025 04:48:14 +0000 (05:48 +0100)
committerGitHub <redacted>
Thu, 30 Jan 2025 04:48:14 +0000 (05:48 +0100)
This commit updates some of JSON snippets in README.md file and
removes the `json` language tag from the code blocks.

The motivation for this changes is that if there is invalid json in a
code snippet these are highlighted in red which can make it somewhat
difficult to read and can be a little distracting.

examples/server/README.md

index cedae0b6dfb471228fcbca209f950afae29bcfe1..d1c9be589e56f76a0f31365d42c9da65bcb1e7b7 100644 (file)
@@ -460,7 +460,7 @@ These words will not be included in the completion, so make sure to add them to
 - Note: In streaming mode (`stream`), only `content`, `tokens` and `stop` will be returned until end of completion. Responses are sent using the [Server-sent events](https://html.spec.whatwg.org/multipage/server-sent-events.html) standard. Note: the browser's `EventSource` interface cannot be used due to its lack of `POST` request support.
 
 - `completion_probabilities`: An array of token probabilities for each completion. The array's length is `n_predict`. Each item in the array has a nested array `top_logprobs`. It contains at **maximum** `n_probs` elements:
-  ```json
+  ```
   {
     "content": "<the generated completion text>",
     "tokens": [ generated token ids if requested ],
@@ -561,7 +561,7 @@ If `with_pieces` is `true`:
 ```
 
 With input 'รก' (utf8 hex: C3 A1) on tinyllama/stories260k
-```json
+```
 {
   "tokens": [
     {"id": 198, "piece": [195]}, // hex C3
@@ -776,7 +776,7 @@ Same as the `/v1/embeddings` endpoint.
 
 **Response format**
 
-```json
+```
 [
   {
     "index": 0,