The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
docs: fix Anthropic, OpenAI docstrings (#33566)
Mason Daugherty241a382fba5c
diff --git a/libs/partners/anthropic/langchain_anthropic/chat_models.py b/libs/partners/anthropic/langchain_anthropic/chat_models.pyindex 348a0fb336..eb2b50b4a0 100644--- a/libs/partners/anthropic/langchain_anthropic/chat_models.py+++ b/libs/partners/anthropic/langchain_anthropic/chat_models.py@@ -1186,7 +1186,8 @@ class ChatAnthropic(BaseChatModel):See [Claude documentation](https://docs.claude.com/en/docs/build-with-claude/prompt-caching#1-hour-cache-duration-beta)for detail.- Extended context windows (beta):+ !!! note title="Extended context windows (beta)"+Claude Sonnet 4 supports a 1-million token context window, available in beta fororganizations in usage tier 4 and organizations with custom rate limits.@@ -1221,7 +1222,8 @@ class ChatAnthropic(BaseChatModel):for detail.- Token-efficient tool use (beta):+ !!! note title="Token-efficient tool use (beta)"+See LangChain [docs](https://python.langchain.com/docs/integrations/chat/anthropic/)for more detail.@@ -1257,7 +1259,8 @@ class ChatAnthropic(BaseChatModel):Total tokens: 408```- Context management:+ !!! note title="Context management"+Anthropic supports a context editing feature that will automatically manage themodel's context window (e.g., by clearing tool results).@@ -1276,7 +1279,8 @@ class ChatAnthropic(BaseChatModel):response = model_with_tools.invoke("Search for recent developments in AI")```- Built-in tools:+ !!! note title="Built-in tools"+See LangChain [docs](https://python.langchain.com/docs/integrations/chat/anthropic/#built-in-tools)for more detail.@@ -1402,7 +1406,7 @@ class ChatAnthropic(BaseChatModel):response = model_with_tools.invoke("What are my interests?")```- Response metadata+ !!! note title="Response metadata"```pythonai_msg = model.invoke(messages)diff --git a/libs/partners/openai/langchain_openai/embeddings/azure.py b/libs/partners/openai/langchain_openai/embeddings/azure.pyindex d9d13be528..1c854dbf29 100644--- a/libs/partners/openai/langchain_openai/embeddings/azure.py+++ b/libs/partners/openai/langchain_openai/embeddings/azure.py@@ -72,12 +72,11 @@ class AzureOpenAIEmbeddings(OpenAIEmbeddings): # type: ignore[override]Embed multiple texts:```pythoninput_texts = ["Document 1...", "Document 2..."]+ vectors = embed.embed_documents(input_texts)+ print(len(vectors))+ # The first 3 coordinates for the first vector+ print(vectors[0][:3])```- vectors = embed.embed_documents(input_texts)- print(len(vectors))- # The first 3 coordinates for the first vector- print(vectors[0][:3])-```python2[-0.024603435769677162, -0.007543657906353474, 0.0039630369283258915]