LM StudioLM Studio

Decisions

Answer typed questions with a decision model.

Ask Bionic to read this page

Copy this prompt, open Bionic, and paste it into a new chat.

Read https://lmstudio.ai/docs/developer/openai-compat/decisions, I want to ask questions about it.

Requires a loaded decision model, not a regular chat model.

Python example
from openai import OpenAI
client = OpenAI(base_url="http://localhost:1234/v1", api_key="lm-studio")

decision = client.decisions.create(
  model="model-identifier",
  input="I was charged twice.",
  questions=[
    {"type": "predicate", "name": "angry", "instructions": "Is the customer angry?"}
  ],
)

print(decision.answers)

Requires OpenAI Python 3.26.0+.

On this page