Comments (39)
我这里是Windows环境,我也配置了环境变量,但是上述错误还是存在,恳请前辈们指点,谢谢! (rag) C:\Users\zsc\Desktop\RAGDemo\history_rag-master>echo %HF_ENDPOINT% https://hf-mirror.com
(rag) C:\Users\zsc\Desktop\RAGDemo\history_rag-master>
参考一下faq里的问题,试试
huggingface-cli download --resume-download BAAI/bge-base-zh-v1.5
huggingface-cli download --resume-download BAAI/bge-reranker-large
from history_rag.
- 执行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”,看一下会报错吗
from history_rag.
感谢作者分享!请问我部署到这里向量数据库,就出错,如何解决?
(rag) 选择[milvus|pipeline]方案 (rag) milvus
from history_rag.
我这里是Windows环境,我也配置了环境变量,但是上述错误还是存在,恳请前辈们指点,谢谢!
(rag) C:\Users\zsc\Desktop\RAGDemo\history_rag-master>echo %HF_ENDPOINT%
https://hf-mirror.com
(rag) C:\Users\zsc\Desktop\RAGDemo\history_rag-master>
from history_rag.
谢谢回复!经过一番摸索,总算运行了,但是最后不能问答,是不是我的OpenAI key 不能用?我准备试试千问模型了
File "D:\RAGDemo\rag\lib\site-packages\httpcore\_exceptions.py", line 14, in map_exceptions raise to_exc(exc) from exc httpcore.ConnectError: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。
openai.APIConnectionError: Connection error.
from history_rag.
- 执行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”,看一下会报错吗
- 在2能看见的情况下,将configs/config.yaml 中的第二行换为由“gpt-4”(最新应该是gpt-4-0125-preview"")改为“gpt-3.5-turbo-1106”,看一下会报错吗 用这个就好了 , 不能用 GPT4.0以上的版本吗? 答主(我的GPT 账号是有 4 的 。应该是还有 key 把)
from history_rag.
好的,感谢前辈们答复!我试试
from history_rag.
我这里是Windows环境,我也配置了环境变量,但是上述错误还是存在,恳请前辈们指点,谢谢! (rag) C:\Users\zsc\Desktop\RAGDemo\history_rag-master>echo %HF_ENDPOINT% https://hf-mirror.com
(rag) C:\Users\zsc\Desktop\RAGDemo\history_rag-master>参考一下faq里的问题,试试 huggingface-cli download --resume-download BAAI/bge-base-zh-v1.5 huggingface-cli download --resume-download BAAI/bge-reranker-large
from history_rag.
我这OpenAI 版本: openai 1.10.0
api key, 能看到sk-xxxxxx开头 ,但是不知道3.0 版本 还是3.5 版本
我已改为gpt-3.5-turbo-1106, 还是报错 openai.APIConnectionError: Connection error.
不知道可要再下载这个模型了?
from history_rag.
我这OpenAI 版本: openai 1.10.0
api key, 能看到sk-xxxxxx开头 ,但是不知道3.0 版本 还是3.5 版本
我已改为gpt-3.5-turbo-1106, 还是报错 openai.APIConnectionError: Connection error.
不知道可要再下载这个模型了?
这个不是模型,你是在官网买的,还是买的中转站。
from history_rag.
感谢作者回复(我刚才也给您发邮件请教问题了),之前其他人给我的key,具体版本不清楚,我准备重新申请GPT4,
刚才我换为 千问,终于可以了,再次感谢大家!
from history_rag.
- 执行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”,看一下会报错吗
运行起来了,但是不可以用GPT 4.0 以上的版本了吗? (3.5的回答的太差强人意了)
from history_rag.
我还没有GPT 的key,我再试试重新申请,之前别人给的,不能用。
from history_rag.
- 执行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”,看一下会报错吗
运行起来了,但是不可以用GPT 4.0 以上的版本了吗? (3.5的回答的太差强人意了)
你可以换回去试一下,如果用不了gpt-4,估计就是你的账号无法访问gpt-4
from history_rag.
请问我刚才这里创建key,就是默认支持3.5 吗? 每个key, 限制$5?
这里限制,不知道什么意思?
之前申请的,好像过期了?
from history_rag.
- 执行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”,看一下会报错吗
运行起来了,但是不可以用GPT 4.0 以上的版本了吗? (3.5的回答的太差强人意了)
在千问模型下,我这边问答,很慢,要等2分钟才出来结果,请问你那边测试效果如何?
from history_rag.
- 执行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”,看一下会报错吗
运行起来了,但是不可以用GPT 4.0 以上的版本了吗? (3.5的回答的太差强人意了)
在千问模型下,我这边问答,很慢,要等2分钟才出来结果,请问你那边测试效果如何?
也许是由于需要gpu导致的,embedding模型和reranker模型都是需要gpu来运行的,如何确认这一点,你可以用ask -d
1.计算embedding,计算rerank
2.出现相关语料
3.出现回答
你可以看看是不是到第二步时间很长,这样的话是由于算力导致的。
from history_rag.
再次感谢回复!我是本地CPU 笔记本电脑,Docker 运行向量数据库,CPU 占比5% 左右。总体我熟悉了 流程。另外,WebUI 端,还不了解怎么启动
from history_rag.
再次感谢回复!我是本地CPU 笔记本电脑,Docker 运行向量数据库,CPU 占比5% 左右。总体我熟悉了 流程。另外,WebUI 端,还不了解怎么启动
https://github.com/wxywb/history_rag/blob/master/docs/web_ui.md
pip install gradio
python gradioui.py
然后打开浏览器,输入地址 http://127.0.0.1:7860
from history_rag.
这个社区贡献的,等我有空的时候会优化一下的
from history_rag.
这个社区贡献的,等我有空的时候会优化一下的
好的,感谢,我试试。
from history_rag.
- 执行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”,看一下会报错吗
运行起来了,但是不可以用GPT 4.0 以上的版本了吗? (3.5的回答的太差强人意了)
你可以换回去试一下,如果用不了gpt-4,估计就是你的账号无法访问gpt-4
没有别的处理方法吗 答主 ,好可惜的~~~~(我已经试过用GPT4.0 还有最新的 ,但是还是不行 )
from history_rag.
再次感谢回复!我是本地CPU 笔记本电脑,Docker 运行向量数据库,CPU 占比5% 左右。总体我熟悉了 流程。另外,WebUI 端,还不了解怎么启动
https://github.com/wxywb/history_rag/blob/master/docs/web_ui.md
pip install gradio
python gradioui.py
然后打开浏览器,输入地址 http://127.0.0.1:7860
我能看到UI页面了
但是启动 报个错误:httpcore.ConnectTimeout: timed out
from history_rag.
@sczhai 你关于webui可以开一个新issue,我之后来看一下,这个我先关了
from history_rag.
@sczhai 你关于webui可以开一个新issue,我之后来看一下,这个我先关了
好的
from history_rag.
@ppfanga
你现在的错误还和之前一样的吗
from history_rag.
@sczhai 你关于webui可以开一个新issue,我之后来看一下,这个我先关了
好的
我关掉工具,可以正常访问WebUI 页面了,多有打扰,实在抱歉。 麻烦把我刚才提的issue删除吧,我好像没有权限
from history_rag.
@ppfanga 你现在的错误还和之前一样的吗
(rag) 选择[milvus|pipeline]方案
(rag) milvus
C:\Users\86199.conda\envs\myenv\lib\site-packages\torch_utils.py:831: UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly. To access UntypedStorage directly, use tensor.untyped_storage() instead of tensor.storage()
return self.fget.get(instance, owner)()
(rag) milvus模式已选择
1.使用build data/history_24/baihuasanguozhi.txt
来进行知识库构建。
2.已有索引可以使用ask
进行提问, -d
参数以debug模式进入。
3.删除已有索引可以使用remove baihuasanguozhi.txt
。
(rag) ask
(rag) 问题: 关羽的家庭几口人
Traceback (most recent call last):
File "cli.py", line 120, in
cli.run()
File "cli.py", line 53, in run
self.parse_input(command_text)
File "cli.py", line 74, in parse_input
self.question_answer()
File "cli.py", line 109, in question_answer
self.query(question)
File "cli.py", line 86, in query
ans = self._executor.query(question)
File "D:\history\history_rag-master\executor.py", line 215, in query
response = self.query_engine.query(question)
File "C:\Users\86199.conda\envs\myenv\lib\site-packages\llama_index\core\base_query_engine.py", line 40, in query
return self._query(str_or_query_bundle)
File "C:\Users\86199.conda\envs\myenv\lib\site-packages\llama_index\query_engine\retriever_query_engine.py", line 172, in _query
response = self._response_synthesizer.synthesize(
File "C:\Users\86199.conda\envs\myenv\lib\site-packages\llama_index\response_synthesizers\base.py", line 168, in synthesize
response_str = self.get_response(
File "C:\Users\86199.conda\envs\myenv\lib\site-packages\llama_index\response_synthesizers\compact_and_refine.py", line 38, in get_response
return super().get_response(
File "C:\Users\86199.conda\envs\myenv\lib\site-packages\llama_index\response_synthesizers\refine.py", line 146, in get_response
response = self._give_response_single(
File "C:\Users\86199.conda\envs\myenv\lib\site-packages\llama_index\response_synthesizers\refine.py", line 202, in _give_response_single
program(
File "C:\Users\86199.conda\envs\myenv\lib\site-packages\llama_index\response_synthesizers\refine.py", line 64, in call
answer = self._llm.predict(
File "C:\Users\86199.conda\envs\myenv\lib\site-packages\llama_index\llms\llm.py", line 239, in predict
chat_response = self.chat(messages)
File "C:\Users\86199.conda\envs\myenv\lib\site-packages\llama_index\llms\base.py", line 100, in wrapped_llm_chat
f_return_val = f(_self, messages, **kwargs)
File "C:\Users\86199.conda\envs\myenv\lib\site-packages\llama_index\llms\openai.py", line 237, in chat
return chat_fn(messages, **kwargs)
File "C:\Users\86199.conda\envs\myenv\lib\site-packages\llama_index\llms\openai.py", line 296, in _chat
response = client.chat.completions.create(
File "C:\Users\86199.conda\envs\myenv\lib\site-packages\openai_utils_utils.py", line 271, in wrapper
return func(*args, **kwargs)
File "C:\Users\86199.conda\envs\myenv\lib\site-packages\openai\resources\chat\completions.py", line 659, in create
return self._post(
File "C:\Users\86199.conda\envs\myenv\lib\site-packages\openai_base_client.py", line 1180, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
File "C:\Users\86199.conda\envs\myenv\lib\site-packages\openai_base_client.py", line 869, in request
return self._request(
File "C:\Users\86199.conda\envs\myenv\lib\site-packages\openai_base_client.py", line 960, in _request
raise self._make_status_error_from_response(err.response) from None
openai.NotFoundError: Error code: 404 - {'error': {'message': 'The model gpt-4
does not exist or you do not have access to it. Learn more: https://help.openai.com/en/articles/7102672-how-can-i-access-gpt-4.', 'type': 'invalid_request_error', 'param': None, 'code': 'model_not_found'}} (我不太懂 但是报告是这样子的还是之前那个位置 ask 之后就是如此 )
from history_rag.
from openai import OpenAI
client = OpenAI()
completion = client.chat.completions.create(
model="gpt-4-0125-preview",
messages=[
{"role": "system", "content": "You are a poetic assistant, skilled in explaining complex programming concepts with creative flair."},
{"role": "user", "content": "Compose a poem that explains the concept of recursion in programming."}
]
)
print(completion)
新建一个文件,叫main.py 把上面的内容放进去保存,然后执行
python main.py
from history_rag.
from openai import OpenAI client = OpenAI() completion = client.chat.completions.create( model="gpt-4-0125-preview", messages=[ {"role": "system", "content": "You are a poetic assistant, skilled in explaining complex programming concepts with creative flair."}, {"role": "user", "content": "Compose a poem that explains the concept of recursion in programming."} ] ) print(completion)新建一个文件,叫main.py 把上面的内容放进去保存,然后执行
python main.py
from history_rag.
from openai import OpenAI client = OpenAI() completion = client.chat.completions.create( model="gpt-4-0125-preview", messages=[ {"role": "system", "content": "You are a poetic assistant, skilled in explaining complex programming concepts with creative flair."}, {"role": "user", "content": "Compose a poem that explains the concept of recursion in programming."} ] ) print(completion)新建一个文件,叫main.py 把上面的内容放进去保存,然后执行
python main.py
我把上述模型,换为:model="gpt-3.5-turbo"
api_key=os.environ.get("OPENAI_API_KEY")
client = OpenAI(
api_key=os.environ.get("OPENAI_API_KEY"),
)
单独运行找个程序,梯子也在,但还是报错 openai.APIConnectionError: Connection error.
请问我哪里出错?
from history_rag.
@ppfanga
这是openai的官方示例程序,这说明你的账户无法访问gpt-4,你得需要先搞定这个(找卖你账户的人)。
from history_rag.
有梯子,还需要代理吗? 目前需要设置代理才可以访问 api
os.environ["HTTP_PROXY"] = "http://127.0.0.1:33210"
os.environ["HTTPS_PROXY"] = "http://127.0.0.1:33210"
os.environ["ALL_PROXY"] = "socks5://127.0.0.1:33211"
程序中配置以上,还是不行,还是
httpx.ConnectError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。
openai.APIConnectionError: Connection error.
from history_rag.
@sczhai 你用的是api_base吗
from history_rag.
api_base
我就在这里申请的key: https://platform.openai.com/api-keys
上述程序,换为 3.5 ,参考这里:https://blog.csdn.net/laoyang360/article/details/135579132
单独运行程序,还是报错openai.APIConnectionError: Connection error.
和下午调试 RAGDemo 问答,最后报错 一样的
from history_rag.
好吧,那看来是由于复杂的网络原因导致的,我不是这方面的专家(我的环境不是在国内),可以多搜一些材料,或者加入使用openai的人的群咨询一下
from history_rag.
感谢作者耐心解答!都快过年了,我们几位还在这里热火朝天的研究。
我主要也是最近刚接触 LLM+RAG,所以想尝试跑通一个案例。
from history_rag.
api_base
我就在这里申请的key: https://platform.openai.com/api-keys 上述程序,换为 3.5 ,参考这里:https://blog.csdn.net/laoyang360/article/details/135579132 单独运行程序,还是报错openai.APIConnectionError: Connection error. 和下午调试 RAGDemo 问答,最后报错 一样的
这个的原因应该是python程序不能直接用电脑的vpn代理,所以你可能要用一个中转的api,你可以上网查找阿里云或者腾讯云反向代理openai api的教程或者换用一个中转api提供商
from history_rag.
api_base
我就在这里申请的key: https://platform.openai.com/api-keys 上述程序,换为 3.5 ,参考这里:https://blog.csdn.net/laoyang360/article/details/135579132 单独运行程序,还是报错openai.APIConnectionError: Connection error. 和下午调试 RAGDemo 问答,最后报错 一样的
这个的原因应该是python程序不能直接用电脑的vpn代理,所以你可能要用一个中转的api,你可以上网查找阿里云或者腾讯云反向代理openai api的教程或者换用一个中转api提供商
感谢前辈指点!我回来再试试。
from history_rag.
Related Issues (20)
- 怎么配合ollma 使用? HOT 3
- ImportError:cannot import name 'ServiceContext' from 'llama_index.core' HOT 9
- 运行时提示ImportError: ('Cannot import sentence-transformers or torch package,', 'please `pip install torch sentence-transformers`') HOT 23
- RuntimeError: {'code': 90019, 'message': 'Pipeline server error: call server failed, msg=internal error'} HOT 1
- 下载本地模型后依旧报错Connection error. OSError: [Errno 101] Network is unreachable HOT 5
- 我项目运行起来,在提问的阶段,提问后报错。 HOT 1
- 想知道怎么转换txt到json HOT 2
- built文件后报错,不知晓原因,求教 HOT 9
- 文档分个模块和向量化 HOT 8
- Error Code 429 HOT 2
- 知识库构建索引出错 HOT 1
- 输入ask后报错 HOT 2
- 提问之后的api接口调用错误 HOT 1
- 关于非历史文本的输入 HOT 4
- 把模型换成gpt-3.5-turbo了,但是回答准确率比较低。 HOT 1
- Exception has occurred: MilvusException <MilvusException: (code=2, message=Fail connecting to server on localhost:19530, illegal connection params or server unavailable)> HOT 14
- [bug]关于比较大的文本输入构建索引失败 HOT 1
- milvus standalone时不时崩溃 HOT 4
- pipeline方案报错 zilliz pipeline 连接异常 {"code":80001 HOT 1
- 在进入ask模式时出错 HOT 4
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.
from history_rag.