Skip to content

Commit 472c892

Browse files
Merge pull request #191 from CausalInferenceLab/190-move-llm-utils-to-utils
2 parents d248a92 + 7dd60a0 commit 472c892

28 files changed

+81
-100
lines changed

engine/query_executor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
"""
77

88
import logging
9-
from typing import Dict, Any, Optional, Union
9+
from typing import Any, Dict, Optional, Union
1010

1111
from langchain_core.messages import HumanMessage
1212

13-
from llm_utils.graph_utils.enriched_graph import builder as enriched_builder
14-
from llm_utils.graph_utils.basic_graph import builder as basic_builder
15-
from llm_utils.llm_response_parser import LLMResponseParser
13+
from utils.llm.graph_utils.basic_graph import builder as basic_builder
14+
from utils.llm.graph_utils.enriched_graph import builder as enriched_builder
15+
from utils.llm.llm_response_parser import LLMResponseParser
1616

1717
logger = logging.getLogger(__name__)
1818

interface/app_pages/graph_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import streamlit as st
1414
from langgraph.graph import END, StateGraph
1515

16-
from llm_utils.graph_utils.base import (
16+
from utils.llm.graph_utils.base import (
1717
CONTEXT_ENRICHMENT,
1818
GET_TABLE_INFO,
1919
PROFILE_EXTRACTION,

interface/core/config/settings.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,18 @@
33
"""
44

55
import os
6-
from typing import Any, Dict, Optional
76
from pathlib import Path
7+
from typing import Any, Dict, Optional
88

99
try:
1010
import streamlit as st # type: ignore
1111
except Exception: # pragma: no cover - streamlit may not be present in non-UI contexts
1212
st = None # type: ignore
1313

14-
from llm_utils.tools import set_gms_server
14+
from utils.llm.tools import set_gms_server
1515

1616
from .models import Config
1717

18-
1918
DEFAULT_DATAHUB_SERVER = "http://localhost:8080"
2019
DEFAULT_VECTORDB_TYPE = os.getenv("VECTORDB_TYPE", "faiss").lower()
2120
DEFAULT_VECTORDB_LOCATION = os.getenv("VECTORDB_LOCATION", "")
@@ -202,7 +201,7 @@ def update_llm_settings(*, provider: str, values: dict[str, str | None]) -> None
202201
"""Update chat LLM settings from UI into process env and session.
203202
204203
This function mirrors the environment-variable based configuration consumed by
205-
llm_utils.llm.factory.get_llm(). Only sets provided keys; missing values are left as-is.
204+
utils.llm.core.factory.get_llm(). Only sets provided keys; missing values are left as-is.
206205
"""
207206
provider_norm = (provider or "").lower()
208207
if provider_norm not in {
@@ -229,7 +228,7 @@ def update_llm_settings(*, provider: str, values: dict[str, str | None]) -> None
229228
def update_embedding_settings(*, provider: str, values: dict[str, str | None]) -> None:
230229
"""Update Embeddings settings from UI into process env and session.
231230
232-
Mirrors env vars consumed by llm_utils.llm.factory.get_embeddings().
231+
Mirrors env vars consumed by utils.llm.core.factory.get_embeddings().
233232
"""
234233
provider_norm = (provider or "").lower()
235234
if provider_norm not in {

interface/core/result_renderer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
from langchain_core.messages import AIMessage
1212

1313
from infra.observability.token_usage import TokenUtils
14-
from llm_utils.llm_response_parser import LLMResponseParser
1514
from utils.databases import DatabaseFactory
15+
from utils.llm.llm_response_parser import LLMResponseParser
1616
from viz.display_chart import DisplayChart
1717

1818

interface/core/session_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ def init_graph(use_enriched: bool) -> str:
2424
"""
2525

2626
builder_module = (
27-
"llm_utils.graph_utils.enriched_graph"
27+
"utils.llm.graph_utils.enriched_graph"
2828
if use_enriched
29-
else "llm_utils.graph_utils.basic_graph"
29+
else "utils.llm.graph_utils.basic_graph"
3030
)
3131

3232
builder = __import__(builder_module, fromlist=["builder"]).builder

llm_utils/__init__.py

Whitespace-only changes.

llm_utils/output_parser/__init__.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ include = [
6868
packages = [
6969
"cli",
7070
"interface",
71-
"llm_utils",
7271
"engine",
7372
"infra",
7473
"viz",

test/test_llm_utils/test_llm_response_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import unittest
1111

12-
from llm_utils.llm_response_parser import LLMResponseParser
12+
from utils.llm.llm_response_parser import LLMResponseParser
1313

1414

1515
class TestLLMResponseParser(unittest.TestCase):

llm_utils/README.md renamed to utils/llm/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## llm_utils 개요
1+
## utils.llm 개요
22

33
Lang2SQL 파이프라인에서 LLM, 검색(RAG), 그래프 워크플로우, DB 실행, 시각화 등 보조 유틸리티를 모아둔 패키지입니다. 이 문서는 depth(계층)별로 기능과 통합 흐름을 정리합니다.
44

0 commit comments

Comments
 (0)