묻고 답해요
131만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결초보자를 위한 ChatGPT API 활용법 - API 기본 문법부터 12가지 프로그램 제작 배포까지
배포 사이트 api 키 입력
배포할때 항상 api 키를 사이트에서 번거롭게 입력하지 않고자동으로 쿠키나 이런거로 자동완성되거나 키를 입력하지 않는 방법은 없을까요?
-
해결됨2024년 가장 최신의 ChatGPT 마스터 클래스
전자책 URL 주소를 알고 싶습니다.
전자책 URL 주소를 알고 싶습니다.
-
미해결하루만에 배우는 ChatGPT API
CORS 오류
공유해주신 링크 접속 후 파인튜닝 실행시 아래와 같이 CORS 오류가 발생합니다.어떻게 테스트해보면 될까요?
-
미해결초보자를 위한 ChatGPT API 활용법 - API 기본 문법부터 12가지 프로그램 제작 배포까지
결과값 출력이 한줄로 통으로 나와요.
json 데이터 확인하는 강의에서 print(response) 입력후 선생님처럼 정리되서 안나오고 결과값이 한줄 통으로 나오는데요... 가독성이 떨어져서.. 설정이 따로 있는걸까요?
-
미해결React + GPT API로 AI회고록 서비스 개발 (원데이 클래스)
프롬프트 내용은 어디서 볼수있나요?
안녕하세요 강사님 강의 정말 잘 듣고있습니다.다름이 아니라 프롬프트의 내용이 꽤 긴데 혹시 복붙할 수 있는 페이지는 따로 없는지 궁금합니다..! 제가 못찾은것일수도 있어서 조심스럽게 문의드립니다
-
미해결초보자를 위한 ChatGPT API 활용법 - API 기본 문법부터 12가지 프로그램 제작 배포까지
키 등록했는하고 카드 등록했는데 429오류가 발생합니다.
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'}}첫번째 계정으로 카드 등록하고 11달러 결제 했는데 위 오류가 발생합니다.혹시 몰라 새로 구글 계정을 만들었는데도 동일한 오류가 발생합니다.
-
해결됨원고 생성기 프로그램 개발 강의 (Chatgpt api)
처음부터 진행이 안되어 멈춰버렸네요.
안녕하세요. 항상 잘 보고 있습니다. 감사합니다.ChatGPT API Key 발급받고 python 예제 복사해서 실행 여부 확인하고 있는데처음부터 에러가 발생하는데 당췌 알 수가 없습니다.어떻게 해결해야 할지 조언 부탁드립니다.막혀서 진행을 하지 못하고 있습니다.completion = openai.ChatCompletion.create(^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File "Q:\ChatGPT_원고자동생성기\venv\Lib\site-packages\openai\lib\_old_api.py", line 39, in __call__raise APIRemovedInV1(symbol=self._symbol)openai.lib._old_api.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 참고로 사용하고 있는 파이썬 버전(3.11.5)과 openai 버전(1.14.3버전입니다.코드를 수정해야 할 듯한데ChatGPT에 질문을 해도 해결이 안됩니다.해결하신 분 있으시면 답변 부탁드릴께요~
-
해결됨ChatGPT API 입문 강의 - 30분 만에 다국어 번역기 웹 풀스택 개발하기
ChatGPT 프롬프트? 설정관련
강의 감사합니다, 신현님추가로 더 궁금한 점이 있는데ChatGPT API를 사용해서 웹에서 스무고개 게임을 하는 지피티를 만들고 싶은데 어떤 말투나(친구처럼 친근하게), 20회 답변 제한 등의 조건들을 구현할 수 있을까요?
-
해결됨ChatGPT API 입문 강의 - 30분 만에 다국어 번역기 웹 풀스택 개발하기
gpt api를 파이썬에서만 사용할 수 있나요?
안녕하세요, 강의 실습을 python으로 진행하셨는데만약 웹 사이트 백엔드 개발을 java spring boot를 사용한다면 gpt api를 강의처럼 사용할 수 있을까요?
-
미해결모두를 위한 대규모 언어 모델 LLM(Large Language Model) Part 2 - 랭체인(LangChain)으로 나만의 ChatGPT 만들기
Rag 사용시 전혀 관계없는 데이터를 가져오는 이슈
안녕하세요 rag를 공부하고 실제로 테스트를 하기위해서open ai를 사용하여 서비스 이름과 서비스 담당자 관련한 정보가 존재하는 csv 데이터를 아래처럼 임베딩 한 뒤 index_name = "manager" # CSV 파일 로딩 loader = CSVLoader(file_path="manager.csv", encoding="utf-8") docs = loader.load() # text_splitter = RecursiveCharacterTextSplitter(chunk_size=100, chunk_overlap=0) # docs = text_splitter.split_documents(documents) embedding_model= OpenAIEmbeddings(openai_api_key=OPENAI_KEY) vectorstore = ElasticsearchStore( embedding=embedding_model, index_name=index_name, es_url=es_url ) vectorstore.add_documents(docs) 데이터는 아래 형태로 embedding 하여 text에 들어가 있습니다.이름: (서비스 이름)메인 담당자:개발 담당자: 정(XXX) 부(XXX, XXX, XXX, XXX)SE 담당자: 정(YYY3) 부(ZZZ)DBA 담당자:아래처럼 프롬프트를 작성하고 rag를 사용하여 relevant_document를 통하여 확인하면,실제로 text에 들어가있는 데이터를 안가져오고 엉뚱한 데이터를 가져오거나실제로 관련 담당자가 text에 포함되는 데이터가 여러개가 실제로 존재하더라도 한 개만 가져오고 나머지는 엉뚱한 document만 가져오는 경우가 많은 것 같습니다.rag_prompt = """ You are an expert AI on a question and answer task. Use the "Following Context" when answering the question. If you don't know the answer, reply to the "Following Text" in the header and answer to the best of your knowledge, or if you do know the answer, answer without the "Following Text". If a question is asked in Korean, translate it to English and always answer in Korean. Following Text: "주어진 정보에서 답변을 찾지는 못했지만, 제가 아는 선에서 답을 말씀드려볼게요! **틀릴 수도 있으니 교차검증은 필수입니다!**" Following Context: {context} Question: {question} Helpful Answer:""" prompt = ChatPromptTemplate(input_variables=['context', 'question'], messages=[HumanMessagePromptTemplate(prompt=PromptTemplate( input_variables=['context', 'question'], template= rag_prompt)) ]) # LLM from langchain.chains import RetrievalQA from langchain.chat_models import ChatOpenAI llm = ChatOpenAI(model_name="gpt-3.5-turbo-0125", temperature=0, openai_api_key=OPENAI_KEY) retriever = vectorstore.as_retriever( search_type="similarity", return_source_documents=True ) resp = retriever.get_relevant_documents("XXX가 담당하는 서비스 알려줘") print(resp)혹시나 엉뚱한 document를 안가져오고 해당되는 값이 포함되는 document만 가지고 올 수 있도록 할 수 있는지 여쭤봅니다! 정리하자면 1:n으로 연관되어있는 내용에서 1에 대한 정보를 물어보면 내용을 잘가져오는 것 같은데 n에 대한 질문을 하면 정보를 전혀 못가져 오는 것 같은데 이를 해결하는 방법론이 있을지 여쭤봅니다!
-
미해결워드프레스 자동 포스팅 프로그램 개발 강의 (ChatGPT API)
업로드가 되지 않습니다.
안녕하세요, 수강중인 학생입니다. 3.upload.py 부터 코드가 제대로 동작하지 않습니다. raise RemoteDisconnected("Remote end closed connection without"http.client.RemoteDisconnected: Remote end closed connection without response 이런 내용으로 인해 글이 올라가지 않는데 원인이 무엇일까요?
-
미해결초보자를 위한 ChatGPT API 활용법 - API 기본 문법부터 12가지 프로그램 제작 배포까지
ch09의 '01_yt_extract_summerize_exp.ipynb' 실습중 에러
안녕하세요 ch09의 '01_yt_extract_summerize_exp.ipynb' 실습중에 마지막 'googletrans' 설치 및 실행시 오류가 발생합니다. openai 랑 googletrans 에서 사용하는 라이브러리가 충돌나는거 같은데 해결방법 있을까요? googletrans 설치시pip install googletrans==3.1.0a0 Collecting googletrans==3.1.0a0 Using cached googletrans-3.1.0a0-py3-none-any.whl Collecting httpx==0.13.3 (from googletrans==3.1.0a0) Using cached httpx-0.13.3-py3-none-any.whl.metadata (25 kB) Requirement already satisfied: certifi in e:\python\inflearn_chatgpt-main\ch09\ch09_env\lib\site-packages (from httpx==0.13.3->googletrans==3.1.0a0) (2024.2.2) Collecting hstspreload (from httpx==0.13.3->googletrans==3.1.0a0) Using cached hstspreload-2024.3.1-py3-none-any.whl.metadata (2.1 kB) Requirement already satisfied: sniffio in e:\python\inflearn_chatgpt-main\ch09\ch09_env\lib\site-packages (from httpx==0.13.3->googletrans==3.1.0a0) (1.3.1) Collecting chardet==3.* (from httpx==0.13.3->googletrans==3.1.0a0) Using cached chardet-3.0.4-py2.py3-none-any.whl.metadata (3.2 kB) Collecting idna==2.* (from httpx==0.13.3->googletrans==3.1.0a0) Using cached idna-2.10-py2.py3-none-any.whl.metadata (9.1 kB) Collecting rfc3986<2,>=1.3 (from httpx==0.13.3->googletrans==3.1.0a0) Using cached rfc3986-1.5.0-py2.py3-none-any.whl.metadata (6.5 kB) Collecting httpcore==0.9.* (from httpx==0.13.3->googletrans==3.1.0a0) Using cached httpcore-0.9.1-py3-none-any.whl.metadata (4.6 kB) Collecting h11<0.10,>=0.8 (from httpcore==0.9.*->httpx==0.13.3->googletrans==3.1.0a0) Using cached h11-0.9.0-py2.py3-none-any.whl.metadata (8.1 kB) Collecting h2==3.* (from httpcore==0.9.*->httpx==0.13.3->googletrans==3.1.0a0) Using cached h2-3.2.0-py2.py3-none-any.whl.metadata (32 kB) Collecting hyperframe<6,>=5.2.0 (from h2==3.*->httpcore==0.9.*->httpx==0.13.3->googletrans==3.1.0a0) Using cached hyperframe-5.2.0-py2.py3-none-any.whl.metadata (7.2 kB) Collecting hpack<4,>=3.0 (from h2==3.*->httpcore==0.9.*->httpx==0.13.3->googletrans==3.1.0a0) Using cached hpack-3.0.0-py2.py3-none-any.whl.metadata (7.0 kB) Using cached httpx-0.13.3-py3-none-any.whl (55 kB) Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB) Using cached httpcore-0.9.1-py3-none-any.whl (42 kB) Using cached idna-2.10-py2.py3-none-any.whl (58 kB) Using cached h2-3.2.0-py2.py3-none-any.whl (65 kB) Using cached rfc3986-1.5.0-py2.py3-none-any.whl (31 kB) Using cached hstspreload-2024.3.1-py3-none-any.whl (1.1 MB) Using cached h11-0.9.0-py2.py3-none-any.whl (53 kB) Using cached hpack-3.0.0-py2.py3-none-any.whl (38 kB) Using cached hyperframe-5.2.0-py2.py3-none-any.whl (12 kB) Installing collected packages: rfc3986, hyperframe, hpack, h11, chardet, idna, hstspreload, h2, httpcore, httpx, googletrans Attempting uninstall: h11 Found existing installation: h11 0.14.0 Uninstalling h11-0.14.0: Successfully uninstalled h11-0.14.0 Attempting uninstall: idna Found existing installation: idna 3.6 Uninstalling idna-3.6: Successfully uninstalled idna-3.6 Attempting uninstall: httpcore Found existing installation: httpcore 1.0.4 Uninstalling httpcore-1.0.4: Successfully uninstalled httpcore-1.0.4 Attempting uninstall: httpx Found existing installation: httpx 0.27.0 Uninstalling httpx-0.27.0: Successfully uninstalled httpx-0.27.0 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. openai 1.14.1 requires httpx<1,>=0.23.0, but you have httpx 0.13.3 which is incompatible. Successfully installed chardet-3.0.4 googletrans-3.1.0a0 h11-0.9.0 h2-3.2.0 hpack-3.0.0 hstspreload-2024.3.1 httpcore-0.9.1 httpx-0.13.3 hyperframe-5.2.0 idna-2.10 rfc3986-1.5.0 설치오류 무시하고 google_trans() 실행시--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Cell In[14], line 1 ----> 1 from googletrans import Translator 3 def google_trans(messages): 4 google = Translator() File e:\Python\inflearn_chatGPT-main\ch09\ch09_env\Lib\site-packages\googletrans\__init__.py:6 2 __all__ = 'Translator', 3 __version__ = '3.1.0-alpha' ----> 6 from googletrans.client import Translator 7 from googletrans.constants import LANGCODES, LANGUAGES # noqa File e:\Python\inflearn_chatGPT-main\ch09\ch09_env\Lib\site-packages\googletrans\client.py:27 22 from googletrans.models import Translated, Detected 24 EXCLUDES = ('en', 'ca', 'fr') ---> 27 class Translator: 28 """Google Translate ajax API implementation class 29 30 You have to create an instance of Translator to use this API (...) 52 :type raise_exception: boolean 53 """ 55 def __init__(self, service_urls=DEFAULT_CLIENT_SERVICE_URLS, user_agent=DEFAULT_USER_AGENT, 56 raise_exception=DEFAULT_RAISE_EXCEPTION, ... 59 http2=True): 61 self.client = httpx.Client(http2=http2) 62 if proxies is not None: # pragma: nocover AttributeError: module 'httpcore' has no attribute 'SyncHTTPTransport' Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...
-
미해결모두를 위한 대규모 언어 모델 LLM Part 3 - 구글 제미나이(Google Gemini) API, OpenAI API와 젬마(Gemma)로 AI 어플리케이션 만들기
강의 슬라이드 공유가 가능할까요?
LLM Part 1 과 Part 2 는 강의 슬라이드를 공유해 주셨는데 Part 3 는 강의 슬라이드가 없어서 문의드립니다.
-
미해결모두를 위한 대규모 언어 모델 LLM(Large Language Model) Part 2 - 랭체인(LangChain)으로 나만의 ChatGPT 만들기
bert vs gpt 의 혼란스러운 점
google 는 트랜스포머의 인코더 bert 모델로 채팅서비스를 만들고, openai 는 트랜스포머의 디코더 gpt 모델로 채팅서비스를 만들었다고 들었습니다. 그런데 내가 궁금한것은 bert 모델(판단모델)은 판단을 하는 역할을 하고, gpt 모델은 대화를 생성(생성모델)하는 모델인데, 두 모델중 하나만 가지고 어떻게 각각의 회사가 채팅서비스를 만들었나요?
-
미해결모두를 위한 대규모 언어 모델 LLM(Large Language Model) Part 1 - Llama 2 Fine-Tuning 해보기
Fine-tuning 모델 성능 지표
llama2 를 fine-tuning 했을때, 다른 모델들 처럼 f1 스코어나 혹은 다른 성능 지표를 이용해 성능을 정량화 할 수 있나요?어떤 방법이 있고 어떻게해야 fine-tuning 한 모델의 성능을 정량적으로 지표화 할 수 있을까요?
-
미해결ChatGPT 영어 상황극 채팅 서비스 만들기 (Feat. 파이썬/장고채널스)
5장에서 ASGI로 구동하기 중 daphne 적용 안됨
runserver 기본 설정을 WSGI에서 ASGI로 바꾸려고 강의 따라하는데, 오류가 나요 지금까지는 오류 없이 정상적으로 진행되었습니다
-
해결됨2시간으로 끝내는 프론트엔드 테스트 기본기
안녕하세요. 질문 있습니다.
섹션3 recoil을 테스트하는 방법 3:50에cy.url().should('include','/');를 통해서 root page로 잘 이동하는지 확인한다고 하신부분에서,'/'는 어떤 페이지에서든 include가 되어 테스트가 통과될것 같은데 혹시 rootpage를 검증하기위한 다른 방법은 없을까요?
-
해결됨업무자동화를 위한 chatGPT와 구글스프레드시트 활용 입문
api key 등록
openai playground 에 billing 정보 등록하고스프레드에 확장프로그램 설치를 했는데도 set api key 버튼이 나오지 않는데 어디서 잘못되었을까요 ?
-
미해결초보자를 위한 ChatGPT API 활용법 - API 기본 문법부터 12가지 프로그램 제작 배포까지
ch07 urllib error
mac에서의 문제인지 다른 문제인지 모르겠지만 실습 중 urllib 에러가 발생해서 다음과 같이 해결했습니다. 다른 분들에게 도움이 되었으면 좋겠네요.그리고 urllib만 import해오면 urlretrieve를 불러오지 못해서 urllib.request를 import했습니다. <에러 메시지>Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 1344, in do_open h.request(req.get_method(), req.selector, req.data, headers, File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1319, in request self._send_request(method, url, body, headers, encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1365, in sendrequest self.endheaders(body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1314, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1074, in sendoutput self.send(msg) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1018, in send self.connect() File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1460, in connect self.sock = self._context.wrap_socket(self.sock, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/ssl.py", line 455, in wrap_socket return self.sslsocket_class._create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/ssl.py", line 1046, in _create self.do_handshake() File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/ssl.py", line 1317, in do_handshake self._sslobj.do_handshake()ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)During handling of the above exception, another exception occurred:Traceback (most recent call last): File "/Users/adampark/Documents/personal/inflearn_chatGPT/ch08/01_dalle_exp_NewVersion.py", line 18, in <module> urllib.request.urlretrieve(image_url, "test.jpg") File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 240, in urlretrieve with contextlib.closing(urlopen(url, data)) as fp: ^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 215, in urlopen return opener.open(url, data, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 515, in open response = self._open(req, data) ^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 532, in _open result = self._call_chain(self.handle_open, protocol, protocol + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 492, in callchain result = func(*args) ^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 1392, in https_open return self.do_open(http.client.HTTPSConnection, req, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 1347, in do_open raise URLError(err)urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)> <해결>pip install certifiCERT_PATH=$(python -m certifi)export SSL_CERT_FILE=${CERT_PATH}export REQUESTS_CA_BUNDLE=${CERT_PATH}https://github.com/asdf-community/asdf-python/issues/106
-
미해결모두를 위한 대규모 언어 모델 LLM(Large Language Model) Part 2 - 랭체인(LangChain)으로 나만의 ChatGPT 만들기
chromadb 용량
chromadb에 데이터를 insert 하는데 용량이 object 하나당 2MB가 되는게 정상일까요?