This commit is contained in:
2026-05-22 14:35:49 -04:00
parent 36b164af16
commit 2e162c928a
8 changed files with 1213 additions and 14 deletions
+1 -14
View File
@@ -61,16 +61,9 @@ def chat_completion_with_history(
model=model,
messages=messages,
max_tokens=max_tokens,
extra_body={
"chat_template_kwargs": {"enable_thinking": False},
},
seed=-1,
)
# Assert that thinking was used
if response.choices[0].message.model_extra:
assert response.choices[0].message.model_extra.get("reasoning_content")
content = response.choices[0].message.content
if content:
return content.strip()
@@ -101,15 +94,9 @@ def chat_completion_instruct(
model=model,
messages=messages,
max_tokens=max_tokens,
extra_body={
"chat_template_kwargs": {"enable_thinking": False},
},
seed=-1,
)
# Assert that thinking wasn't used
if response.choices[0].message.model_extra:
assert response.choices[0].message.model_extra.get("reasoning_content")
content = response.choices[0].message.content
if content:
return content.strip()