Aakash jammula commited on
Commit
be4737f
·
1 Parent(s): 99f9159

change app

Browse files
Files changed (6) hide show
  1. .gitignore +192 -0
  2. .python-version +1 -0
  3. app.py +4 -5
  4. pyproject.toml +18 -0
  5. requirements.txt +2 -1
  6. uv.lock +0 -0
.gitignore ADDED
@@ -0,0 +1,192 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # General
2
+ .DS_Store
3
+ .AppleDouble
4
+ .LSOverride
5
+
6
+ # Icon must end with two \r
7
+ Icon
8
+
9
+ #env
10
+ .env
11
+
12
+ # Thumbnails
13
+ ._*
14
+
15
+ # Files that might appear in the root of a volume
16
+ .DocumentRevisions-V100
17
+ .fseventsd
18
+ .Spotlight-V100
19
+ .TemporaryItems
20
+ .Trashes
21
+ .VolumeIcon.icns
22
+ .com.apple.timemachine.donotpresent
23
+
24
+ # Directories potentially created on remote AFP share
25
+ .AppleDB
26
+ .AppleDesktop
27
+ Network Trash Folder
28
+ Temporary Items
29
+ .apdisk
30
+
31
+ # Byte-compiled / optimized / DLL files
32
+ __pycache__/
33
+ *.py[cod]
34
+ *$py.class
35
+
36
+ # C extensions
37
+ *.so
38
+
39
+ # Distribution / packaging
40
+ .Python
41
+ build/
42
+ develop-eggs/
43
+ dist/
44
+ downloads/
45
+ eggs/
46
+ .eggs/
47
+ lib/
48
+ lib64/
49
+ parts/
50
+ sdist/
51
+ var/
52
+ wheels/
53
+ share/python-wheels/
54
+ *.egg-info/
55
+ .installed.cfg
56
+ *.egg
57
+ MANIFEST
58
+
59
+ # PyInstaller
60
+ # Usually these files are written by a python script from a template
61
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
62
+ *.manifest
63
+ *.spec
64
+
65
+ # Installer logs
66
+ pip-log.txt
67
+ pip-delete-this-directory.txt
68
+
69
+ # Unit test / coverage reports
70
+ htmlcov/
71
+ .tox/
72
+ .nox/
73
+ .coverage
74
+ .coverage.*
75
+ .*cache
76
+ nosetests.xml
77
+ coverage.xml
78
+ *.cover
79
+ *.py,cover
80
+ .hypothesis/
81
+ .pytest_cache/
82
+ cover/
83
+
84
+ # Translations
85
+ *.mo
86
+ *.pot
87
+
88
+ # Django stuff:
89
+ *.log
90
+ local_settings.py
91
+ db.sqlite3
92
+ db.sqlite3-journal
93
+
94
+ # Flask stuff:
95
+ instance/
96
+ .webassets-cache
97
+
98
+ # Scrapy stuff:
99
+ .scrapy
100
+
101
+ # Sphinx documentation
102
+ docs/_build/
103
+
104
+ # PyBuilder
105
+ .pybuilder/
106
+ target/
107
+
108
+ # Jupyter Notebook
109
+ .ipynb_checkpoints
110
+
111
+ # IPython
112
+ profile_default/
113
+ ipython_config.py
114
+
115
+ # pyenv
116
+ # For a library or package, you might want to ignore these files since the code is
117
+ # intended to run in multiple environments; otherwise, check them in:
118
+ # .python-version
119
+
120
+ # pipenv
121
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
122
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
123
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
124
+ # install all needed dependencies.
125
+ #Pipfile.lock
126
+
127
+ # poetry
128
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
129
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
130
+ # commonly ignored for libraries.
131
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
132
+ #poetry.lock
133
+
134
+ # pdm
135
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
136
+ #pdm.lock
137
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
138
+ # in version control.
139
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
140
+ .pdm.toml
141
+ .pdm-python
142
+ .pdm-build/
143
+
144
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
145
+ __pypackages__/
146
+
147
+ # Celery stuff
148
+ celerybeat-schedule
149
+ celerybeat.pid
150
+
151
+ # SageMath parsed files
152
+ *.sage.py
153
+
154
+ # Environments
155
+ .env
156
+ .venv
157
+ env/
158
+ venv/
159
+ ENV/
160
+ env.bak/
161
+ venv.bak/
162
+
163
+ # Spyder project settings
164
+ .spyderproject
165
+ .spyproject
166
+
167
+ # Rope project settings
168
+ .ropeproject
169
+
170
+ # mkdocs documentation
171
+ /site
172
+
173
+ # mypy
174
+ .mypy_cache/
175
+ .dmypy.json
176
+ dmypy.json
177
+
178
+ # Pyre type checker
179
+ .pyre/
180
+
181
+ # pytype static type analyzer
182
+ .pytype/
183
+
184
+ # Cython debug symbols
185
+ cython_debug/
186
+
187
+ # PyCharm
188
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
189
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
190
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
191
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
192
+ #.idea/
.python-version ADDED
@@ -0,0 +1 @@
 
 
1
+ 3.12
app.py CHANGED
@@ -12,14 +12,13 @@ from pydantic import BaseModel
12
  from langgraph.checkpoint.memory import MemorySaver
13
  import os
14
  from langchain_google_genai import ChatGoogleGenerativeAI
15
- GOOGLE_API_KEY = os.environ.get("GOOGLE_API_KEY")
16
- TAVILY_API_KEY = os.environ.get("TAVILY_API_KEY")
17
-
18
- llm = ChatGoogleGenerativeAI(model="gemini-2.0-flash", temperature=0.5, google_api_key=GOOGLE_API_KEY)
19
  app = FastAPI()
20
 
21
  # Tavily Web Search Tool
22
- search_tool = TavilySearch(api_key=TAVILY_API_KEY)
23
 
24
  # Calculator Tool (simple math)
25
  calculator_tool = Tool.from_function(
 
12
  from langgraph.checkpoint.memory import MemorySaver
13
  import os
14
  from langchain_google_genai import ChatGoogleGenerativeAI
15
+ from dotenv import load_dotenv
16
+ load_dotenv()
17
+ llm = ChatGoogleGenerativeAI(model="gemini-2.0-flash", temperature=0.5)
 
18
  app = FastAPI()
19
 
20
  # Tavily Web Search Tool
21
+ search_tool = TavilySearch()
22
 
23
  # Calculator Tool (simple math)
24
  calculator_tool = Tool.from_function(
pyproject.toml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [project]
2
+ name = "assistant-ai"
3
+ version = "0.1.0"
4
+ description = "Add your description here"
5
+ readme = "README.md"
6
+ requires-python = ">=3.12"
7
+ dependencies = [
8
+ "fastapi>=0.115.12",
9
+ "langchain-core>=0.3.56",
10
+ "langchain-experimental>=0.3.4",
11
+ "langchain-google-genai>=2.1.3",
12
+ "langchain-tavily>=0.1.5",
13
+ "langgraph>=0.3.34",
14
+ "pydantic>=2.11.3",
15
+ "python-dotenv>=1.1.0",
16
+ "python-multipart>=0.0.20",
17
+ "uvicorn[standard]>=0.34.2",
18
+ ]
requirements.txt CHANGED
@@ -6,4 +6,5 @@ langchain-tavily
6
  langchain-experimental
7
  langchain_google_genai
8
  pydantic
9
- python-multipart
 
 
6
  langchain-experimental
7
  langchain_google_genai
8
  pydantic
9
+ python-multipart
10
+ python-dotenv
uv.lock ADDED
The diff for this file is too large to render. See raw diff