GoogleVertexAISearch를 활용해보려는데 자꾸 에러가 나요 ㅠㅠ 잘 아시는분 계실까요 ㅠㅠ (Retriever 사용)
2024.03.11
Langchain을 활용하여 혼자 이것저것 만들어보며 공부중인데요
OpenAI 언어모델과 retriever 사용을 주로 하다가
다양한 언어모델을 활용해보고자 요즘 Google 서비스를 사용해보려고 하고있어요 !
우선 langchain에서 아래 코드를 실행하려는데
자꾸 에러가나요 ㅠㅠ
from langchain_community.retrievers import GoogleVertexAISearchRetriever,
PROJECT_ID = "<YOUR PROJECT ID>" # Set to your Project ID
LOCATION_ID = "<YOUR LOCATION>" # Set to your data store location
DATA_STORE_ID = "<YOUR DATA STORE ID>" # Set to your data store ID
retriever = GoogleVertexAISearchRetriever(
project_id=PROJECT_ID,
location_id=LOCATION_ID,
data_store_id=DATA_STORE_ID,
max_documents=3,
)
여기서 문제가 Project_ID, location_id, data_store_id 가 어디서 확인이 가능한지
명확하게 어떤 ID인지 공식문서를 다뒤져도 안나오네요 ㅠㅠ
GCP(Google Cloud Platform)에서 프로젝트 생성해서 Project ID 가 나오긴 했는데,
location_id와 data-store_id가 무엇인지 아시는분 계신가요..?ㅠㅠ
data-store_id는 Cloud Storage 버킷 이름을 넣어두긴 했습니다
그런데 자꾸 아래 에러코드가 나오네요
NotFound: 404 Customer with location us and project number 475######## not found.
제 Project Number가 위에 47#####가 맞는 number인데도 왜 자꾸 못찾는걸까요 흑흑
우선 제가 참고한 langchain 공식문서 링크도 같이 공유합니다

해당 모듈을 사용해보진 않았지만 도큐먼트 상으로 이해한 바로는
location_id - 데이터 저장소의 위치입니다. → 여기서 위치란 진짜 서버의 물리적 위치인듯합니다. 아마도 구글 클라우드서버에서 접속하는 데이터 센터의 위치인듯한데 이 와 관련된 설정이 구글 클라우드에 있을겁니다. (참고 : Get started with generic search | Vertex AI Search and Conversation | Google Cloud)
data_store_id - 사용할 데이터 저장소의 ID입니다 아마 로케이션이 맞지않아서 이것도 못찾게 된것으로 보입니다.