The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
docs(groq): remove duplicate `method` block from `with_structured_output` docstring (#39978)
Huzaifa Iftikhar67fa96ffadf6
diff --git a/libs/partners/groq/langchain_groq/chat_models.py b/libs/partners/groq/langchain_groq/chat_models.pyindex 7aabbfc109..81357271fb 100644--- a/libs/partners/groq/langchain_groq/chat_models.py+++ b/libs/partners/groq/langchain_groq/chat_models.py@@ -998,19 +998,8 @@ class ChatGroq(BaseChatModel):Learn more about the differences between the methods and which modelssupport which methods [here](https://console.groq.com/docs/structured-outputs).- method:- The method for steering model generation, either `'function_calling'`- or `'json_mode'`. If `'function_calling'` then the schema will be converted- to an OpenAI function and the returned model will make use of the- function-calling API. If `'json_mode'` then JSON mode will be used.-- !!! note- If using `'json_mode'` then you must include instructions for formatting- the output into the desired schema into the model call. (either via the- prompt itself or in the system message/prompt/instructions).-!!! warning- `'json_mode'` does not support streaming responses stop sequences.+ `'json_mode'` does not support streaming responses or stop sequences.include_raw:If `False` then only the parsed structured output is returned.diff --git a/libs/partners/groq/tests/unit_tests/test_chat_models.py b/libs/partners/groq/tests/unit_tests/test_chat_models.pyindex 86fea8a21d..cd479b3361 100644--- a/libs/partners/groq/tests/unit_tests/test_chat_models.py+++ b/libs/partners/groq/tests/unit_tests/test_chat_models.py@@ -1322,3 +1322,11 @@ def test_handle_invalid_request_ignores_max_tokens_error() -> None:_handle_groq_invalid_request(err)assert not isinstance(exc_info.value, ContextOverflowError)+++def test_with_structured_output_documents_method_once() -> None:+ """`method` was documented twice, and the stale block omitted `json_schema`."""+ doc = ChatGroq.with_structured_output.__doc__+ assert doc is not None+ assert doc.count("method:") == 1+ assert "json_schema" in doc