updates to langchain/messages guide - #700
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the LangChain messages guide to improve content structure, add token usage documentation, and refactor content blocks. The changes include adding tool call examples, documenting AIMessage token usage metadata, restructuring sections, and simplifying the content blocks explanation.
Key changes:
- Added comprehensive tool call examples and token usage documentation for AIMessage
- Restructured content sections and simplified explanations
- Updated content block specifications for server-side tool execution
|
Preview ID generated: preview-ccmess-1759258719-c96a049 |
Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (3)
src/oss/langchain/messages.mdx:45
- The model version 'gpt-5-nano' appears to be fictional or not yet available. Consider using an existing model like 'gpt-4o' or 'gpt-3.5-turbo' for accurate documentation examples.
const model = await initChatModel("openai:gpt-5-nano");
src/oss/langchain/messages.mdx:30
- The model version 'gpt-5-nano' appears to be fictional or not yet available. Consider using an existing model like 'gpt-4o' or 'gpt-3.5-turbo' for accurate documentation examples.
model = init_chat_model("openai:gpt-5-nano")
src/oss/langchain/messages.mdx:45
- The model version 'gpt-5-nano' appears to be fictional or not yet available. Consider using an existing model like 'gpt-4o' or 'gpt-3.5-turbo' for accurate documentation examples.
const model = await initChatModel("openai:gpt-5-nano");
|
Preview ID generated: preview-ccmess-1759259213-abc16af |
Eugene Yurtsev (eyurtsev)
left a comment
There was a problem hiding this comment.
looks great!!
Co-authored-by: Eugene Yurtsev <eugene@langchain.dev>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
src/oss/langchain/messages.mdx:30
- The model version
gpt-5-nanodoes not exist. OpenAI's current models include gpt-4o, gpt-4, gpt-3.5-turbo, etc. Consider using an existing model likegpt-4oorgpt-4.
model = init_chat_model("openai:gpt-5-nano")
src/oss/langchain/messages.mdx:45
- The model version
gpt-5-nanodoes not exist. OpenAI's current models include gpt-4o, gpt-4, gpt-3.5-turbo, etc. Consider using an existing model likegpt-4oorgpt-4.
const model = await initChatModel("openai:gpt-5-nano");
|
Preview ID generated: preview-ccmess-1759260234-9d8700f |
|
Preview ID generated: preview-ccmess-1759260418-63a4642 |
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
src/oss/langchain/messages.mdx:30
- The model version 'gpt-5-nano' does not exist. OpenAI's current models include GPT-4 variants but not GPT-5. Consider using a valid model like 'gpt-4o-mini' or 'gpt-4o'.
model = init_chat_model("openai:gpt-5-nano")
src/oss/langchain/messages.mdx:45
- The model version 'gpt-5-nano' does not exist. OpenAI's current models include GPT-4 variants but not GPT-5. Consider using a valid model like 'gpt-4o-mini' or 'gpt-4o'.
const model = await initChatModel("openai:gpt-5-nano");
|
Preview ID generated: preview-ccmess-1759260626-5583a8f |
Co-authored-by: Hunter Lovell <40191806+hntrl@users.noreply.github.com> Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev> Co-authored-by: Eugene Yurtsev <eugene@langchain.dev>
…5056) ## Description `langchain-ai/deepagents#4969` reverted the alpha `SystemPromptConfig` (`prefix`/`base`/`suffix` dict) feature, so `system_prompt=` is a plain `str | SystemMessage` again. This drops the `SystemPromptConfig` guidance from the Python-side "System prompt" section entirely and fixes the section intro, which incorrectly claimed a built-in base prompt ships by default. Also resyncs the Python function-signature snippet (stale `SystemPromptConfig` reference) and drops the now-stale `SystemPromptConfig` link-map entry. No changelog changes. `langchain-ai/deepagentsjs` mirrored the revert (#700, #703), but kept `SystemPromptConfig` in its type union as a `@deprecated` compatibility shim slated for removal in the next major release. Dropped it from the JS signature snippet to match. **Note for reviewers:** that snippet is normally auto-generated by `scripts/sync_deepagents_signatures.py` from the live API reference site, which still lists the deprecated type — don't blindly re-run that script against this one file until deepagentsjs's next major release actually removes the shim, or it'll reintroduce `SystemPromptConfig`. ## Test Plan - [x] `make check-cross-refs` - [x] `make lint_prose FILES=...` on changed `.mdx` files Opened collaboratively by Nishitha Madhu and open-swe --------- Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> Co-authored-by: Naomi Pentrel <5212232+npentrel@users.noreply.github.com>
No description provided.