How to remove the ‘<think>…’ section from a groq model reponse?
While using groq models we get the thinking section added with actual llm response. There we can use reasoning_format="parsed" . Check below
Without reasoning_format
llm = ChatGroq(model="qwen/qwen3.6-27b")
response1 = llm.invoke("What is langchain?")
print(response1.content)

With reasoning_format
llm = ChatGroq(model="qwen/qwen3.6-27b", reasoning_format="parsed")
response2 = llm.invoke("What is langchain?")
print(response2.content)

