Python
-
나의 TXT 데이터를 OpenAI를 이용하여 FastAPI로 서비스해보자!AI&ML 2023. 5. 3. 00:10
안녕하세요. LLM 모델인 chat gpt 를 활용해서 나만의 텍스트 데이터를 OpenAI를 연동해서 질문해 보는 서비스를 만들어 보겠습니다. 간단하게 파이썬을 이용해서 아래와 같은 순서로 작업합니다. 필요한 라이브러리를 설치해줍니다. openai 같은 LLM 모델들을 이용해서 애플리케이션을 개발하는데 유용한 Langchain 라이브러리를 이용합니다. from fastapi import FastAPI ,File, UploadFile , Request from pydantic import BaseModel from langchain.document_loaders import DirectoryLoader, TextLoader from langchain.text_splitter import CharacterT..
-
파이썬 에러 ERROR 해결 및 사용팁Python 2023. 4. 27. 21:48
1.VS코드에서 여러버전의 파이썬을 사용하고 있을때 버전 바꾸는 법 2.파이썬 설치시 Path는 아래에 체크박스를 선택해준다. 3.pip 으로 패키지 설치시 에러시 wheel setuptools pip 업그레이드 pip install wheel setuptools pip --upgrade 4.pip install dotenv 시 error 발생 pip install python-dotenv dotenv 이 아니고 python-dotenv 인데 10분째 삽질하다 찾아냄.ㅠ