Giter Club home page Giter Club logo

Comments (11)

greenpau avatar greenpau commented on May 24, 2024 1

Here are my working versions:

langchain==0.0.350
langchain-community==0.0.2
langchain-core==0.1.0

from gpt-engineer.

infinitelos avatar infinitelos commented on May 24, 2024

It looks like there is no longer tracing_enabled in:
https://github.com/langchain-ai/langchain/blob/master/libs/core/langchain_core/tracers/context.py

There is a tracing_v2_enabled.

from gpt-engineer.

infinitelos avatar infinitelos commented on May 24, 2024

From the error I get it looks like this is internal to langchain

  File "/usr/local/lib/python3.11/site-packages/langchain/callbacks/__init__.py", line 45, in <module>
    from langchain_core.tracers.context import (
ImportError: cannot import name 'tracing_enabled' from 'langchain_core.tracers.context' (/usr/local/lib/python3.11/site-packages/langchain_core/tracers/context.py)

from gpt-engineer.

s1lviu avatar s1lviu commented on May 24, 2024

So it seems langchain-ai/langchain#15491

from gpt-engineer.

infinitelos avatar infinitelos commented on May 24, 2024

Possible solution, as suggested in above is to lock the version of core:
langchain-core==0.1.4

To fix, I changed my pyproject.toml to:
langchain = ">0.0.335, <0.1.5"
langchain-core = ">0.0.335, <0.1.5"

from gpt-engineer.

aguara-guazu avatar aguara-guazu commented on May 24, 2024

this bug was introduced in langchain 0.0349, 0.0.348 works just fine

from gpt-engineer.

collinsomniac avatar collinsomniac commented on May 24, 2024

Just encountered this issue and resolved it with @greenpau 's recommended fix. The key was to specify the exact versions in the requirements.txt file prior to installing gpt-researcher. Here are the steps I followed for a smooth setup:

Resolved Issue: Specifying Versions in requirements.txt for GPT-Researcher Installation

Steps for Setting up GPTResearcher

  1. Prepare a Fresh Folder for GPTResearcher

    • Optional: Create a conda environment for isolation of dependency variables (conda create --name gptresearcher). This helps in minimizing any interference from other installations.
  2. Navigate to the Folder in Command Prompt

    • Use the command cd /D D:/YourGPTResearcherFolder to change your directory to the folder where you plan to clone gpt-researcher.
  3. Clone the GPT-Researcher Repository

    • Execute git clone https://github.com/assafelovic/gpt-researcher.git in Command Prompt to clone the repository into your folder.
  4. Change Directory to the Cloned Repository

    • Once cloned, switch to the directory using cd gpt-researcher.
  5. Edit requirements.txt File

    • Open D:/YourGPTResearcherFolder/gpt-researcher/requirements.txt in a text editor.
    • Modify the file to include the following versions:
      langchain==0.0.350
      langchain-community==0.0.2
      langchain-core==0.1.0
      
    • In my experience, langchain was already there, but community and core were missing.
  6. Install the Requirements

    • Run pip install -r requirements.txt in Command Prompt to install the specified dependencies.

Note: After these steps, ensure that your .env keys (e.g., OPENAI_API_KEY and TAVILY_API_KEY) are set correctly. In my case, it worked well with the default settings.

This process resolved the issue for me, hope it helps others!

from gpt-engineer.

ATheorell avatar ATheorell commented on May 24, 2024

Now that you have been reading up on this and playing around @greenpau, @collinsomniac , @s1lviu @infinitelos @aguara-guazu
Are there any drawbacks with raising the langchain requirement in gpt-engineer to:
langchain = ">=0.0.350"
Are there any known compatibility losses associated with this? I suppose that may (partly?) solve this

from gpt-engineer.

s1lviu avatar s1lviu commented on May 24, 2024

@ATheorell for people like me who used the production installation method I think this is still an issue?

from gpt-engineer.

ATheorell avatar ATheorell commented on May 24, 2024

@s1lviu
I'm not sure what you mean. We haven't done anything to fix this, so unless you are using gpt-researcher and the instructions by @collinsomniac

from gpt-engineer.

s1lviu avatar s1lviu commented on May 24, 2024

I've installed the software using python -m pip install gpt-engineer and was not sure requirements.txt can be provided with this method, as I'm not so familiar with python.

But the issue seems to be fixed now. I have run pip install --upgrade gpt_engineer langchain_core and it disappeared.

Thanks!

from gpt-engineer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.