Text Generation Inference

Generate tokens if `stream == false` or a stream of token if `stream == true`

Generate tokens if stream == false or a stream of token if stream == true

post/

Request body

CompatGenerateRequest required— unresolved $ref

Response

Generated Text

generated_textstring required

Example response

{
  "details": {
    "best_of_sequences": [
      {
        "generated_text": "test",
        "generated_tokens": 1,
        "prefill": [
          {
            "logprob": -0.34,
            "text": "test"
          }
        ],
        "seed": 42,
        "tokens": [
          {
            "logprob": -0.34,
            "text": "test"
          }
        ]
      }
    ],
    "generated_tokens": 1,
    "prefill": [
      {
        "logprob": -0.34,
        "text": "test"
      }
    ],
    "seed": 42,
    "tokens": [
      {
        "logprob": -0.34,
        "text": "test"
      }
    ]
  },
  "generated_text": "test"
}

Changes

Changed in 4 of the 26 revisions of this API.15

    • added the new optional request property parameters/decoder_input_details

      new-optional-request-property

    • the stream request property default value false was added

      request-property-default-value-added

    • added the media type application/json for the response with the status 200

      response-media-type-added

    • added the media type text/event-stream for the response with the status 200

      response-media-type-added

    • endpoint added

      endpoint-added

    • api path removed without deprecation

      api-path-removed-without-deprecation

    This revision also has 4 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog