Gaykar commited on
Commit
7b3f35e
·
1 Parent(s): 14911e1

added req and docker file

Browse files
Dockerfile ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ FROM python:3.12-slim
3
+
4
+ # Set the working directory to /code
5
+ WORKDIR /code
6
+
7
+ # Copy the requirements.txt file into the container
8
+ COPY requirements.txt .
9
+
10
+ # Install the dependencies
11
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
12
+
13
+ # Set up a new user named "user" with user ID 1000
14
+ RUN useradd -m -u 1000 user
15
+
16
+ # Switch to the "user" user
17
+ USER user
18
+
19
+ # Set home to the user's home directory
20
+ ENV HOME=/home/user \
21
+ PATH=/home/user/.local/bin:$PATH
22
+
23
+ # Set the working directory to the user's home directory
24
+ WORKDIR $HOME/app
25
+
26
+ # Copy the current directory contents into the container at $HOME/app
27
+ COPY --chown=user . $HOME/app
28
+
29
+ EXPOSE 7860
30
+
31
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
app/agents/__init__.py ADDED
File without changes
app/agents/agents.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from langchain_groq import ChatGroq
2
+ from app.schemas.pydanticschema import ResumeExtract,JobDescriptionExtract,SkillGapAnalysis
3
+ from app.core.config import settings
4
+ from app.tools.tools import roadmap_planner_agent_tools
5
+ from app.prompts.roadmap_planner_agent_prompt import roadmap_planner_agent_prompt
6
+ from typing import Any
7
+ from langchain.agents import create_agent
8
+ from langchain.agents.middleware import ToolCallLimitMiddleware
9
+ import os
10
+
11
+ if "GROQ_API_KEY" not in os.environ:
12
+ os.environ["GROQ_API_KEY"] = settings.GROQ_API_KEY
13
+
app/core/__init__.py ADDED
File without changes
app/core/config.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from pathlib import Path
2
+ from pydantic_settings import BaseSettings, SettingsConfigDict
3
+
4
+ BASE_DIR = Path(__file__).resolve().parent.parent.parent
5
+
6
+ class Settings(BaseSettings):
7
+ PROJECT_NAME: str = "Email Assistant Project"
8
+
9
+ GROQ_API_KEY: str
10
+ PINECONE_API_KEY: str
11
+
12
+ CLOUDINARY_CLOUD_NAME: str
13
+ CLOUDINARY_API_KEY: str
14
+ CLOUDINARY_API_SECRET: str
15
+
16
+ model_config = SettingsConfigDict(
17
+ env_file=str(BASE_DIR / ".env"),
18
+ env_file_encoding="utf-8",
19
+ extra="ignore"
20
+ )
21
+
22
+ settings = Settings()
app/graph.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ from app.state.state import
2
+ from app.nodes.graphnodes import *
3
+ from langgraph.prebuilt import ToolNode ,tools_condition
4
+ from app.agents.agents import
5
+ from langgraph.graph import StateGraph,END,START
6
+
7
+
8
+
9
+ # Define Nodes
10
+ # Define Nodes
app/main.py ADDED
File without changes
app/nodes/__init__.py ADDED
File without changes
app/nodes/graphnodes.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from app.state.state import OnboardingState
2
+ from langchain_core.messages import SystemMessage, HumanMessage,ToolMessage,AIMessage
3
+ from app.prompts.
4
+ from app.prompts.
5
+ from app.prompts.
6
+ from app.agents.agents import
7
+ from app.prompts.gap_analysis_agent_prompt import gap_analysis_agent_prompt
8
+ from app.schemas.pydanticschema import ResumeExtract,JobDescriptionExtract,SkillGapAnalysis
9
+ import json
10
+ from app.tools.tools import *
11
+ from langchain_community.document_loaders import PyMuPDFLoader
12
+ from langgraph.prebuilt import ToolNode ,tools_condition
13
+
app/prompts/__init__.py ADDED
File without changes
app/prompts/prompts.py ADDED
File without changes
app/schemas/__init__.py ADDED
File without changes
app/schemas/pydanticschema.py ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ from pydantic import BaseModel, Field
2
+ from typing import List, Optional, Literal
3
+
4
+
app/state/__init__.py ADDED
File without changes
app/state/state.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from typing import Any, Dict, List, Optional, Tuple,TypedDict,Literal
2
+ from typing import Annotated, Sequence
3
+ import os
4
+ from langchain_core.messages import SystemMessage, HumanMessage,ToolMessage,AIMessage
5
+ from langchain_core.tools import Tool
6
+ from langgraph.graph import StateGraph,END,START
7
+ from langgraph.types import interrupt
8
+ from langchain_core.prompts import ChatPromptTemplate,MessagesPlaceholder
9
+ from langchain_community.document_loaders import PyMuPDFLoader
10
+ from pydantic import BaseModel, Field
11
+ from typing import List, Optional
12
+ from pprint import pprint
13
+ from langchain_core.messages import BaseMessage
14
+ from langgraph.graph import add_messages
15
+ from app.schemas.pydanticschema import *
16
+
17
+
18
+
19
+
20
+
21
+
22
+
app/tools/__init__.py ADDED
File without changes
app/tools/tools.py ADDED
File without changes
app/utils/__init__.py ADDED
File without changes
requirements.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ langchain==1.2.10
2
+ pydantic==2.11.7
3
+ langchain_huggingface
4
+ langchain-groq==1.1.1