Ошибка ImportError: невозможно импортировать имя TypeBaseModel из langchain_core.utils.pydantic.Python

Программы на Python
Anonymous
Ошибка ImportError: невозможно импортировать имя TypeBaseModel из langchain_core.utils.pydantic.

Сообщение Anonymous »

из pydantic import BaseModel
из langchain.chains import RetrievalQA
chain = RetrivalQA.from_chain_type(llm=llm,chain_type="stuff",retriever=retriever,input_key="query",return_source_documents=True )
Ошибка импорта: невозможно импортировать имя TypeBaseModel из langchain_core.utils.pydantic (C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\site- packages\langchain_core\utils\pydantic.py)
!pip install pydantic
из pydantic import BaseModel
из langchain.chains import RetrivalQA

Код: Выделить всё

your text


Подробнее здесь: https://stackoverflow.com/questions/787 ... tils-pydan

Вернуться в «Python»