Open sangheonEN opened 2 weeks ago
안녕하세요..제가 요즘 업무가 바빠서 디버깅을 봐드릴 여유가 안되네요..죄송합니다
2024년 10월 21일 (월) 오후 7:19, Sang Heon LEE @.***>님이 작성:
라이언님! LLM RAG 적용하신 코드 보고 따라해보았는데, 실행에 오류가 있는건지, 왜 저는 TEXT를 입력하는 창이 안뜨는지 모르겠네요..
혹시 설치된 라이브러리 버전이 다른건지,, 뭐가 문제인건지 몰라서 한번 여쭤봅니다.
1.
RAG 구축 ( https://github.com/Nyan-SouthKorea/sLLM_int4_multi-turn_Ollama_Module?tab=readme-ov-file )
똑같이 코드를 작성했습니다. 2.
env pip list (첨부 my_rag_env.txt 참고) 3.
실행 내용
@.***:/home# cd /home ; /usr/bin/env /home/langchain_dir/langchain_rag_env/bin/python /root/.vscode-server/extensions/ms-python.debugpy-2024.12.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher 53511 -- /home/langchain_dir/langchain_test.py /home/langchain_dir/langchain_test.py:1: LangChainDeprecationWarning: Importing Chroma from langchain.vectorstores is deprecated. Please replace deprecated imports:
from langchain.vectorstores import Chroma
with new imports of:
from langchain_community.vectorstores import Chroma You can use the langchain cli to automatically upgrade many imports. Please see documentation here https://python.langchain.com/docs/versions/v0_2/ from langchain.vectorstores import Chroma /home/langchain_dir/langchain_test.py:3: LangChainDeprecationWarning: Importing TextLoader from langchain.document_loaders is deprecated. Please replace deprecated imports:
from langchain.document_loaders import TextLoader
with new imports of:
from langchain_community.document_loaders import TextLoader You can use the langchain cli to automatically upgrade many imports. Please see documentation here https://python.langchain.com/docs/versions/v0_2/ from langchain.document_loaders import TextLoader /home/langchain_dir/langchain_test.py:24: LangChainDeprecationWarning: The class HuggingFaceEmbeddings was deprecated in LangChain 0.2.2 and will be removed in 1.0. An updated version of the class exists in the :class:~langchain-huggingface package and should be used instead. To use it run pip install -U :class: ~langchain-huggingface and import as from :class:~langchain_huggingface import HuggingFaceEmbeddings. embeddings = SentenceTransformerEmbeddings(model_name="all-MiniLM-L6-v2") /home/langchain_dir/langchain_test.py:29: LangChainDeprecationWarning: The class
ChatOllama
was deprecated in LangChain 0.3.1 and will be removed in 1.0.0. An updated version of the class exists in the :class:~langchain-ollama package and should be used instead. To use it run
pip install -U :class:~langchain-ollama
and import asfrom :class:
~langchain_ollama import ChatOllama. llm = ChatOllama(model="llama3-ko", streaming=True) /home/langchain_dir/langchain_test.py:30: LangChainDeprecationWarning: This class is deprecated. See the following migration guides for replacements based on chain_type: stuff: https://python.langchain.com/docs/versions/migrating_chains/stuff_docs_chain map_reduce: https://python.langchain.com/docs/versions/migrating_chains/map_reduce_chain refine: https://python.langchain.com/docs/versions/migrating_chains/refine_chain map_rerank: https://python.langchain.com/docs/versions/migrating_chains/map_rerank_docs_chainSee also guides on retrieval and question-answering here: https://python.langchain.com/docs/how_to/#qa-with-rag qa_chain = load_qa_chain(llm, chain_type="stuff", verbose=False)
이렇게 출력된 후 종료됩니다.
- 첨부 my_rag_env.txt https://github.com/user-attachments/files/17459158/my_rag_env.txt
— Reply to this email directly, view it on GitHub https://github.com/Nyan-SouthKorea/sLLM_int4_multi-turn_Ollama_Module/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASNPGGWMATBYIUBAFHPF3VTZ4TILZAVCNFSM6AAAAABQJ2CBPSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGYYDEMBWGUZTGMQ . You are receiving this because you are subscribed to this thread.Message ID: @.*** com>
라이언님! LLM RAG 적용하신 코드 보고 따라해보았는데, 실행에 오류가 있는건지, 왜 저는 TEXT를 입력하는 창이 안뜨는지 모르겠네요..
혹시 설치된 라이브러리 버전이 다른건지,, 뭐가 문제인건지 몰라서 한번 여쭤봅니다.
RAG 구축 (https://github.com/Nyan-SouthKorea/sLLM_int4_multi-turn_Ollama_Module?tab=readme-ov-file)
env pip list (첨부 my_rag_env.txt 참고)
실행 내용
root@48df20a6bce3:/home# cd /home ; /usr/bin/env /home/langchain_dir/langchain_rag_env/bin/python /root/.vscode-server/extensions/ms-python.debugpy-2024.12.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher 53511 -- /home/langchain_dir/langchain_test.py /home/langchain_dir/langchain_test.py:1: LangChainDeprecationWarning: Importing Chroma from langchain.vectorstores is deprecated. Please replace deprecated imports:
with new imports of:
with new imports of:
See also guides on retrieval and question-answering here: https://python.langchain.com/docs/how_to/#qa-with-rag qa_chain = load_qa_chain(llm, chain_type="stuff", verbose=False)
이렇게 출력된 후 종료됩니다.
from langchain_community.vectorstores import Chroma from langchain.text_splitter import RecursiveCharacterTextSplitter from langchain_community.document_loaders import TextLoader from langchain_community.embeddings import SentenceTransformerEmbeddings from langchain.chains.question_answering import load_qa_chain from langchain_community.chat_models import ChatOllama
오류 구문 보고 이렇게 수정했는데도 안되네요.