-
Notifications
You must be signed in to change notification settings - Fork 13.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple bases have instance lay-out conflict #10179
Comments
🤖 Hello, Thank you for providing detailed information about the issue you're facing. It seems like you're encountering a conflict with multiple bases having an instance layout conflict. This error typically occurs when there's a conflict between the inheritance of classes in Python. Based on the similar issues that have been solved in the LangChain repository, here are a few suggestions that might help:
This was another solution suggested in the same issue mentioned above.
This was also a solution provided in the same issue.
Please try these solutions and let us know if any of them work for you. If the issue persists, please provide more details about the error and we'll be glad to assist you further. Best, Sources
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Thank but i have the same issues |
I have the same issue. Updating Pydantic to 1.10.12 solved it, but if conflicts with other requirements in my project. |
This works for me like magic. Many thanks. |
Thank you so muck, it works ! |
Same, worked for me as well. |
I works for me, thanks. |
System Info
torch = "2.0.1"
transformers = "4.31.0"
langchain= "0.0.251"
kor= "0.13.0"
openai= "0.27.8"
pydantic= "1.10.8"
python_version = "3.9"
Who can help?
No response
Information
Related Components
Reproduction
from db.tools import DbTools
from langchain.chat_models import ChatOpenAI
from kor.nodes import Object, Text, Number
from kor import create_extraction_chain, Object, Text
llm = ChatOpenAI(
model_name="gpt-3.5-turbo",
temperature=0,
max_tokens=2000,
frequency_penalty=0,
presence_penalty=0,
openai_api_key = "" ,
top_p=1.0,
)
Expected behavior
Hello I encountered the following error when trying to import the langchain.schema module:
Traceback (most recent call last):
File "/home/alpha/platform/shared/libpython/computation/fine_instruction_GPT.py", line 2, in
from langchain.chat_models import ChatOpenAI
File "/home/alpha/.local/share/virtualenvs/platform-_bj8LfuO/lib/python3.9/site-packages/langchain/init.py", line 6, in
from langchain.agents import MRKLChain, ReActChain, SelfAskWithSearchChain
File "/home/alpha/.local/share/virtualenvs/platform-_bj8LfuO/lib/python3.9/site-packages/langchain/agents/init.py", line 31, in
from langchain.agents.agent import (
File "/home/alpha/.local/share/virtualenvs/platform-_bj8LfuO/lib/python3.9/site-packages/langchain/agents/agent.py", line 15, in
from langchain.agents.agent_iterator import AgentExecutorIterator
File "/home/alpha/.local/share/virtualenvs/platform-_bj8LfuO/lib/python3.9/site-packages/langchain/agents/agent_iterator.py", line 21, in
from langchain.callbacks.manager import (
File "/home/alpha/.local/share/virtualenvs/platform-_bj8LfuO/lib/python3.9/site-packages/langchain/callbacks/init.py", line 10, in
from langchain.callbacks.aim_callback import AimCallbackHandler
File "/home/alpha/.local/share/virtualenvs/platform-_bj8LfuO/lib/python3.9/site-packages/langchain/callbacks/aim_callback.py", line 5, in
from langchain.schema import AgentAction, AgentFinish, LLMResult
File "/home/alpha/.local/share/virtualenvs/platform-_bj8LfuO/lib/python3.9/site-packages/langchain/schema/init.py", line 4, in
from langchain.schema.memory import BaseChatMessageHistory, BaseMemory
File "/home/alpha/.local/share/virtualenvs/platform-_bj8LfuO/lib/python3.9/site-packages/langchain/schema/memory.py", line 7, in
from langchain.schema.messages import AIMessage, BaseMessage, HumanMessage
File "/home/alpha/.local/share/virtualenvs/platform-_bj8LfuO/lib/python3.9/site-packages/langchain/schema/messages.py", line 147, in
class HumanMessageChunk(HumanMessage, BaseMessageChunk):
File "pydantic/main.py", line 367, in pydantic.main.ModelMetaclass.new
File "/usr/lib/python3.9/abc.py", line 85, in new
cls = super().new(mcls, name, bases, namespace, **kwargs)
TypeError: multiple bases have instance lay-out conflict
The text was updated successfully, but these errors were encountered: