Skip to content

Conversation

@jesse-peters
Copy link
Contributor

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. dependencies Pull requests that update a dependency file labels Dec 19, 2025
@VinciGit00 VinciGit00 requested a review from Copilot December 23, 2025 07:23
@VinciGit00 VinciGit00 merged commit 54b77f0 into ScrapeGraphAI:main Dec 23, 2025
7 checks passed
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 23, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades project dependencies by running uv lock --upgrade to address issue #1030. The changes update numerous package versions to their latest releases and make corresponding code adjustments.

Key Changes

  • Updates langchain and related packages from 0.x to 1.x versions
  • Updates multiple core dependencies including tiktoken, playwright, beautifulsoup4, and others
  • Adjusts import statement in abstract_graph.py from langchain_core to langchain module path

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
pyproject.toml Updates dependency versions across 20+ packages, adds trailing commas for consistency
scrapegraphai/graphs/abstract_graph.py Changes import path for init_chat_model, reorders imports alphabetically, reformats URL constant

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

from typing import Optional, Type

from langchain_core.language_models.chat_models import init_chat_model
from langchain.chat_models import init_chat_model
Copy link

Copilot AI Dec 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The import path has been changed from "langchain_core.language_models.chat_models" to "langchain.chat_models". This change may be incompatible with the dependency upgrade to langchain>=1.2.0. The "init_chat_model" function in langchain 1.x is typically imported from "langchain_core.language_models.chat_models", not from "langchain.chat_models". Please verify that this import path is correct for the new langchain version.

Suggested change
from langchain.chat_models import init_chat_model
from langchain_core.language_models.chat_models import init_chat_model

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

🎉 This PR is included in version 1.68.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file lgtm This PR has been approved by a maintainer released on @stable size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ImportError: cannot import name 'init_chat_model' from 'langchain_core.language_models.chat_models'

2 participants