File tree Expand file tree Collapse file tree 4 files changed +0
-32
lines changed Expand file tree Collapse file tree 4 files changed +0
-32
lines changed Original file line number Diff line number Diff line change 3
3
from .config import DBConfig
4
4
from .logger import logger
5
5
6
- from dotenv import load_dotenv
7
-
8
6
from .base_connector import BaseConnector
9
7
10
8
from .clickhouse_connector import ClickHouseConnector
18
16
19
17
env_path = os .path .join (os .getcwd (), ".env" )
20
18
21
- if os .path .exists (env_path ):
22
- load_dotenv (env_path , override = True )
23
- print (f"✅ 환경변수 파일(.env)이 { os .getcwd ()} 에 로드되었습니다!" )
24
- else :
25
- print (f"⚠️ 환경변수 파일(.env)이 { os .getcwd ()} 에 없습니다!" )
26
-
27
19
28
20
def get_db_connector (db_type : Optional [str ] = None , config : Optional [DBConfig ] = None ):
29
21
"""
Original file line number Diff line number Diff line change 8
8
9
9
from .llm_factory import get_llm
10
10
11
- from dotenv import load_dotenv
12
11
from prompt .template_loader import get_prompt_template
13
12
14
13
15
- env_path = os .path .join (os .getcwd (), ".env" )
16
-
17
- if os .path .exists (env_path ):
18
- load_dotenv (env_path )
19
- else :
20
- print (f"⚠️ 환경변수 파일(.env)이 { os .getcwd ()} 에 없습니다!" )
21
-
22
14
llm = get_llm ()
23
15
24
16
Original file line number Diff line number Diff line change 1
1
import re
2
- from llm_utils import llm_factory
3
- from dotenv import load_dotenv
4
- from langchain .chains .llm import LLMChain
5
2
from langchain_openai import ChatOpenAI
6
- from langchain_core .prompts import PromptTemplate
7
3
from langchain_core .messages import HumanMessage , SystemMessage
8
4
import pandas as pd
9
5
import os
13
9
import plotly .graph_objects as go
14
10
15
11
16
- # .env 파일 로딩
17
- load_dotenv ()
18
-
19
-
20
12
class DisplayChart :
21
13
"""
22
14
SQL쿼리가 실행된 결과를 그래프로 시각화하는 Class입니다.
Original file line number Diff line number Diff line change 18
18
OpenAIEmbeddings ,
19
19
)
20
20
21
- env_path = os .path .join (os .getcwd (), ".env" )
22
-
23
- if os .path .exists (env_path ):
24
- load_dotenv (env_path , override = True )
25
- print (f"✅ 환경변수 파일(.env)이 { os .getcwd ()} 에 로드되었습니다!" )
26
- else :
27
- print (f"⚠️ 환경변수 파일(.env)이 { os .getcwd ()} 에 없습니다!" )
28
-
29
21
30
22
def get_llm (** kwargs ) -> BaseLanguageModel :
31
23
"""
You can’t perform that action at this time.
0 commit comments