Actions
Generate

Generate

Generate completion endpoint which returns a response to a prompt.

Usage

curl -X GET 'http://127.0.0.1:5000/generate?prompt=write%20me%20a%20poem%20about%the%20ocean&stream=true'

Example

Python

from mlxserver import MLXServer
 
server = MLXServer(model="mlx-community/Nous-Hermes-2-Mistral-7B-DPO-4bit-MLX")

Curl

curl -X GET 'http://127.0.0.1:5000/generate?prompt=write%20me%20a%20poem%20about%the%20ocean&stream=true'

Parameters

propmt (required) - The prompt you want to generate with.

stream - Stream the output. Default: False.