Model-Specific Parameters
Deepseek V3.1
Thinking can be turned on and off by specifying the thinking
parameter as a dictionary item in the chat_template_kwargs
parameter of the body. It must be set to true
or false
not "True"
or "true"
.
Python + OpenAI Library:
# pip install openai
from openai import OpenAI
import os
client = OpenAI(
base_url="https://api.parasail.io/v1",
api_key=os.environ["PARASAIL_API_KEY"]
)
chat_completion = client.chat.completions.create(
model="parasail-deepseek-31",
messages=[{"role": "user", "content": "What is the capital of New York?"}],
extra_body={
"chat_template_kwargs": {"thinking": True}, # or False, for no-think mode
}
)
print(chat_completion.choices[0].message.content)
CURL:
curl -X POST https://api.parasail.io/v1/chat/completions \
-H "Authorization: Bearer $PARASAIL_API_KEY" \
-H "content-type: application/json" \
-d '{"model": "parasail-deepseek-31", "chat_template_kwargs": {"thinking": false}, "messages": [{"role": "user", "content": "What is the capital of New York?"}]}'
Last updated