Like in Gemini thinking | Gemini API | Google AI for Developers but with OpenAI SDK
OpenAI Chat Completions has no mechanism for out-of-band transmission of language metadata.
Hey @aliencaoao , To include thought
in OAI Compatibility, use the following code:
response = client.chat.completions.create(
model=THINKING_MODEL,
extra_body={
'extra_body':{
'google': {
'thinking_config': {
'thinking_budget': 800,
'include_thoughts': True
}
}
}
},
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{
"role": "user",
"content": prompt
}
]
)