Skip to content

Playground

GPUStack provides a playground UI for users to test or play with the completion API. The following is an example screenshot:

Playground Screenshot

Prompts

You can adjust the prompt messages on the left side of the playground. There are three role types of prompt messages: system, user, and assistant.

  • System: Typically a predefined instruction or guidance that sets the context, defines the behavior, or imposes specific constraints on how the model should generate its responses.
  • User: The input or query provided by the user (the person interacting with the LLM).
  • Assistant: The response generated by the LLM.

Edit System Message

You can add and edit the system message at the top of the playground.

Edit User and Assistant Messages

To add a user or assistant message, click the New Message button.

To remove a user or assistant message, click the minus button at the right corner of the message.

To change the role of a message, click the User or Assistant text at the beginning of the message.

Clear Prompts

Click the Clear button to clear all the prompts.

Select Model

You can select available models in GPUStack by clicking the model dropdown at the top-right corner of the playground. Please refer to Model Management to learn about how to manage models.

Customize Parameters

You can customize completion parameters in the Parameters section.

Do Completion

You can do a completion by clicking the Submit button.

View Code

Once you've done experimenting with the prompts and parameters, you can click the View Code button to check how you can call the API with the same input by code. Code examples in curl, python, and nodejs are provided.