What does the error ‘module ‘langchain‘ has no attribute ‘verbose‘ refer to?

题意:错误 'module 'langchain' has no attribute 'verbose' 指的是什么意思?

问题背景:

Kind of new to Langchain/Qdrant but I'm building a recommendation engine to recommend users based on the contents of their associated PDF files, and I need to process PDFs and store their chunks in a vector database (I'm using Qdrant) for establishing context for the RAG agent. I don't exactly understand if this error is pertaining to some sort of version requirement, since the only prior error I found had to do with Langchain versions before 0.1.x:

我对Langchain和Qdrant还算是新手,但我正在构建一个推荐引擎,该引擎基于用户关联的PDF文件内容来推荐用户。我需要处理这些PDF文件并将它们的内容块存储在向量数据库中(我使用的是Qdrant),以便为RAG代理建立上下文。我不确定这个错误是否与某种版本要求有关,因为我之前发现的唯一错误与Langchain 0.1.x之前的版本有关

However that issue was closed, and downgrading to versions below 0.1.x given the current releases of langchain doesn't seem feasible given what most of my current environment has recent dependencies.

然而,那个问题已经被关闭了,并且鉴于当前langchain的发布情况,将版本降级到0.1.x以下似乎不太可行,因为我当前环境的大部分依赖都是最新的。

I tried different versions of langchain and different versions all of the corresponding langchain third-party libraries. Currently, these are the important parts of my requirements file (I think):

我尝试了不同版本的langchain以及所有对应的langchain第三方库的不同版本。目前,这些是我需求文件(我认为)中的重要部分:

langchain==0.2.1
langchain-community==0.2.1
langchain-core==0.2.1
langchain-experimental==0.0.59
langchain-openai==0.1.7
langchain-text-splitters==0.2.0
langcodes==3.4.0
langsmith==0.1.57openai==1.28.1 
python==3.12.3

Looking for some sort of workaround, or a diagnosis as to what may package may be causing the problem. My current program output:

正在寻找某种解决方案,或者诊断可能是哪个包导致了问题。我当前的程序输出是:

Traceback (most recent call last):File "/Users/danielperlov/dperlov/JobsMatch/backend/ml_model/resume_preprocessor/main.py", line 28, in <module>main()File "/Users/danielperlov/dperlov/JobsMatch/backend/ml_model/resume_preprocessor/main.py", line 17, in mainprocessor = PDFResumeProcessor(openai_api_key)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/Users/danielperlov/dperlov/JobsMatch/backend/ml_model/resume_preprocessor/gpt_class.py", line 16, in __init__self.model = ChatOpenAI(api_key=openai_api_key, temperature=0, model_name='gpt-3.5-turbo-16k-0613')^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/Users/danielperlov/dperlov/JobsMatch/backend/ml_model/resume_preprocessor/.venv/lib/python3.12/site-packages/pydantic/v1/main.py", line 339, in __init__values, fields_set, validation_error = validate_model(__pydantic_self__.__class__, data)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "/Users/danielperlov/dperlov/JobsMatch/backend/ml_model/resume_preprocessor/.venv/lib/python3.12/site-packages/pydantic/v1/main.py", line 1064, in validate_modelvalue = field.get_default()^^^^^^^^^^^^^^^^^^^File "/Users/danielperlov/dperlov/JobsMatch/backend/ml_model/resume_preprocessor/.venv/lib/python3.12/site-packages/pydantic/v1/fields.py", line 437, in get_defaultreturn smart_deepcopy(self.default) if self.default_factory is None else self.default_factory()^^^^^^^^^^^^^^^^^^^^^^File "/Users/danielperlov/dperlov/JobsMatch/backend/ml_model/resume_preprocessor/.venv/lib/python3.12/site-packages/langchain_core/language_models/base.py", line 72, in _get_verbosityreturn get_verbose()^^^^^^^^^^^^^File "/Users/danielperlov/dperlov/JobsMatch/backend/ml_model/resume_preprocessor/.venv/lib/python3.12/site-packages/langchain_core/globals.py", line 72, in get_verboseold_verbose = langchain.verbose^^^^^^^^^^^^^^^^^
AttributeError: module 'langchain' has no attribute 'verbose'

问题解决:

in my case, the code can fix the problem:        在我的情况下,以下代码可以修复问题:

import langchain
langchain.verbose = False
langchain.debug = False
langchain.llm_cache = False

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/364815.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

typora取消源代码模式

如果typora不小心设置成了源代码模式 关闭源代码模式&#xff1a;

Django-开发一个列表页面

需求 基于ListView,创建一个列表视图,用于展示"BookInfo"表的信息要求提供分页提供对书名,作者,描述的查询功能 示例展示: 1. 数据模型 models.py class BookInfo(models.Model):titlemodels.CharField(verbose_name"书名",max_length100)authormode…

git 用户名密码Clone代码

#密码中包含&#xff0c;则使用%40代表 cd /disk03/wwwroot/GitDemo/BuildTemp && git clone -b dev --single-branch http://root:test%40123192.168.31.104/root/SaaS.Auto.Api.git git pull origin dev 今天使用LibGit2Sharp在Linux上Clone代码时报错&#xff0c;因…

使用 go-control-plane 自定义服务网格控制面

写在前面 阅读本文需要最起码了解envoy相关的概念 本文只是一个类似于demo的测试&#xff0c;只为了学习istio&#xff0c;更好的理解istio中的控制面和数据面&#xff08;pilot -> proxy&#xff09;是如何交互的&#xff0c;下图的蓝色虚线 先说go-control-plane是什么…

MySQL高级-MVCC-原理分析(RC级别)

文章目录 1、RC隔离级别下&#xff0c;在事务中每一次执行快照读时生成ReadView2、先来看第一次快照读具体的读取过程&#xff1a;3、再来看第二次快照读具体的读取过程: 1、RC隔离级别下&#xff0c;在事务中每一次执行快照读时生成ReadView 我们就来分析事务5中&#xff0c;两…

柯桥法语学习|学点黑话!法语中的「钱」可不止“argent”

法语中有哪些关于钱的“黑话”&#xff1f;一起来和法语君看一下吧&#xff01; bl 之所以繁杂&#xff0c;是因为这些词在诞生之初&#xff0c;不止涉及一个故事&#xff0c;而是一大堆小轶事&#xff0c;以“bl”指钱的起源如迷宫般复杂。 根据Trsor de la langue frana15857…

VMware17安装Ubuntu20版本-保姆级别

首先需要安装好VMware和Ubuntu20的镜像&#xff0c;在网上搜索Ubuntu镜像下载即可&#xff0c;最后选择国内镜像站下载&#xff0c;这样更快点&#xff0c;然后打开VMware。 1.创建虚拟机&#xff1a; 2.选择自定义&#xff1a; 3.默认&#xff0c;继续下一步&#xff1a; 4.选…

kubuadm 方式部署 k8s 集群

准备三台机器 主机名IP地址CPU/内存角色K8S版本Docker版本k8s231192.168.99.2312C4Gmaster1.23.1720.10.24k8s232192.168.99.2322C4Gwoker1.23.1720.10.24k8s233192.168.99.2332C4Gwoker1.23.1720.10.24 需要在K8S集群各节点上面安装docker&#xff0c;如未安装则参考 …

江协科技51单片机学习- p21 LED点阵屏(8*8)

&#x1f680;write in front&#x1f680; &#x1f50e;大家好&#xff0c;我是黄桃罐头&#xff0c;希望你看完之后&#xff0c;能对你有所帮助&#xff0c;不足请指正&#xff01;共同学习交流 &#x1f381;欢迎各位→点赞&#x1f44d; 收藏⭐️ 留言&#x1f4dd;​…

ASP.NET CORE应用针对IIS有哪两种部署模式?

一、ASP.NET CORE Core Module IIS其实也是按照管道的方式来处理请求的&#xff0c;但是IIS管道和ASP.NET CORE中间件管道有本质的不同。对于部署在IIS中的Web应用来说&#xff0c;从最初接收到请求到最终将响应发出去&#xff0c;这段处理流程被细分为一系列固定的步骤&#x…

Python pip install模块时C++编译环境问题

pip install模块时C编译环境问题 在接触和使用python后&#xff0c;常常会通过pip install命令安装第三方模块&#xff0c;大多数模块可以直接安装&#xff0c;但许多新同学仍会遇见某些模块需要实时编译后才能安装&#xff0c;如报错信息大概是缺乏C编译环境&#xff0c;本文则…

MTK7628+MT7612 加PA定频数据

1、硬件型号TR726A5G121-DPA PC9.02.0017。如下所示&#xff1a; 2、WIFI5.8 AC模式 42&#xff08;5120MHz&#xff09;信道&#xff0c;80带宽 3、WIFI5.8 AC模式 38&#xff08;5190MHz&#xff09;信道&#xff0c;40带宽 4、WIFI5.8 AC模式 36&#xff08;5180 MHz&…

双指针-移动 0(easy)

目录 一、问题描述 二、解题思路 三、代码实现 四、刷题链接 一、问题描述 二、解题思路 1.开辟一个新数组&#xff0c;初始时元素都为0 2.设置两个指针&#xff0c;指针p1遍历旧数组&#xff0c;指针p2指向新数组的待修改位置 3.当p1指向非零元素时&#xff0c;将该元素…

Ubuntu20.04离线安装Docker

链接&#xff1a;https://pan.baidu.com/s/10OLClTHSIJY-_nbldcoFFQ 提取码&#xff1a;x4nt --来自百度网盘超级会员V4的分享 1.下载3个docker离线安装包&#xff0c;下载网址&#xff1a; https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/amd64/ 2.把…

【阅读论文】-- IDmvis:面向1型糖尿病治疗决策支持的时序事件序列可视化

IDMVis: Temporal Event Sequence Visualization for Type 1 Diabetes Treatment Decision Support 摘要1 引言2 1 型糖尿病的背景3 相关工作3.1 时间事件序列可视化3.2 电子健康记录可视化3.3 1 型糖尿病可视化3.4 任务分析与抽象 4 数据抽象5 层次化任务抽象5.1 临床医生工作…

Python逻辑控制语句 之 判断语句--if else结构

1.if else 的介绍 if else &#xff1a;如果 ... 否则 .... 2.if else 的语法 if 判断条件: 判断条件成立&#xff0c;执行的代码 else: 判断条件不成立&#xff0c;执行的代码 &#xff08;1&#xff09;else 是关键字, 后⾯需要 冒号 &#xff08;2&#xff09;存在冒号…

Unity扩展编辑器功能的特性

1.添加分组标题 用于在Unity的Inspector视图中为属性或变量组创建一个自定义的标题或头部&#xff0c;有助于在Inspector中组织和分类不同的属性&#xff0c;使其更易于阅读和管理。 [Header("Common Properties")] public float MouseSensitivity 5; public float…

15 个适用于企业的生成式 AI 用例

作者&#xff1a;来自 Elastic Jennifer Klinger 关于生成式人工智能及其能做什么&#xff08;和不能做什么&#xff09;有很多讨论。生成式人工智能&#xff08;例如大型语言模型 - LLMs&#xff09;利用从大量训练数据中学习到的模式和结构来创建原创内容&#xff0c;而无需存…

解决“Duplicate keys detected: ‘ ‘.This may cause an update error.”问题

问题原因 出现“Duplicate keys detected”的错误&#xff0c;通常表示在v-for指令中使的:key绑定值有重复。 如果前端是静态数据&#xff0c;一般能自我避免:key绑定值有重复。如果前端是绑定的动态数据&#xff0c;那么需要另外提供一个唯一的键。 在这个例子中&#xff0c…

Spring+Vue项目部署

目录 一、需要的资源 二、步骤 1.首先要拥有一个服务器 2.项目准备 vue&#xff1a; 打包: 3.服务器装环境 文件上传 设置application.yml覆盖 添加启动和停止脚本 ​编辑 安装jdk1.8 安装nginx 安装mysql 报错&#xff1a;「ERR」1273-Unknown collation: utf8m…