创建collection时报错
NameError: name 'deepseek' is not defined
Traceback:
File "C:\Users\13793.conda\envs\LLM\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 565, in _run_script
exec(code, module.dict)
File "D:\BYSJ\RAG-QA-Generator\Code\AutoQAG.py", line 487, in
embedding_model_id为嵌入模型的id(非生成的大模型),用于将文本向量化并存储到taskingai向量数据库的模型。前置条件是安装好taskingai rag数据库,分别配置好嵌入模型和生成大模型,填入对应的信息即可。
也是创建新Collection失败,AutoQAG.py里我的配置如下:
# 配置(请在使用时替换为实际的URL和API密钥)
api_key = '*****'
base_url = 'https://oapi.tasking.ai/v1'
#base_url = 'http://localhost:8080/v1'
headers = {"Authorization": f"Bearer {api_key}"}
# OpenAI客户端配置(请在使用时替换为实际的API密钥和URL)
client = OpenAI(
api_key="*****",
base_url="https://dashscope.aliyuncs.com/compatible-mode/v1",
)
看了官方文档没懂base_url到底是用https://oapi.tasking.ai/v1 还是http://localhost:8080/v1 二者都可以上传文件并且生成qa对,但网页上的qa对结果显示不完全,且也有报错:(不确定是不是因为前面url问题没解决)
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
exec(code, module.__dict__)
File "/mnt/RAG-QA-Generator-master/Code/AutoQAG.py", line 488, in <module>
main()
File "/mnt/RAG-QA-Generator-master/Code/AutoQAG.py", line 412, in main
st.markdown(qa['chunk'])
~~^^^^^^^^^
KeyError: 'chunk'
base_url = 'https://oapi.tasking.ai/v1'的报错:
API请求失败: 404 Client Error: Not Found for url: https://oapi.tasking.ai/v1collections
base_url = 'http://localhost:8080/v1'的报错:
API请求失败: HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /v1collections (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f3c7042e290>: Failed to establish a new connection: [Errno 111] Connection refused'))
官方论坛有个帖子是类似的404错误:https://forum.tasking.ai/t/404-error-when-using-oapi-tasking-ai/104/2 但并不能解决这个问题。
也是创建新Collection失败,AutoQAG.py里我的配置如下:
# 配置(请在使用时替换为实际的URL和API密钥) api_key = '*****' base_url = 'https://oapi.tasking.ai/v1' #base_url = 'http://localhost:8080/v1' headers = {"Authorization": f"Bearer {api_key}"} # OpenAI客户端配置(请在使用时替换为实际的API密钥和URL) client = OpenAI( api_key="*****", base_url="https://dashscope.aliyuncs.com/compatible-mode/v1", )看了官方文档没懂base_url到底是用https://oapi.tasking.ai/v1 还是http://localhost:8080/v1 二者都可以上传文件并且生成qa对,但网页上的qa对结果显示不完全,且也有报错:(不确定是不是因为前面url问题没解决)
Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script exec(code, module.__dict__) File "/mnt/RAG-QA-Generator-master/Code/AutoQAG.py", line 488, in <module> main() File "/mnt/RAG-QA-Generator-master/Code/AutoQAG.py", line 412, in main st.markdown(qa['chunk']) ~~^^^^^^^^^ KeyError: 'chunk'base_url = 'https://oapi.tasking.ai/v1'的报错:
API请求失败: 404 Client Error: Not Found for url: https://oapi.tasking.ai/v1collectionsbase_url = 'http://localhost:8080/v1'的报错:
API请求失败: HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /v1collections (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f3c7042e290>: Failed to establish a new connection: [Errno 111] Connection refused'))官方论坛有个帖子是类似的404错误:https://forum.tasking.ai/t/404-error-when-using-oapi-tasking-ai/104/2 但并不能解决这个问题。
请问qa对结果显示不全解决了吗?我也是这个问题
请问qa对结果显示不全解决了吗?我也是这个问题
没有诶 (TヘTo)
QA对结果生成默认
请问qa对结果显示不全解决了吗?我也是这个问题
没有诶 (TヘTo)
QA对默认只显示前3条,可更改下述参数以满足需求:
if st.session_state.qa_pairs: st.subheader("前3个QA对预览") cols = st.columns(3) for i, qa in enumerate(st.session_state.qa_pairs[:3]): with st.expander(f"QA对 {i + 1}", expanded=True): st.markdown("问题:") st.markdown(qa['question']) st.markdown("答案:") st.markdown(qa['answer']) st.markdown("原文:") st.markdown(qa['chunk']) st.markdown("---")
QA对结果生成默认
请问qa对结果显示不全解决了吗?我也是这个问题
没有诶 (TヘTo)
QA对默认只显示前3条,可更改下述参数以满足需求:
if st.session_state.qa_pairs: st.subheader("前3个QA对预览") cols = st.columns(3) for i, qa in enumerate(st.session_state.qa_pairs[:3]): with st.expander(f"QA对 {i + 1}", expanded=True): st.markdown("问题:") st.markdown(qa['question']) st.markdown("答案:") st.markdown(qa['answer']) st.markdown("原文:") st.markdown(qa['chunk']) st.markdown("---")
大神,我之前的表述有问题,运行结果是只生成了1个QA对,而且会报错
KeyError: 'chunk'
Traceback:
File "D:\Anaconda\envs\forRAG\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 565, in _run_script
exec(code, module.dict)
File "D:\PythonProject\RAG-QA-Generator-master\RAG-QA-Generator\Code\AutoQAG.py", line 487, in
embedding_model_id为嵌入模型的id(非生成的大模型),用于将文本向量化并存储到taskingai向量数据库的模型。前置条件是安装好taskingai rag数据库,分别配置好嵌入模型和生成大模型,填入对应的信息即可。
请问这个安装tasking AI数据库是指4.2里的安装配置Tasking AI系统吗?这一步骤不在md文件里面吗?