[PR #987] [CLOSED] Replace import of BaseMessage with langchain_core #1201

Closed
opened 2026-02-17 17:21:55 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/docs/pull/987
Author: @mcavdar
Created: 10/18/2025
Status: Closed

Base: mainHead: patch-3


📝 Commits (3)

  • 0ffa449 Replace import of BaseMessage with langchain_core
  • f79d967 Merge branch 'main' into patch-3
  • 5ed2dc2 Merge branch 'main' into patch-3

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 src/oss/langgraph/quickstart.mdx (+1 -1)

📄 Description

Overview

When I run the following code from the docs:

from langchain.messages import (
    SystemMessage,
    HumanMessage,
    BaseMessage,
    ToolCall,
)

I get this error:
ImportError: cannot import name 'BaseMessage' from 'langchain.messages'

It seems that BaseMessage have been moved to langchain_core.

Type of change

Type: [bug]

Related issues/PRs

  • Linear issue:
  • Slack thread:

Checklist

  • I have read the contributing guidelines
  • I have tested my changes locally using docs dev
  • All code examples have been tested and work correctly
  • I have used root relative paths for internal links
  • I have updated navigation in src/docs.json if needed
  • I have gotten approval from the relevant reviewers
  • (Internal team members only / optional) I have created a preview deployment using the Create Preview Branch workflow

Additional notes


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/docs/pull/987 **Author:** [@mcavdar](https://github.com/mcavdar) **Created:** 10/18/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `patch-3` --- ### 📝 Commits (3) - [`0ffa449`](https://github.com/langchain-ai/docs/commit/0ffa44918bfdf9498a660a2113a7d85d70fc0da0) Replace import of BaseMessage with langchain_core - [`f79d967`](https://github.com/langchain-ai/docs/commit/f79d9672e3f6838bf39c798185a7fbf2bba26765) Merge branch 'main' into patch-3 - [`5ed2dc2`](https://github.com/langchain-ai/docs/commit/5ed2dc26c7ef386ec3b0c528f696bf528452de74) Merge branch 'main' into patch-3 ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/oss/langgraph/quickstart.mdx` (+1 -1) </details> ### 📄 Description ## Overview When I run the following code from the [docs](https://docs.langchain.com/oss/python/langgraph/quickstart#use-the-functional-api): ``` from langchain.messages import ( SystemMessage, HumanMessage, BaseMessage, ToolCall, ) ``` I get this error: `ImportError: cannot import name 'BaseMessage' from 'langchain.messages'` It seems that BaseMessage have been moved to langchain_core. ## Type of change **Type:** [bug] ## Related issues/PRs <!-- Link to related issues, feature PRs, or discussions (if applicable) To automatically close an issue when this PR is merged, use closing keywords: - "closes #123" or "fixes #123" or "resolves #123" For regular references without auto-closing, just use: - "#123" or "See issue #123" Examples: - closes #456 (will auto-close issue #456 when PR is merged) - See #789 for context (will reference but not auto-close issue #789) --> - GitHub issue: https://github.com/langchain-ai/docs/issues/986 - Feature PR: closes #986 <!-- For LangChain employees, if applicable: --> - Linear issue: - Slack thread: ## Checklist <!-- Put an 'x' in all boxes that apply --> - [x] I have read the [contributing guidelines](README.md) - [ ] I have tested my changes locally using `docs dev` - [x] All code examples have been tested and work correctly - [ ] I have used **root relative** paths for internal links - [ ] I have updated navigation in `src/docs.json` if needed - I have gotten approval from the relevant reviewers - (Internal team members only / optional) I have created a preview deployment using the [Create Preview Branch workflow](https://github.com/langchain-ai/docs/actions/workflows/create-preview-branch.yml) ## Additional notes <!-- Any other information that would be helpful for reviewers --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-17 17:21:55 -05:00
yindo closed this issue 2026-02-17 17:21:55 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#1201