Giter Club home page Giter Club logo

Comments (5)

abidlabs avatar abidlabs commented on June 16, 2024

Hi @BigMann123yt it looks like you might be using an older version of pydantic -- can you please upgrade?

pip install --upgrade pydantic

from gradio.

BigMann123yt avatar BigMann123yt commented on June 16, 2024

k that error got fixed, but now theres a different error

Traceback (most recent call last): File "c:\Krishna Main\ISWK\Python Files\AI ChatBot\app.py", line 1, in <module> from gpt_index import SimpleDirectoryReader, GPTListIndex, GPTSimpleVectorIndex, LLMPredictor, PromptHelper File "C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\gpt_index\__init__.py", line 14, in <module> from gpt_index.embeddings.langchain import LangchainEmbedding File "C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\gpt_index\embeddings\langchain.py", line 6, in <module> from langchain.embeddings.base import Embeddings as LCEmbeddings File "C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\langchain\__init__.py", line 6, in <module> from langchain.agents import MRKLChain, ReActChain, SelfAskWithSearchChain File "C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\langchain\agents\__init__.py", line 2, in <module> from langchain.agents.agent import ( File "C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\langchain\agents\agent.py", line 15, in <module> from langchain.agents.tools import InvalidTool File "C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\langchain\agents\tools.py", line 8, in <module> from langchain.tools.base import ( File "C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\langchain\tools\__init__.py", line 3, in <module> from langchain.tools.base import BaseTool File "C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\langchain\tools\base.py", line 16, in <module> from pydantic.main import ModelMetaclass ImportError: cannot import name 'ModelMetaclass' from 'pydantic.main' (C:\Users\krish\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pydantic\main.py)

from gradio.

freddyaboulton avatar freddyaboulton commented on June 16, 2024

Hi @BigMann123yt ! You may need to update your langchain version. I can't repro this issue when importing langchain. Will close this as the issue does not seem related to gradio but I will open a PR to fallback to Any if JsonValue is not available in pydantic.

from gradio.

gjnave avatar gjnave commented on June 16, 2024

yo BigMann.. did you figure this out?

from gradio.

BigMann123yt avatar BigMann123yt commented on June 16, 2024

aah yes i did, thank you for the response anyways.
i downgraded a few of the imported modules and it worked properly without the error

from gradio.

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.