모두를 위한 대규모 언어 모델 LLM(Large Language Model) Part 2 - 랭체인(LangChain)으로 나만의 ChatGPT 만들기
안녕하세요 SelfQueryRetriever를 이용하여 메타데이터별로 문제를 생성하는 코드를 작성 중에 궁금한 것이 생겨서 질문드립니다. 데이터별로 메타데이터에 카테고리를 저장해놓았는데 카테고리별로 llm을 돌릴때마다 각 카테고리 내에서 문서를 랜덤하게 가져올 수 있는 방법이 있을까요?? 카테고리를 잘 인식해서 가져오는데 llm을 돌릴때마다 같은 데이터를 벡터db에서 받아와 생성합니다.
VS 세팅에 문제가 있는제.. CMD 창에서 code . 해도 안열려요.. 어떻게 해야하나요? 1. 경로문제 환경설정변경에 path 에 들어가서 poetry 경로로 변경했지만 안됨 VS 를 재다운로드받아서 실행하면서 (path 변경) 했지만 안됨 관리자권한으로 경로를 지정해서 수동으로 했지만 안됨 VS 파일열기로 들어감 그렇게 해도 실행이 안됨... 왜 그렇죠?
초보자를 위한 ChatGPT API 활용법 - API 기본 문법부터 12가지 프로그램 제작 배포까지
response = openai.ChatCompletion.create( model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Tell me how to make a pizza"}]) --------------------------------------------------------------------------- APIRemovedInV1 Traceback (most recent call last) Cell In[16], line 1 ----> 1 response = openai.ChatCompletion.create( 2 model ="gpt-3.5-turbo", 3 messages =[{"role": "user", "content": "Tell me how to make a pizza"}]) File /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/openai/lib/_old_api.py:39 , in APIRemovedInV1Proxy.__call__ (self, args, * kwargs) 38 def call (self, args: Any, * kwargs: Any) -> Any: ---> 39 raise APIRemovedInV1(symbol=self._symbol) APIRemovedInV1 : You tried to access openai.ChatCompletion, but this is no longer supported in openai>=1.0.0 - see the README at https://github.com/openai/openai-python for the API. You can run openai migrate to automatically upgrade your codebase to use the 1.0.0 interface. Alternatively, you can pin your installation to the old version, e.g. pip install openai==0.28 A detailed migration guide is available here: https://github.com/openai/openai-python/discussions/742
안녕하세요. 1인 광고대행사를 운영하고 있습니다. 광고 이미지에 쓸 한국 여성 이미지를 만들려고 하는데요. 어떤 프롬프트를 넣든 전신 이미지는 나오지 않고 상반신 이미지만 만들어줍니다. 1) 어떤 프롬프트를 넣어야 전신샷을 만들어줄까요? 2) 상반신 이미지를 만들어줄 때 머리카락이나 어깨부분이 잘려서 나옵니다. 이 때도 어떤 프롬프트를 넣어야 여성 이미지가 신체 일부분이 잘리지 않고 이미지를 만들어줄까요?
안녕하세요. 강의 Gradio ChatInterface로 PDF 챗봇 애플리케이션 구현 (실습) 에서 additional inputs 에서 pdf 로딩하고, chunk size, chunk overlap, similarity metric, temperature 까지 해놓고 쿼리로 'what is the attention mechanism in transformers?' 라고 하니 대답으로 ' Error in loading PDF or creating vectorstore' 가 나옵니다. dependencies 는 아래와 같습니다. [tool.poetry.dependencies] python = "^3.12" chromadb = "^0.5.3" python-dotenv = "^1.0.1" langchain = "^0.2.5" langchain-openai = "^0.1.8" langchain-community = "^0.2.5" pypdf = "^4.2.0" gradio = "^4.36.1" gradio-pdf = "^0.0.11" langchain-text-splitters = "^0.2.1" 무엇이 문제일까용??
학습 관련 질문이 있으시면, 상세하게 남겨주세요.문제가 발생한 부분의 코드를 함께 올려주세요.수업 영상 몇 분/초 구간인지 알려주세요. 섹션1-3번째 강의 16분쯤에서 llm.invoke(prompt_text) 이 코드 작성부터 RateLimitError Traceback (most recent call last) Cell In[17], line 1 ----> 1 llm.invoke(prompt_text) File c:\Users\lhm22\AppData\Local\pypoetry\Cache\virtualenvs\qa-bot-nop3jHt_-py3.9\lib\site-packages\langchain_core\language_models\chat_models.py:170 , in BaseChatModel.invoke (self, input, config, stop, kwargs) 159 def invoke( 160 self, 161 input: LanguageModelInput, (...) 165 kwargs: Any, 166 ) -> BaseMessage: 167 config = ensure_config(config) 168 return cast( 169 ChatGeneration, --> 170 self.generate_prompt( 171 [self._convert_input(input)], 172 stop=stop, 173 callbacks=config.get("callbacks"), 174 tags=config.get("tags"), 175 metadata=config.get("metadata"), 176 run_name=config.get("run_name"), 177 run_id=config.pop("run_id", None), 178 **kwargs, 179 ).generations[0][0],... (...) 1027 stream_cls=stream_cls, 1028 ) RateLimitError : Error code: 429 - {'error': {'message': 'You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors .', 'type': 'insufficient_quota', 'param': None, 'code': 'insufficient_quota'}} Output is truncated. View as a scrollable element or open in a text editor . Adjust cell output settings ... 이런 에러가 발생하네요.. 혹시 어떻게 해결할 수 있을까요?
강의 1분쯤에 jest.config.cjs로 쓰는 것과 package.json에서 작성하는 법 2가지를 알려주셨을 때 전자대로 적용해 실행하니 아래와 같은 에러가 발생했습니다! 이후에 package.json에 작성해서 실행하는 방법으로 변경하니 정상적으로 작동했는데 혹시 이 원인을 알 수 있을까요? modules를 import하지 못한 이유를 잘 모르겠습니다!
구글링을 통해 pip upgrade, scipy==1.12.0 버전설치 vscode vswhere.exe 설치등을 해 보았는데 해결이 안되어 문의드립니다. (desktop_venv) D:\voicechat\DESKTOP>pip install scipy WARNING: Ignoring invalid distribution - (d:\voicechat\desktop\desktop_venv\lib\site-packages) WARNING: Ignoring invalid distribution -ip (d:\voicechat\desktop\desktop_venv\lib\site-packages) Collecting scipy Using cached scipy-1.13.1.tar.gz (57.2 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error × Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [21 lines of output] + meson setup C:\Users\joon\AppData\Local\Temp\pip-install-uhszo9tp\scipy_fd7942d271b54ed8b7897408b2e63822 C:\Users\joon\AppData\Local\Temp\pip-install-uhszo9tp\scipy_fd7942d271b54ed8b7897408b2e63822\.mesonpy-_ppx3dkm -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\joon\AppData\Local\Temp\pip-install-uhszo9tp\scipy_fd7942d271b54ed8b7897408b2e63822\.mesonpy-_ppx3dkm\meson-python-native-file.ini The Meson build system Version: 1.4.1 Source dir: C:\Users\joon\AppData\Local\Temp\pip-install-uhszo9tp\scipy_fd7942d271b54ed8b7897408b2e63822 Build dir: C:\Users\joon\AppData\Local\Temp\pip-install-uhszo9tp\scipy_fd7942d271b54ed8b7897408b2e63822\.mesonpy-_ppx3dkm Build type: native build Project name: scipy Project version: 1.13.1 WARNING: Failed to activate VS environment: Could not parse vswhere.exe output ..\meson.build:1:0: ERROR: Unknown compiler(s): [['icl'], ['cl'], ['cc'], ['gcc'], ['clang'], ['clang-cl'], ['pgcc']] The following exception(s) were encountered: Running icl "" gave "[WinError 2] 지정된 파일을 찾을 수 없습니다" Running cl /? gave "[WinError 2] 지정된 파일을 찾을 수 없습니다" Running cc --version gave "[WinError 2] 지정된 파일을 찾을 수 없습니다" Running gcc --version gave "[WinError 2] 지정된 파일을 찾을 수 없습니다" Running clang --version gave "[WinError 2] 지정된 파일을 찾을 수 없습니다" Running clang-cl /? gave "[WinError 2] 지정된 파일을 찾을 수 없습니다" Running pgcc --version gave "[WinError 2] 지정된 파일을 찾을 수 없습니다" A full log can be found at C:\Users\joon\AppData\Local\Temp\pip-install-uhszo9tp\scipy_fd7942d271b54ed8b7897408b2e63822\.mesonpy-_ppx3dkm\meson-logs\meson-log.txt [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details.
모두를 위한 대규모 언어 모델 LLM(Large Language Model) Part 1 - Llama 2 Fine-Tuning 해보기
안녕하세요 강의 내용을 기반으로 실습을 잘 진행 해보고 있습니다. 허깅페이스에서 하나의 모델을 다운받아 테스트를 해보려고 하는데, 모델명.gguf 파일로 되어있는 모델은 autotrain으로 파인튜닝이 잘 진행되지 않아 문의 드립니다. !autotrain llm --train \ --project-name "llama3-finetuning-da-8B-Q4" \ --model "path/llama-3-8B-gguf-Q4_K_M/llama-3-8B-Q4_K_M.gguf" \ --data-path "/path/train_data/korquad" \ --text-column "text" \ --peft \ --quantization "int4" \ --lr 2e-4 \ --batch-size 8 \ --epochs 40 \ --trainer sft \ --model_max_length 2048 답변 부탁드리겠습니다. 감사합니다.