import os
from langchain_openai import AzureOpenAIEmbeddings
from dotenv import load_dotenv
# .env 파일 로드
load_dotenv()
# 환경 변수에서 임베딩 설정 정보 가져오기
AZURE_OPENAI_EMBEDDING_ENDPOINT = os.getenv("AZURE_OPENAI_EMBEDDING_ENDPOINT", "
https://f.openai.azure.com")
AZURE_OPENAI_EMBEDDING_API_KEY = os.getenv("AZURE_OPENAI_EMBEDDING_API_KEY", "key")
AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME = os.getenv("AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME", "text-embedding-3-large")
AZURE_SEARCH_ENDPOINT = os.getenv("AZURE_SEARCH_ENDPOINT", "
https://dev.search.windows.net")
AZURE_SEARCH_KEY = os.getenv("AZURE_SEARCH_KEY", "jkC7st3IWXDA6CfTxsPIlxoSv0LPGyHKkAFz9bRBdOAzSeDRjn9v")
AZURE_SEARCH_KEY = "kkey"
AZURE_SEARCH_INDEX_NAME = os.getenv("AZURE_SEARCH_INDEX_NAME", "idx-test")
embedder = AzureOpenAIEmbeddings(azure_endpoint=AZURE_OPENAI_EMBEDDING_ENDPOINT, api_key= AZURE_OPENAI_EMBEDDING_API_KEY, deployment=AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME)
vector = embedder.embed_query("안녕하세요")
print(f"{AZURE_SEARCH_ENDPOINT}_{AZURE_SEARCH_KEY}_{AZURE_SEARCH_INDEX_NAME}_")
print(f"[vector]:{vector}")"