Yoon-gu Hwang Claude commited on
Commit
2b02283
·
1 Parent(s): b5ddcd8

Add uv project configuration and fix dependencies

Browse files

- Add pyproject.toml for uv package management with all required dependencies
- Add .gitignore to exclude .env, __pycache__, and virtual environments
- Add python-dotenv for environment variable management
- Remove unused langchain_teddynote.messages import from app.py
- Load .env file automatically in graph.py for OPENAI_API_KEY

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

Files changed (4) hide show
  1. .gitignore +44 -0
  2. app.py +0 -1
  3. graph.py +4 -0
  4. pyproject.toml +24 -0
.gitignore ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Environment variables
2
+ .env
3
+
4
+ # Python
5
+ __pycache__/
6
+ *.py[cod]
7
+ *$py.class
8
+ *.so
9
+ .Python
10
+ build/
11
+ develop-eggs/
12
+ dist/
13
+ downloads/
14
+ eggs/
15
+ .eggs/
16
+ lib/
17
+ lib64/
18
+ parts/
19
+ sdist/
20
+ var/
21
+ wheels/
22
+ *.egg-info/
23
+ .installed.cfg
24
+ *.egg
25
+
26
+ # Virtual environments
27
+ .venv/
28
+ venv/
29
+ ENV/
30
+ env/
31
+
32
+ # uv
33
+ uv.lock
34
+
35
+ # IDEs
36
+ .vscode/
37
+ .idea/
38
+ *.swp
39
+ *.swo
40
+ *~
41
+
42
+ # OS
43
+ .DS_Store
44
+ Thumbs.db
app.py CHANGED
@@ -2,7 +2,6 @@ import gradio as gr
2
  import time
3
  from gradio import ChatMessage
4
  from langchain_core.runnables import RunnableConfig
5
- from langchain_teddynote.messages import random_uuid
6
  from langchain_core.messages import BaseMessage, HumanMessage
7
  from pprint import pprint
8
  from graph import app as workflow
 
2
  import time
3
  from gradio import ChatMessage
4
  from langchain_core.runnables import RunnableConfig
 
5
  from langchain_core.messages import BaseMessage, HumanMessage
6
  from pprint import pprint
7
  from graph import app as workflow
graph.py CHANGED
@@ -1,7 +1,11 @@
 
1
  from langchain_openai import ChatOpenAI
2
  from langgraph_supervisor import create_supervisor
3
  from langgraph.prebuilt import create_react_agent
4
 
 
 
 
5
  model = ChatOpenAI(model="gpt-4o")
6
 
7
  # Create specialized agents
 
1
+ from dotenv import load_dotenv
2
  from langchain_openai import ChatOpenAI
3
  from langgraph_supervisor import create_supervisor
4
  from langgraph.prebuilt import create_react_agent
5
 
6
+ # Load environment variables from .env file
7
+ load_dotenv()
8
+
9
  model = ChatOpenAI(model="gpt-4o")
10
 
11
  # Create specialized agents
pyproject.toml ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [project]
2
+ name = "langgraph-ui"
3
+ version = "0.1.0"
4
+ description = "LangGraph UI with Gradio interface"
5
+ readme = "README.md"
6
+ requires-python = ">=3.10"
7
+ dependencies = [
8
+ "langgraph",
9
+ "langchain-openai",
10
+ "langgraph-supervisor",
11
+ "langchain-teddynote",
12
+ "gradio>=5.41.0",
13
+ "python-dotenv",
14
+ ]
15
+
16
+ [build-system]
17
+ requires = ["hatchling"]
18
+ build-backend = "hatchling.build"
19
+
20
+ [tool.hatch.build.targets.wheel]
21
+ packages = ["."]
22
+
23
+ [tool.uv]
24
+ dev-dependencies = []