history_rag's People
Forkers
codingjaguar lynchying jeffleehk0930 wanglhong hyejeanmoon forsweet leyiang xwklib wqyjh dy1901 iamaaronyu kaishin-poseidon icoolding liuqcoder zero4orez sakurastark hdyouyita afei1234567 mrbcy clef233 tatlor1002 wanbiao1993 techthiyanes taihaozesong warmplayer zzgyy123 iouakira zbcumt zhangnn520 cangjie-dev xiaoran-roosevelt huangweiboy2 tim-taoxq zimoyin sczhai chi-cat mpdfx kingtite jmaigc betterandbetterii bushjiang nadirjann2000 zongzuoscc taisenki capitalwilliam snake-konginchrist aurelius-huang mycloudream skyrimbenjamin ingted acgnnsj songyun86 lwqhp iamkomen sweetisg00d zhouhh2017 lims1914 chanli520 kiddysgu renshangtao darius-gs fishbone1024 jackdiy xialuxi joyfunelevator zhang9song yangboyd qagitech sherlock-zhu fenixnix zion123 green9989 jossion12 jsd1606sz xnxqc xie-quyan stanleyya milesyangy piginwater cydrain lizhijun anonymelon gary-thu connectpeoplewith proto1994 lijinhai0804 hazardmax924 jackshuaiwei flash201524 aceliuchanghonghistory_rag's Issues
windows安装的步骤2:安装Milvus是需要先在windows上安装Docker吗?
对这个步骤2不是很理解,是需要先在windows上安装docker,然后在cmd里用docker启动milvus服务吗?我不太会安装docker...
built文件后报错,不知晓原因,求教
[bug]关于比较大的文本输入构建索引失败
用2MB左右的文本已经成功构建了一个索引
但是在使用一个15MB左右的文本构建索引的时候连那个读条都没出来,就一直维持什么都没有的状态三个小时
所以是不是过于大的文本需要先分割好呢?
Exception has occurred: MilvusException <MilvusException: (code=2, message=Fail connecting to server on localhost:19530, illegal connection params or server unavailable)>
Exception has occurred: MilvusException
<MilvusException: (code=2, message=Fail connecting to server on localhost:19530, illegal connection params or server unavailable)>
这个怎么解决
如何使用本地的模型权重接入?
如果不想使用在线的大模型api,使用本地的模型如qwen7b等接入该程序,有什么建议吗
知识库构建索引出错
与 #32 情况不一样,服务器资源充足。
milvus 版本 2.3.3 , 使用 docker 部署。
存储情况如下:
[root@server volumes]# du ./ --max-depth=1 -h
367M ./etcd
8.9M ./minio
888M ./milvus
1.3G ./
运行情况如下:
[root@gpu-server milvus]# docker-compose ps
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
attu zilliz/attu:v2.3.2 "docker-entrypoint.s…" attu 6 hours ago Up 6 hours 0.0.0.0:8000->3000/tcp, :::8000->3000/tcp
milvus-etcd quay.io/coreos/etcd:v3.5.5 "etcd -advertise-cli…" etcd 6 hours ago Up 6 hours (healthy) 2379-2380/tcp
milvus-minio minio/minio:RELEASE.2023-03-20T20-16-18Z "/usr/bin/docker-ent…" minio 6 hours ago Up 6 hours (healthy) 0.0.0.0:9000-9001->9000-9001/tcp, :::9000-9001->9000-9001/tcp
milvus-standalone milvusdb/milvus:v2.3.3 "/tini -- milvus run…" standalone 6 hours ago Up 6 hours (healthy) 0.0.0.0:19530->19530/tcp, :::19530->19530/tcp
错误日志如下:
[2024-03-21 20:43:06,020: ERROR/MainProcess] RPC error: [insert_rows], <DataNotMatchException: (code=1, message=Attempt to insert an unexpected field to collection without enabling dynamic field)>, <Time:{'RPC start': '2024-03-21 20:43:06.017347', 'RPC error': '2024-03-21 20:43:06.020646'}>
[2024-03-21 20:43:06,021: ERROR/MainProcess] Failed to insert batch starting at entity: 0/11
[2024-03-21 20:43:06,021: ERROR/MainProcess] Failed to insert batch starting at entity: 0/11
[2024-03-21 20:43:06,021: ERROR/MainProcess] consume document failed
Traceback (most recent call last):
File "/app/api/core/indexing_runner.py", line 70, in run
self._load(
File "/app/api/core/indexing_runner.py", line 667, in _load
index_processor.load(dataset, chunk_documents)
File "/app/api/core/rag/index_processor/processor/paragraph_index_processor.py", line 59, in load
vector.create(documents)
File "/app/api/core/rag/datasource/vdb/vector_factory.py", line 121, in create
self._vector_processor.create(
File "/app/api/core/rag/datasource/vdb/milvus/milvus_vector.py", line 75, in create
self.add_texts(texts, embeddings)
File "/app/api/core/rag/datasource/vdb/milvus/milvus_vector.py", line 101, in add_texts
raise e
File "/app/api/core/rag/datasource/vdb/milvus/milvus_vector.py", line 95, in add_texts
ids = self._client.insert(collection_name=self._collection_name, data=batch_insert_list)
File "/usr/local/lib/python3.10/site-packages/pymilvus/milvus_client/milvus_client.py", line 206, in insert
raise ex from ex
File "/usr/local/lib/python3.10/site-packages/pymilvus/milvus_client/milvus_client.py", line 198, in insert
res = conn.insert_rows(collection_name, insert_batch, timeout=timeout)
File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 127, in handler
raise e from e
File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 123, in handler
return func(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 162, in handler
return func(self, *args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 102, in handler
raise e from e
File "/usr/local/lib/python3.10/site-packages/pymilvus/decorators.py", line 68, in handler
return func(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/pymilvus/client/grpc_handler.py", line 501, in insert_rows
request = self._prepare_row_insert_request(
File "/usr/local/lib/python3.10/site-packages/pymilvus/client/grpc_handler.py", line 482, in _prepare_row_insert_request
return Prepare.row_insert_param(
File "/usr/local/lib/python3.10/site-packages/pymilvus/client/prepare.py", line 422, in row_insert_param
return cls._parse_row_request(request, fields_info, enable_dynamic, entities)
File "/usr/local/lib/python3.10/site-packages/pymilvus/client/prepare.py", line 370, in _parse_row_request
raise DataNotMatchException(message=ExceptionsMessage.InsertUnexpectedField)
pymilvus.exceptions.DataNotMatchException: <DataNotMatchException: (code=1, message=Attempt to insert an unexpected field to collection without enabling dynamic field)>
[2024-03-21 20:43:06,028: INFO/MainProcess] Processed dataset: bd66a1d2-d871-42c4-8fe7-4275be32a591 latency: 6.201149852946401
[2024-03-21 20:43:06,064: INFO/MainProcess] Task tasks.document_indexing_task.document_indexing_task[0df93ed7-9cae-4670-842d-8032b3d5852b] succeeded in 6.23699377477169s: None
win启动不了
win启动的时候报错:ImportError: cannot import name 'LLM' from 'llama_index.core.llms' (C:\ProgramData\Miniconda3\envs\history_rag-master\lib\site-packages\llama_index\core\llms_init_.py)
换了llama_index的版本还是不行
怎么配合ollma 使用?
怎么配合ollma 使用?
ValueError
WebUI 交互能看到页面,但是控制台显示 链接超时
在 gradioui.py中,注释掉以下几句
with open("docs/web_ui.md", "r") as f: article = f.read() gr.Markdown(article)
然后控制台启动,即可正常查看了
(rag) D:\RAGDemo\history_rag-master>python gradioui.py
Running on local URL: http://127.0.0.1:7860
To create a public link, set share=True
in launch()
.
是否可以更换文本
大佬好,这是提的第二个Issue,之前提的已经解决了,史先生部署成功了,很有意义的一个项目。再次感谢!
问题:如何用您的项目代码构建一个新的知识库?
背景:我想更换为其他的语料,是不是意味着:我需要重新做一个milvus库?而不是:直接把txt文件丢到文件夹,build就好?
因为我这么做过,问相关的问题,答案就是:不知道。
所以想请教您:如何用您的项目代码构建一个新的知识库?谢谢!
ZS
项目依赖的都是白话史料,目前有比较好的文言文翻译/理解的项目吗
运行 `python cli.py`时发生错误
你好。我的环境信息:操作系统:Windows 11
开发工具:VSCode
Python 版本:python-3.11.8
llama-index 版本:0.9.39
Issue: 在命令行模式下(powershell和cmd都是)运行 python cli.py
时发生错误
ImportError: cannot import name 'ChatMessage' from 'llama_index.core.llms' (C:\Users\zhaos\AppData\Roaming\Python\Python311\site-packages\llama_index\core\llms_init_.py)
谢谢!
ZS
milvus standalone时不时崩溃
也许是txt太多了?
ImportError:cannot import name 'ServiceContext' from 'llama_index.core'
WSL2 Ubuntu环境下提示cannot import name 'ServiceContext' from 'llama_index.core',llama-index版本是0.9.39
1. 执行pip show setuptools | findstr "openai" 看一下你的openai 版本
1. 执行pip show setuptools | findstr "openai" 看一下你的openai 版本
- echo %OPENAI_API_KEY% 你看一下能不能看到你的 api key, 以sk-xxxxxx开头
- 在2能看见的情况下,将configs/config.yaml 中的第二行换为由“gpt-4”(最新应该是gpt-4-0125-preview"")改为“gpt-3.5-turbo-1106”,看一下会报错吗
Originally posted by @wxywb in #21 (comment)
这个情况是什么情况 历史爱好者不懂编程
ImportError: cannot import name 'LLM' from 'llama_index.core.llms'
我在进入ask模式时报错:ImportError: cannot import name 'LLM' from 'llama_index.core.llms' (/home/kali/miniconda3/envs/AIlearn/lib/python3.9/site-packages/llama_index/core/llms/init.py)
我的llama-index库版本为0.9.39
覆写overwirite为true时,_initialize_pipeline报错,提示_initialize_pipeline()未传入参数
pipeline方案报错 zilliz pipeline 连接异常 {"code":80001
pipeline方案返回的相关文献没有出处的信息
Zilliz Cloud Pipelines方案怎么使用通义千文作为LLM
Zilliz Cloud Pipelines方案怎么使用通义千文作为LLM?
想使用代理的openai,该怎么办
请问如果我i使用的API不是直接连接到openai api而是经过中转的接口,调用前需要转换,在你的程序里需要修改哪里呢?
下面是中转站给的示例:
from openai import OpenAI
api_key = "xxx"
api_base = "https://one.aiskt.com/v1"
client = OpenAI(api_key=api_key, base_url=api_base)
completion = client.chat.completions.create(
model="gpt-3.5-turbo",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
]
)
print(completion.choices[0].message)
Empty Response
把模型换成gpt-3.5-turbo了,但是回答准确率比较低。
(rag) 问题: 张飞的妻子是谁?
张飞的妻子是后主敬哀皇后的长女。
+---------------------------------------------------------------------------------------------------------------------+
(rag) 问题: 后主敬哀皇后是谁?
后主敬哀皇后是车骑将军张飞的长女。
+---------------------------------------------------------------------------------------------------------------------+
小白遇到Milvus服务器的问题,恳请解答
大神你好,在执行python cli.py后,遇到如下问题,感觉是Milvus服务器没有运行,但自己在这方面知识储备几乎为0,请大神指教,多谢:
(rag) 选择[milvus|pipeline]方案
(rag) milvus
(rag) milvus模式已选择
1.使用build data/history_24/baihuasanguozhi.txt
来进行知识库构建。
2.已有索引可以使用ask
进行提问, -d
参数以debug模式进入。
3.删除已有索引可以使用remove baihuasanguozhi.txt
。
(rag) ask
Failed to create new connection using: b1afc9fc359640d19a58706da83db8a4
Traceback (most recent call last):
File "/app/cli.py", line 120, in
cli.run()
File "/app/cli.py", line 53, in run
self.parse_input(command_text)
File "/app/cli.py", line 74, in parse_input
self.question_answer()
File "/app/cli.py", line 99, in question_answer
self._executor.build_query_engine()
File "/app/executor.py", line 196, in build_query_engine
self._get_index()
File "/app/executor.py", line 186, in _get_index
vector_store = MilvusVectorStore(
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/llama_index/vector_stores/milvus.py", line 137, in init
self.milvusclient = MilvusClient(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pymilvus/milvus_client/milvus_client.py", line 59, in init
self._using = self._create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pymilvus/milvus_client/milvus_client.py", line 551, in _create_connection
raise ex from ex
File "/usr/local/lib/python3.11/site-packages/pymilvus/milvus_client/milvus_client.py", line 548, in _create_connection
connections.connect(using, user, password, db_name, token, uri=uri, **kwargs)
File "/usr/local/lib/python3.11/site-packages/pymilvus/orm/connections.py", line 414, in connect
connect_milvus(**kwargs, user=user, password=password, token=token, db_name=db_name)
File "/usr/local/lib/python3.11/site-packages/pymilvus/orm/connections.py", line 365, in connect_milvus
gh._wait_for_channel_ready(timeout=timeout)
File "/usr/local/lib/python3.11/site-packages/pymilvus/client/grpc_handler.py", line 146, in _wait_for_channel_ready
raise MilvusException(
pymilvus.exceptions.MilvusException: <MilvusException: (code=2, message=Fail connecting to server on localhost:19530. Timeout)>
想知道怎么转换txt到json
文档分个模块和向量化
知识库构建索引出错,提示pymilvus.exceptions.DataNotMatchException: <DataNotMatchException: (code=1, message=Attempt to insert an unexpected field to collection without enabling dynamic field)>
当我成功连上milvus,并且执行 build data/history_24/baihuasanguozhi.txt命令后,进度条达到100%,报错
数据库不停的在报一个我不知道的错误
前面还报了一个好像是找不到索引的错误
数据库还有最上面的一堆错误
[2024/02/05 05:29:10.209 +00:00] [WARN] [grpcclient/client.go:516] ["ClientBase Call grpc call get error"] [role=proxy-2] [address=172.18.0.4:19529] [error="stack trace: /go/src/github.com/milvus-io/milvus/pkg/tracer/stack_trace.go:51 github.com/milvus-io/milvus/pkg/tracer.StackTrace\n/go/src/github.com/milvus-io/milvus/internal/util/grpcclient/client.go:515 github.com/milvus-io/milvus/internal/util/grpcclient.(*ClientBase[...]).Call\n/go/src/github.com/milvus-io/milvus/internal/util/grpcclient/client.go:529 github.com/milvus-io/milvus/internal/util/grpcclient.(*ClientBase[...]).ReCall\n/go/src/github.com/milvus-io/milvus/internal/distributed/proxy/client/client.go:76 github.com/milvus-io/milvus/internal/distributed/proxy/client.wrapGrpcCall[...]\n/go/src/github.com/milvus-io/milvus/internal/distributed/proxy/client/client.go:142 github.com/milvus-io/milvus/internal/distributed/proxy/client.(*Client).RefreshPolicyInfoCache\n/go/src/github.com/milvus-io/milvus/internal/rootcoord/proxy_client_manager.go:242 github.com/milvus-io/milvus/internal/rootcoord.(*proxyClientManager).RefreshPolicyInfoCache.func1\n/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 golang.org/x/sync/errgroup.(*Group).Go.func1\n/usr/local/go/src/runtime/asm_amd64.s:1598 runtime.goexit: attempt #0: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #1: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #2: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #3: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #4: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #5: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #6: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #7: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #8: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #9: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match"] [errorVerbose="stack trace: /go/src/github.com/milvus-io/milvus/pkg/tracer/stack_trace.go:51 github.com/milvus-io/milvus/pkg/tracer.StackTrace: attempt #0: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #1: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #2: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #3: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #4: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #5: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #6: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #7: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #8: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #9: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match\n(1) attached stack trace\n -- stack trace:\n | github.com/milvus-io/milvus/internal/util/grpcclient.(*ClientBase[...]).Call\n | \t/go/src/github.com/milvus-io/milvus/internal/util/grpcclient/client.go:515\n | [...repeated from below...]\nWraps: (2) stack trace: /go/src/github.com/milvus-io/milvus/pkg/tracer/stack_trace.go:51 github.com/milvus-io/milvus/pkg/tracer.StackTrace\n | /go/src/github.com/milvus-io/milvus/internal/util/grpcclient/client.go:515 github.com/milvus-io/milvus/internal/util/grpcclient.(*ClientBase[...]).Call\n | /go/src/github.com/milvus-io/milvus/internal/util/grpcclient/client.go:529 github.com/milvus-io/milvus/internal/util/grpcclient.(*ClientBase[...]).ReCall\n | /go/src/github.com/milvus-io/milvus/internal/distributed/proxy/client/client.go:76 github.com/milvus-io/milvus/internal/distributed/proxy/client.wrapGrpcCall[...]\n | /go/src/github.com/milvus-io/milvus/internal/distributed/proxy/client/client.go:142 github.com/milvus-io/milvus/internal/distributed/proxy/client.(*Client).RefreshPolicyInfoCache\n | /go/src/github.com/milvus-io/milvus/internal/rootcoord/proxy_client_manager.go:242 github.com/milvus-io/milvus/internal/rootcoord.(*proxyClientManager).RefreshPolicyInfoCache.func1\n | /go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 golang.org/x/sync/errgroup.(*Group).Go.func1\n | /usr/local/go/src/runtime/asm_amd64.s:1598 runtime.goexit\nWraps: (3) attempt #0: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #1: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #2: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #3: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #4: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #5: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #6: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #7: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #8: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match\nWraps: (4) attached stack trace\n -- stack trace:\n | github.com/milvus-io/milvus/pkg/util/retry.Do\n | \t/go/src/github.com/milvus-io/milvus/pkg/util/retry/retry.go:49\n | github.com/milvus-io/milvus/internal/util/grpcclient.(*ClientBase[...]).call\n | \t/go/src/github.com/milvus-io/milvus/internal/util/grpcclient/client.go:429\n | github.com/milvus-io/milvus/internal/util/grpcclient.(*ClientBase[...]).Call\n | \t/go/src/github.com/milvus-io/milvus/internal/util/grpcclient/client.go:513\n | github.com/milvus-io/milvus/internal/util/grpcclient.(*ClientBase[...]).ReCall\n | \t/go/src/github.com/milvus-io/milvus/internal/util/grpcclient/client.go:529\n | github.com/milvus-io/milvus/internal/distributed/proxy/client.wrapGrpcCall[...]\n | \t/go/src/github.com/milvus-io/milvus/internal/distributed/proxy/client/client.go:76\n | github.com/milvus-io/milvus/internal/distributed/proxy/client.(*Client).RefreshPolicyInfoCache\n | \t/go/src/github.com/milvus-io/milvus/internal/distributed/proxy/client/client.go:142\n | github.com/milvus-io/milvus/internal/rootcoord.(*proxyClientManager).RefreshPolicyInfoCache.func1\n | \t/go/src/github.com/milvus-io/milvus/internal/rootcoord/proxy_client_manager.go:242\n | golang.org/x/sync/errgroup.(*Group).Go.func1\n | \t/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75\n | runtime.goexit\n | \t/usr/local/go/src/runtime/asm_amd64.s:1598\nWraps: (5) attempt #9\nWraps: (6) rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match\nError types: (1) *withstack.withStack (2) *errutil.withPrefix (3) merr.multiErrors (4) *withstack.withStack (5) *errutil.withPrefix (6) *status.Error"]
[2024/02/05 05:29:10.217 +00:00] [INFO] [rootcoord/root_coord.go:674] ["fail to refresh policy info cache"] [error="RefreshPolicyInfoCache failed, proxyID = 2, err = stack trace: /go/src/github.com/milvus-io/milvus/pkg/tracer/stack_trace.go:51 github.com/milvus-io/milvus/pkg/tracer.StackTrace\n/go/src/github.com/milvus-io/milvus/internal/util/grpcclient/client.go:515 github.com/milvus-io/milvus/internal/util/grpcclient.(*ClientBase[...]).Call\n/go/src/github.com/milvus-io/milvus/internal/util/grpcclient/client.go:529 github.com/milvus-io/milvus/internal/util/grpcclient.(*ClientBase[...]).ReCall\n/go/src/github.com/milvus-io/milvus/internal/distributed/proxy/client/client.go:76 github.com/milvus-io/milvus/internal/distributed/proxy/client.wrapGrpcCall[...]\n/go/src/github.com/milvus-io/milvus/internal/distributed/proxy/client/client.go:142 github.com/milvus-io/milvus/internal/distributed/proxy/client.(*Client).RefreshPolicyInfoCache\n/go/src/github.com/milvus-io/milvus/internal/rootcoord/proxy_client_manager.go:242 github.com/milvus-io/milvus/internal/rootcoord.(*proxyClientManager).RefreshPolicyInfoCache.func1\n/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 golang.org/x/sync/errgroup.(*Group).Go.func1\n/usr/local/go/src/runtime/asm_amd64.s:1598 runtime.goexit: attempt #0: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #1: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #2: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #3: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #4: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #5: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #6: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #7: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #8: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #9: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match"]
[2024/02/05 05:29:10.225 +00:00] [ERROR] [rootcoord/root_coord.go:670] ["retry func failed"] ["retry time"=0] [error="RefreshPolicyInfoCache failed, proxyID = 2, err = stack trace: /go/src/github.com/milvus-io/milvus/pkg/tracer/stack_trace.go:51 github.com/milvus-io/milvus/pkg/tracer.StackTrace\n/go/src/github.com/milvus-io/milvus/internal/util/grpcclient/client.go:515 github.com/milvus-io/milvus/internal/util/grpcclient.(*ClientBase[...]).Call\n/go/src/github.com/milvus-io/milvus/internal/util/grpcclient/client.go:529 github.com/milvus-io/milvus/internal/util/grpcclient.(*ClientBase[...]).ReCall\n/go/src/github.com/milvus-io/milvus/internal/distributed/proxy/client/client.go:76 github.com/milvus-io/milvus/internal/distributed/proxy/client.wrapGrpcCall[...]\n/go/src/github.com/milvus-io/milvus/internal/distributed/proxy/client/client.go:142 github.com/milvus-io/milvus/internal/distributed/proxy/client.(*Client).RefreshPolicyInfoCache\n/go/src/github.com/milvus-io/milvus/internal/rootcoord/proxy_client_manager.go:242 github.com/milvus-io/milvus/internal/rootcoord.(*proxyClientManager).RefreshPolicyInfoCache.func1\n/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 golang.org/x/sync/errgroup.(*Group).Go.func1\n/usr/local/go/src/runtime/asm_amd64.s:1598 runtime.goexit: attempt #0: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #1: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #2: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #3: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #4: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #5: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #6: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #7: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #8: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match: attempt #9: rpc error: code = Unknown desc = expectedNodeID=2, actualNodeID=3: node not match"] [stack="github.com/milvus-io/milvus/internal/rootcoord.(*Core).startInternal.func1\n\t/go/src/github.com/milvus-io/milvus/internal/rootcoord/root_coord.go:670"]
[2024/02/05 05:29:10.230 +00:00] [INFO] [rootcoord/proxy_client_manager.go:120] ["succeed to create proxy client"] [address=172.18.0.4:19529] [serverID=3]
[2024/02/05 05:29:10.230 +00:00] [INFO] [rootcoord/timeticksync.go:241] ["Remove session from timeticksync"] [serverID=2]
[2024/02/05 05:29:10.230 +00:00] [INFO] [rootcoord/proxy_client_manager.go:135] ["remove proxy client"] ["proxy address"=172.18.0.4:19529] ["proxy id"=2]
[2024/02/05 05:29:10.239 +00:00] [WARN] [rootcoord/quota_center.go:146] ["quotaCenter sync metrics failed"] [error="GetMetrics failed, proxyID = 3, err = context deadline exceeded"]
[2024/02/05 05:29:12.597 +00:00] [INFO] [datacoord/meta.go:1287] ["UpdateChannelCheckpoint done"] [vChannel=by-dev-rootcoord-dml_0_447391822218951197v0] [ts=447508892842983425] [msgID="\u0001\u0000dS\ufffd\ufffd5\u0006"] [time=2024/02/05 05:29:09.871 +00:00]
看起来好像是节点识别有问题,有没有遇到过的大佬帮忙解答下
Unknow Model 的问题
[bug]ValueError:Cannot use llm_chat_callback on an instance without a callback_manager attribute.
问题描述
按照项目中的 Windows 说明按步骤执行过程中,遇到了问题。
环境信息
- 操作系统:Windows 11
- 开发工具:VSCode
- Python 版本:3.9.12
- llama-index 版本:0.9.39
执行步骤列表
-
clone项目到本地。
-
使用 .venv 创建虚拟环境——Python 版本是 3.9.12。
-
pip——过程中,会自动安装最新版本的 llama-index(版本是 0.10.x)。
-
pip——我手动升级为 0.9.39。
-
首次运行前——在 VSCode 下遇到了模块与文件名重名的情况,需要修改 3 处才能运行
python cli.py
。修改的地方分别是:-
from llama_index.core.query_pipeline.components import (...)
(components模块下的components.py无法识别) -
from llama_index.core.llms.llm import LLM
(llm 模块下的llm.py无法识别) -
from llama_index.core.llms.llm import ChatMessage, MessageRole
-
from llama_index.core import global_handler
(llama_index.core模块下没有global_handler)
-
-
build txt 过程没有遇到问题。
-
在执行
ask -d
过程中可以正确返回结果,但随后产生了 ValueError。
Traceback (most recent call last):
File "C:\Users\A\VscodeProjects\history_rag\cli.py", line 120, in <module>
cli.run()
File "C:\Users\A\VscodeProjects\history_rag\cli.py", line 53, in run
self.parse_input(command_text)
File "C:\Users\A\VscodeProjects\history_rag\cli.py", line 74, in parse_input
self.question_answer()
File "C:\Users\A\VscodeProjects\history_rag\cli.py", line 109, in question_answer
self.query(question)
File "C:\Users\A\VscodeProjects\history_rag\cli.py", line 86, in query
ans = self._executor.query(question)
File "C:\Users\A\VscodeProjects\history_rag\executor.py", line 237, in query
response = self.query_engine.query(question)
File "c:\Users\A\VscodeProjects\history_rag\.venv\lib\site-packages\llama_index\core\base_query_engine.py", line 40, in query
return self._query(str_or_query_bundle)
File "c:\Users\A\VscodeProjects\history_rag\.venv\lib\site-packages\llama_index\query_engine\retriever_query_engine.py", line 172, in _query
response = self._response_synthesizer.synthesize(
File "c:\Users\A\VscodeProjects\history_rag\.venv\lib\site-packages\llama_index\response_synthesizers\base.py", line 168, in synthesize
response_str = self.get_response(
File "c:\Users\A\VscodeProjects\history_rag\.venv\lib\site-packages\llama_index\response_synthesizers\compact_and_refine.py", line 38, in get_response
return super().get_response(
File "c:\Users\A\VscodeProjects\history_rag\.venv\lib\site-packages\llama_index\response_synthesizers\refine.py", line 146, in get_response
response = self._give_response_single(
File "c:\Users\A\VscodeProjects\history_rag\.venv\lib\site-packages\llama_index\response_synthesizers\refine.py", line 202, in _give_response_single
program(
File "c:\Users\A\VscodeProjects\history_rag\.venv\lib\site-packages\llama_index\response_synthesizers\refine.py", line 64, in __call__
answer = self._llm.predict(
File "c:\Users\A\VscodeProjects\history_rag\.venv\lib\site-packages\llama_index\core\llms\llm_.py", line 239, in predict
chat_response = self.chat(messages)
File "c:\Users\A\VscodeProjects\history_rag\.venv\lib\site-packages\llama_index\core\llms\callbacks.py", line 84, in wrapped_llm_chat
with wrapper_logic(_self) as callback_manager:
File "C:\Users\A\AppData\Local\Programs\Python\Python39\lib\contextlib.py", line 119, in __enter__
return next(self.gen)
File "c:\Users\A\VscodeProjects\history_rag\.venv\lib\site-packages\llama_index\core\llms\callbacks.py", line 30, in wrapper_logic
raise ValueError(
ValueError: Cannot use llm_chat_callback on an instance without a callback_manager attribute.
Zilliz Cloud Pipelines方案中https://raw.githubusercontent.com/wxywb/history_rag/master/data/history_24/失效
milvus连接出错
输入ask后报错
索引已经生成过了,报错如下
`python3 cli.py
___ ___ _____ _ _ _ _____ _____ _____ _____ __ __
/ |/ | | _ \ | | | | | | / / | | / _ \ | _ \ \ \ / /
/ /| /| | | || | | || | | | | |__ | | | | | | | || | \ / /
/ / |/ | | | _ / | _ | | | _ \ | | | | | | | _ / \ /
/ / | | | | \ \ | | | | | | | | | | | || | | | \ \ / /
// || || _\ || || || /_____/ || ___/ || _\ //
- Version:2.0 *
- Author:Bruce Young *
(rag) 选择[milvus|pipeline]方案
(rag) milvus
(rag) milvus模式已选择
1.使用build data/history_24/baihuasanguozhi.txt
来进行知识库构建。
2.已有索引可以使用ask
进行提问, -d
参数以debug模式进入。
3.删除已有索引可以使用remove baihuasanguozhi.txt
。
(rag) ask -d
Traceback (most recent call last):
File "/home/pushsoft/cywTest/history_rag/cli.py", line 120, in
cli.run()
File "/home/pushsoft/cywTest/history_rag/cli.py", line 53, in run
self.parse_input(command_text)
File "/home/pushsoft/cywTest/history_rag/cli.py", line 74, in parse_input
self.question_answer()
File "/home/pushsoft/cywTest/history_rag/cli.py", line 99, in question_answer
self._executor.build_query_engine()
File "/home/pushsoft/cywTest/history_rag/executor.py", line 201, in build_query_engine
self.query_engine = self.index.as_query_engine(node_postprocessors=[
File "/home/pushsoft/.local/lib/python3.10/site-packages/llama_index/indices/base.py", line 350, in as_query_engine
from llama_index.query_engine.retriever_query_engine import RetrieverQueryEngine
File "/home/pushsoft/.local/lib/python3.10/site-packages/llama_index/query_engine/init.py", line 27, in
from llama_index.query_engine.router_query_engine import (
File "/home/pushsoft/.local/lib/python3.10/site-packages/llama_index/query_engine/router_query_engine.py", line 24, in
from llama_index.selectors.utils import get_selector_from_context
File "/home/pushsoft/.local/lib/python3.10/site-packages/llama_index/selectors/init.py", line 3, in
from llama_index.selectors.pydantic_selectors import (
File "/home/pushsoft/.local/lib/python3.10/site-packages/llama_index/selectors/pydantic_selectors.py", line 10, in
from llama_index.program.openai_program import OpenAIPydanticProgram
File "/home/pushsoft/.local/lib/python3.10/site-packages/llama_index/program/init.py", line 5, in
from llama_index.program.openai_program import OpenAIPydanticProgram
File "/home/pushsoft/.local/lib/python3.10/site-packages/llama_index/program/openai_program.py", line 4, in
from llama_index.agent.openai.utils import resolve_tool_choice
File "/home/pushsoft/.local/lib/python3.10/site-packages/llama_index/agent/init.py", line 2, in
from llama_index.agent.custom.pipeline_worker import QueryPipelineAgentWorker
File "/home/pushsoft/.local/lib/python3.10/site-packages/llama_index/agent/custom/pipeline_worker.py", line 27, in
from llama_index.query_pipeline.components.agent import (
File "/home/pushsoft/.local/lib/python3.10/site-packages/llama_index/query_pipeline/init.py", line 24, in
from llama_index.query_pipeline.query import InputKeys, OutputKeys, QueryPipeline
File "/home/pushsoft/.local/lib/python3.10/site-packages/llama_index/query_pipeline/query.py", line 7, in
import networkx
File "/usr/local/lib/python3.10/dist-packages/networkx/init.py", line 20, in
from networkx.utils.backends import _dispatch
File "/usr/local/lib/python3.10/dist-packages/networkx/utils/backends.py", line 132, in
backends = _get_backends("networkx.plugins")
File "/usr/local/lib/python3.10/dist-packages/networkx/utils/backends.py", line 106, in _get_backends
items = entry_points(group=group)
File "/usr/lib/python3.10/importlib/metadata/init.py", line 1021, in entry_points
return SelectableGroups.load(eps).select(**params)
File "/usr/lib/python3.10/importlib/metadata/init.py", line 459, in load
ordered = sorted(eps, key=by_group)
File "/usr/lib/python3.10/importlib/metadata/init.py", line 1018, in
eps = itertools.chain.from_iterable(
File "/usr/lib/python3.10/importlib/metadata/_itertools.py", line 16, in unique_everseen
k = key(element)
File "/usr/lib/python3.10/importlib/metadata/init.py", line 943, in _normalized_name
or super().normalized_name
File "/usr/lib/python3.10/importlib/metadata/init.py", line 622, in normalized_name
return Prepared.normalize(self.name)
File "/usr/lib/python3.10/importlib/metadata/init.py", line 871, in normalize
return re.sub(r"[-.]+", "-", name).lower().replace('-', '')
File "/usr/lib/python3.10/re.py", line 209, in sub
return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or bytes-like objec`
[ 需求 ] 新增 OpenAI API 代理站点的设置
因为某些情况下,不能直接访问 OpenAI ,需要使用国内网络可访问的 代理服务。
能否新增一个环境变量,例如 API_BASE_URL
能有一个从零部署的说明吗?
下载本地模型后依旧报错Connection error. OSError: [Errno 101] Network is unreachable
发生异常: APIConnectionError
Connection error.
OSError: [Errno 101] Network is unreachable
During handling of the above exception, another exception occurred:
httpcore.ConnectError: [Errno 101] Network is unreachable
The above exception was the direct cause of the following exception:
httpx.ConnectError: [Errno 101] Network is unreachable
During handling of the above exception, another exception occurred:
OSError: [Errno 101] Network is unreachable
During handling of the above exception, another exception occurred:
httpcore.ConnectError: [Errno 101] Network is unreachable
The above exception was the direct cause of the following exception:
httpx.ConnectError: [Errno 101] Network is unreachable
During handling of the above exception, another exception occurred:
OSError: [Errno 101] Network is unreachable
During handling of the above exception, another exception occurred:
httpcore.ConnectError: [Errno 101] Network is unreachable
The above exception was the direct cause of the following exception:
httpx.ConnectError: [Errno 101] Network is unreachable
During handling of the above exception, another exception occurred:
OSError: [Errno 101] Network is unreachable
During handling of the above exception, another exception occurred:
httpcore.ConnectError: [Errno 101] Network is unreachable
The above exception was the direct cause of the following exception:
httpx.ConnectError: [Errno 101] Network is unreachable
The above exception was the direct cause of the following exception:
File "/home/ureka/history_rag-master/executor.py", line 241, in query
response = self.query_engine.query(question)
File "/home/ureka/history_rag-master/cli.py", line 89, in query
ans = self._executor.query(question)
File "/home/ureka/history_rag-master/cli.py", line 112, in question_answer
self.query(question)
File "/home/ureka/history_rag-master/cli.py", line 77, in parse_input
self.question_answer()
File "/home/ureka/history_rag-master/cli.py", line 56, in run
self.parse_input(command_text)
File "/home/ureka/history_rag-master/cli.py", line 123, in
cli.run()
openai.APIConnectionError: Connection error.
在 HF 部署一个 demo?
您好,这个项目太棒了,是否考虑来 HF 弄一个 demo 吗?这样很多没有技术背景的同学也都可以直接用起来啦~
可以用类似 https://huggingface.co/spaces/fastx/Gpt-4-chatbot 这里的方式让大家输入自己的 API key 我们应该也可以提供一些国内模型的 api token
我的微信: zhou_a_zhou
祝好~
铁震
[Feature Requests] 关于WebUI与返回检索内容的需求
- 后期有打算提供web ui嘛?目前在wsl环境会出现ANSI 转义序列的问题,可以通过
import readline
解决,但是还是不够好看 - 能否只返回topk的chunk(检索得到的原文内容),不进行llm具体调用?
- 可以在FAQ里列一下一般一个问题的价格?我个人实测GPT4 turbo的价格在每个问题0.05$左右
运行时提示ImportError: ('Cannot import sentence-transformers or torch package,', 'please `pip install torch sentence-transformers`')
已经安装了sentence-transformers==2.5.0
和torch==2.2.1
但是仍然提示无法导入
('Cannot import sentence-transformers or torch package,', 'please
pip install torch sentence-transformers
')
ModuleNotFoundError: No module named 'sentence_transformers'
During handling of the above exception, another exception occurred:
File "/home/ureka/history_rag-master/executor.py", line 145, in init
self.rerank_postprocessor = SentenceTransformerRerank(
File "/home/ureka/history_rag-master/cli.py", line 30, in run
self._executor = MilvusExecutor(conf)
File "/home/ureka/history_rag-master/cli.py", line 120, in
cli.run()
ImportError: ('Cannot import sentence-transformers or torch package,', 'pleasepip install torch sentence-transformers
')
提问之后的api接口调用错误
pipeline方案使用qwen作为LLM时,无法正常使用
ImportError: cannot import name 'ServiceContext' from 'llama_index' (unknown location)
按照步骤安装完成,运行时报错:
(history-rag) ubuntu@SKTech-Shanghai:/var/www/history_rag$ python cli.py --cfg cfgs/config_qwen.yaml
Traceback (most recent call last):
File "/var/www/history_rag/cli.py", line 1, in
from executor import MilvusExecutor
File "/var/www/history_rag/executor.py", line 12, in
from llama_index import ServiceContext, StorageContext
ImportError: cannot import name 'ServiceContext' from 'llama_index' (unknown location)
关于非历史文本的输入
我想利用这个模型做一个别的知识领域的rag。但是我改了提示词和build的文本。如下:
文本:
When Madison was growing up, she was a difficult child. “She was very
intense and moody. She would flip at the switch of the light—unpre�dictable. When she was good, she was very good, but when she would
have those episodes of in-your-face hostility, living with her was very
hard.” Madison, as described by her mother, was very intelligent and was
in the gifted and talented program. She excelled in high school and
但是ask后显示Empty Response,debug后发现这个文本没有build上。故想请问如何操作能build上。
Error Code 429
我项目运行起来,在提问的阶段,提问后报错。
构建索引时报错,先前没有问题
已经建立过一次索引,后来想载入更多数据的时候,发现建立索引报错。
运行指令build https://raw.githubusercontent.com/wxywb/history_rag/master/data/history_24/baihuasanguozhi.txt
将zilliz上已经建立的表history_rag删除也依然无法添加
想问下RuntimeError: {'code': 90019, 'message': 'Pipeline server error: call server failed, msg=internal error'}
服务器这个状态码是什么意思,官方文档没有提及错误码的相关含义(国际版zilliz)
RuntimeError: {'code': 90019, 'message': 'Pipeline server error: call server failed, msg=internal error'}
➜ history_rag git:(master) ✗ python3 cli.py
___ ___ _____ _ _ _ _____ _____ _____ _____ __ __
/ |/ | | _ \ | | | | | | / / | | / _ \ | _ \ \ \ / /
/ /| /| | | || | | || | | | | |__ | | | | | | | || | \ / /
/ / |/ | | | _ / | _ | | | _ \ | | | | | | | _ / \ /
/ / | | | | \ \ | | | | | | | | | | | || | | | \ \ / /
// || || _\ || || || /_____/ || ___/ || _\ //
- Version:2.0 *
- Author:Bruce Young *
(rag) 选择[milvus|pipeline]方案
(rag) pipeline
Embeddings have been explicitly disabled. Using MockEmbedding.
(rag) pipeline模式已选择, 使用build https://raw.githubusercontent.com/wxywb/history_rag/master/data/history_24/baihuasanguozhi.txt
来进行知识库构建。
1.使用build https://raw.githubusercontent.com/wxywb/history_rag/master/data/history_24/baihuasanguozhi.txt
来进行知 识库构建。
2.已有索引可以使用ask
进行提问, -d
参数以debug模式进入。
3.删除已有索引可以使用remove baihuasanguozhi.txt
。
(rag) build https://raw.githubusercontent.com/Yi-Lyu/MyVimConfig/master/20240228.txt
Traceback (most recent call last):
File "/root/code/history_rag/cli.py", line 120, in
cli.run()
File "/root/code/history_rag/cli.py", line 53, in run
self.parse_input(command_text)
File "/root/code/history_rag/cli.py", line 65, in parse_input
self.build_index(path=commands[1], overwrite=False)
File "/root/code/history_rag/cli.py", line 92, in build_index
self._executor.build_index(path, overwrite)
File "/root/code/history_rag/executor.py", line 328, in build_index
self.index.insert_doc_url(
File "/root/code/history_rag/custom/zilliz/base.py", line 135, in insert_doc_url
raise RuntimeError(response_dict)
RuntimeError: {'code': 90019, 'message': 'Pipeline server error: call server failed, msg=internal error'}
Milvus方案与Zilliz Cloud Pipelines方案 结果不同
Zilliz Cloud Pipelines方案却提示API不行,是因为我用了中专站导致的吗?
llm:
name: "gpt-3.5-turbo-1106"
temperature: 0.01
api_base : "https://one.aiskt.com/v1"
可以使用GPT3.5的API吗?可否使用txt以外的文件(pdf)?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.