Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ POSTGRES_PORT=5432
POSTGRES_DB=postgres
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
DB_SCHEMA=fa02_staging
# DB_SCHEMA=fa02_staging

KAFKA_NETWORK_NAME=fa-dae2-capstone_kafka_network

Expand Down Expand Up @@ -40,11 +40,11 @@ _AIRFLOW_WWW_USER_PASSWORD=airflow
# _PIP_ADDITIONAL_REQUIREMENTS=

# dbt Configuration (for Airflow)
DBT_PROJECT_DIR=/opt/airflow/dbt_project
DBT_PROFILES_DIR=/opt/airflow/dbt_project
# DBT_PROJECT_DIR=/opt/airflow/dbt_project
# DBT_PROFILES_DIR=/opt/airflow/dbt_project

# Langfuse Configuration (for LLM observability)
# Sign up at https://cloud.langfuse.com or self-host
LANGFUSE_PUBLIC_KEY=pk-lf-...
LANGFUSE_SECRET_KEY=sk-lf-...
LANGFUSE_HOST=https://cloud.langfuse.com
# LANGFUSE_HOST=https://cloud.langfuse.com
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,7 @@ airflow/**/__pycache__/

# SSH
.ssh/
.secret/
.secret/

notebook/eda_files/
notebook/eda.html
2 changes: 1 addition & 1 deletion chat_engine/agents/chart_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""

from typing import Literal
from langchain.schema import HumanMessage
from langchain_core.messages import HumanMessage
from langgraph.prebuilt import create_react_agent
from langgraph.types import Command
from langfuse import observe
Expand Down
2 changes: 1 addition & 1 deletion chat_engine/agents/cortex_analyst.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import os
from typing import Literal, Type
from dotenv import load_dotenv
from langchain.schema import HumanMessage
from langchain_core.messages import HumanMessage
from langgraph.prebuilt import create_react_agent
from langgraph.types import Command
from langfuse import observe
Expand Down
2 changes: 1 addition & 1 deletion chat_engine/agents/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import json
from typing import Literal, Any, Dict
from langchain.schema import HumanMessage
from langchain_core.messages import HumanMessage
from langgraph.types import Command
from langfuse import observe

Expand Down
2 changes: 1 addition & 1 deletion chat_engine/agents/planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import json
from typing import Literal, Any, Dict
from langchain.schema import HumanMessage
from langchain_core.messages import HumanMessage
from langgraph.types import Command
from langfuse import observe

Expand Down
2 changes: 1 addition & 1 deletion chat_engine/agents/researcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""

from typing import Literal
from langchain.schema import HumanMessage
from langchain_core.messages import HumanMessage
from langchain_tavily import TavilySearch
from langgraph.prebuilt import create_react_agent
from langgraph.types import Command
Expand Down
2 changes: 1 addition & 1 deletion chat_engine/agents/synthesizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""

from typing import Literal
from langchain.schema import HumanMessage
from langchain_core.messages import HumanMessage
from langgraph.graph import END
from langgraph.types import Command
from langfuse import observe
Expand Down
2 changes: 1 addition & 1 deletion chat_engine/chat_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from dotenv import load_dotenv

load_dotenv(override=True)
from langchain.schema import HumanMessage
from langchain_core.messages import HumanMessage
from langfuse import observe

from langgraph.graph import StateGraph, START
Expand Down
29 changes: 29 additions & 0 deletions chat_engine/chat_example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
from chat_engine.chat_engine import chat_engine


def main():
"""Main execution function with example queries."""
# query1 = "What is open stablecoin index?"
# print(f"Query: {query1}")
# chat_engine(query1)
# print("--------------------------------\n")

# query2 = "What are the top 3 minting addresses in fct_mint table?"
# print(f"Query: {query2}")
# chat_engine(query2)
# print("--------------------------------\n")

query3 = "Give me the chart of the top 3 minting addresses in the fct_mint table?"
# without saying fct_mint tracing: https://us.cloud.langfuse.com/project/cmkf6fdvf000rad07vt5hp9k0/traces/25a46aa42bf8dc0ff218ecdbc7eb4dcf?observation=8bcf14c9052b0daa&timestamp=2026-01-18T05:49:57.382Z
# final answer: I have been instructed to generate a chart using given data. Could you provide the minting data?

# with explicitly mentioning
# https://us.cloud.langfuse.com/project/cmkf6fdvf000rad07vt5hp9k0/traces?peek=0e635a5bef8004f14f20062df7212c29&timestamp=2026-01-18T05%3A54%3A00.793Z&observation=f8a1b0d333e8d659
print(f"Query: {query3}")
chat_engine(query3)
print("--------------------------------\n")


if __name__ == "__main__":
main()
# visualize_graph("chat_engine_graph.png")
2 changes: 1 addition & 1 deletion chat_engine/prompts.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import Dict, Any, List
from langchain.schema import HumanMessage # type: ignore[import-not-found]
from langchain_core.messages import HumanMessage # type: ignore[import-not-found]
import json
from typing import Optional
from langgraph.graph import MessagesState
Expand Down
33 changes: 0 additions & 33 deletions dbt_project/models/debug_conversion.sql

This file was deleted.

4,329 changes: 4,291 additions & 38 deletions notebook/eda.ipynb

Large diffs are not rendered by default.

13 changes: 12 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,21 @@ dependencies = [
"pyarrow>=21.0.0",
"python-dotenv>=1.0.0",
"requests>=2.32.0",
"rich>=14.1.0",
"rich>=13.6.0",
"snowflake-connector-python>=3.17.4",
"sqlalchemy>=2.0.43",
"langfuse>=2.59.5",
"langchain>=1.2.6",
"langchain-openai>=1.1.7",
"langchain-core>=1.2.7",
"langgraph>=1.0.7",
"langchain-tavily>=0.2.17",
"langchain-experimental>=0.4.1",
"qdrant-client>=1.16.2",
"psycopg>=3.3.2",
"matplotlib>=3.10.8",
"snowflake-core>=1.11.0",
"snowflake-snowpark-python>=1.44.0",
]

[project.scripts]
Expand Down
Loading
Loading