Skip to content

docs(js): add missing HumanMessage import in OpenAI multi-turn image example - #5795

Open
SpiliosDmk (SpiliosDimakopoulos) wants to merge 1 commit into
langchain-ai:mainfrom
SpiliosDimakopoulos:fix/openai-js-missing-humanmessage-import
Open

docs(js): add missing HumanMessage import in OpenAI multi-turn image example#5795
SpiliosDmk (SpiliosDimakopoulos) wants to merge 1 commit into
langchain-ai:mainfrom
SpiliosDimakopoulos:fix/openai-js-missing-humanmessage-import

Conversation

@SpiliosDimakopoulos

Copy link
Copy Markdown
Contributor

What

The "Multi-turn editing" TypeScript example under Image Generation
constructs new HumanMessage(...) but the file never imports
HumanMessage, so the snippet fails to compile/run as written.

Why

HumanMessage is used but not imported anywhere in this page.
Added: import { HumanMessage } from "@langchain/core/messages";
— the same path already used for this class elsewhere on the site.

Type of change

  • Documentation fix (broken code example)

2-line, docs-only change, no functional impact outside the code sample.

…example

The 'Multi-turn editing' TypeScript example under Image Generation
constructs 'new HumanMessage(...)' but the file never imports
HumanMessage (only ChatOpenAI and tools are imported from
'@langchain/openai'), so the snippet fails to compile/run as written.

Added: import { HumanMessage } from "@langchain/core/messages";

Matches the import path already used for the same class elsewhere
in this docs site (e.g. integrations/tools/composio.mdx).
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for opening a docs PR, SpiliosDmk (@SpiliosDimakopoulos)! When it's ready for review, please add the relevant reviewers:

  • @npentrel or @lnhsingh (JavaScript integrations)

@github-actions github-actions Bot added integration For docs updates for LangChain integrations javascript langchain For docs changes to LangChain oss external User is not a member of langchain-ai labels Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external User is not a member of langchain-ai integration For docs updates for LangChain integrations javascript langchain For docs changes to LangChain oss

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant