Conversation
… BaseComponent/BaseFlow
…t value pipeline - Remove RunComponent Protocol, _apply(), _run_steps() - SequentialFlow.run() now takes and returns Any (plain value pipe) - BaselineFlow demoted to deprecated alias with DeprecationWarning
…tr → list[CatalogEntry] API - run(run: RunContext) → run(query: str) -> list[CatalogEntry] - Re-export CatalogEntry from retrieval __init__
- Remove RunContext contract tests from test_core_base - Update SequentialFlow tests to new value-pipe signature - Add BaselineFlow deprecation warning assertion - Update KeywordRetriever tests to str → list[CatalogEntry]
- Replace run_query()/RunContext examples with SequentialFlow.run(value) - Mark RunContext as legacy utility in RunContext_ko.md
…) the abstract impl BaseComponent and BaseFlow now expose run() as the public API (with hook events), while _run() becomes the abstract method subclasses implement. __call__() is a convenience alias that delegates to run(). This fixes the design gap where direct .run() calls bypassed the hook system.
Implements run(query, schemas) -> str with BM25-retrieved schema context building, LLMPort.invoke() call, block extraction, and ComponentError on missing block.
Implements run(sql) -> list[dict] with empty-sql guard and DBPort.execute() delegation.
Orchestrates KeywordRetriever → SQLGenerator → SQLExecutor with shared hook injection.
…egrations AnthropicLLM: system message extraction, IntegrationMissingError on missing package. OpenAILLM: raw openai SDK (not langchain-openai). SQLAlchemyDB: SQLAlchemy 2.x text() wrapping and row._mapping conversion.
…roject.toml Exports CatalogEntry, LLMPort, DBPort, KeywordRetriever, SQLGenerator, SQLExecutor, BaselineNL2SQL, TraceHook, MemoryHook, NullHook, and exception classes. Adds [anthropic] and [sqlalchemy] optional dependency groups.
… pipeline FakeLLM and FakeDB defined inline (no external mock libraries). E2E test verifies 3 component start events via MemoryHook.
…ingError message Allow callers to pass an explicit API key to OpenAILLM and AnthropicLLM. Remove the optional-extra hint from IntegrationMissingError since both packages are now core dependencies.
…ncies Remove [project.optional-dependencies] section. Both packages are required for the e2e pipeline and should not be optional extras.
SQLGenerator now accepts db_dialect (sqlite, postgresql, mysql,
bigquery, duckdb) and loads the matching prompt from
components/generation/prompts/{dialect}.md. system_prompt takes
precedence when both are provided.
BaselineNL2SQL forwards db_dialect to SQLGenerator.
Covers: sqlite/postgresql prompt loading, unsupported dialect raises ValueError, system_prompt overrides db_dialect.
Creates customers/products/orders/order_items tables with Korean sample data for SQLite (default) and PostgreSQL. Fixes postgres default URL to match docker-compose-postgres.yml credentials (postgres:postgres).
Covers installation, API key setup, sample DB creation, SQLAlchemyDB connection, catalog definition, BaselineNL2SQL with db_dialect, Hook tracing, customization, error handling, and a full feature checklist runnable without real API keys using FakeLLM/FakeDB.
…rror message Add api_key: str | None = None to AnthropicLLM. Remove extra= from IntegrationMissingError since anthropic is now a core dependency.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#️⃣ Issue Number
📝 요약(Summary)
src/lang2sql/ 신규 모듈 코어를 설계하고 자연어 → SQL → 실행 결과까지 이어지는 e2e 파이프라인을
구현했습니다.
RunContext를 제거하고 "define-by-run" 철학(순수 Python 제어흐름)으로 전환했으며, LLM/DB 어댑터, DB
방언별 프롬프트, 샘플 DB 세팅 스크립트, 초보자용 튜토리얼까지 포함합니다.
💬 To Reviewers (선택)
_run()만 구현합니다. __call__은 run()으로 위임합니다.
확인 부탁드립니다.
PR Checklist
sql파싱, db_dialect별 프롬프트 로드75개 통과)