Skip to content

Commit

Permalink
before merge commit - no real changes
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamMRS committed Nov 13, 2024
2 parents 0eb09ab + bfb0bdd commit f37d55e
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 8 deletions.
6 changes: 5 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ LANGSMITH_API_KEY=your_langsmith_api_key #Find it here: https://smith.langchain.
#FLASK_ENV=development #Optional if you want docker to reload flask when you save your code.
#LANGSMITH_API_KEY=your_api_key #optional. Let's you debug using langsmith
#LANGCHAIN_PROJECT=your_project_name #pops up in langsmith dashboard
#TAVILY_API_KEY=your_api_key #Needed for the AI to search the web. The tool will be disabled if there's no api key
#TAVILY_API_KEY=your_api_key #Needed for the AI to search the web. The tool will be disabled if there's no api key
#NARAKEET_API_KEY=your_api_key #Needed for the AI to generate videos. The tool will be disabled if there's no api key
#PERPLEXITY_API_KEY=your_api_key #Needed for the AI to generate videos. The tool will be disabled if there's no api key
#GOOGLE_AUTH_KEY=your_google_auth_key #Needed for the AI to access your google calendar. The tool will be disabled if there's no api key
#GOOGLE_CALENDAR_ID=your_google_calendar_id #Needed for the AI to access your google calendar. The tool will be disabled if there's no api key
17 changes: 16 additions & 1 deletion core/Agents/simpleagent.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,21 @@ class SimpleAgent:
temperature=0,
max_tokens=1024,
)


class SlighltlySmarterAgent:
llm = ChatOpenAI(
model = Model.gpt_4oo,
temperature=0,
max_tokens=1024,
)
class JapperAgent:
llm = ChatOpenAI(
model = Model.gpt_4o,
temperature=0.7,
max_tokens=1024,
)
class ToolsAgent:
agent = SimpleAgent.llm.bind_tools(get_tools())

class ToolsAgent2:
agent = SlighltlySmarterAgent.llm.bind_tools(get_tools())
4 changes: 3 additions & 1 deletion core/graphAgent.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@

class Graph:
def __init__(self):
LANGCHAIN_TRACING_V2: str = "true"
print("""
------------------------------
Instantiated Graph Agent....
------------------------------
------------------------------
""")
self.workflow = StateGraph(GraphState)

Expand All @@ -44,6 +45,7 @@ def __init__(self):
self.workflow.add_edge("calendar_tool", "calendar_decider")
self.workflow.add_edge("other_agent", "tools")
self.workflow.add_edge("tools", "jarvis_agent")
#self.workflow.add_edge("jarvis_agent", "generate")
self.workflow.add_edge("generate", END)

# Defining conditional edges
Expand Down
6 changes: 3 additions & 3 deletions core/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
# Agent instantiation
# Graph() contains all complex tools
# NeoAgent() is a simple ReAct agent that only has websearch and the add tool. For testing purposes.
#jarvis = Graph() # API key is configured in agent.py
jarvis = NeoAgent()
jarvis = Graph() # API key is configured in agent.py
#jarvis = NeoAgent()

# Initialize active_chats with the correct format
# Initialize active_chatss with the correct format
active_chats = defaultdict(lambda: {"chat_history": []})

#
Expand Down
14 changes: 13 additions & 1 deletion core/static/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -339,4 +339,16 @@ a{
.processElement>img{
width: 20px;
margin-left: 6px;
}
}


#jarvis { color: #d9d9d9; }
span {
color: #050505;
transition: color 1s, font-size 1s;
font-size: 0px;
}
#jarvis:hover span {
color: #d9d9d9;
font-size: 1em;
}
2 changes: 1 addition & 1 deletion core/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h2 class="russo-one-regular">Settings</h2>
</div>

<header>
<h2 class="heading russo-one-regular">Jarvis</h2>
<h2 class="heading russo-one-regular", id="jarvis">J<span>ust </span>a<span> </span>r<span>ather </span>v<span>ery </span>i<span>ntelligent </span>s<span>ystem</span></h2>
<div class="toolbar">
<image id="settingsButton" class="icon" src="./static/settings.png" onclick="settingsPage()"></image>
</div>
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ services:
GOOGLE_CALENDAR_ID: ${GOOGLE_CALENDAR_ID}
PORT: ${PORT}
TAVILY_API_KEY: ${TAVILY_API_KEY}
Port_STT: ${PORT_STT}
volumes:
- ./core:/app # Mount the application code to detect live changes
networks:
Expand Down

0 comments on commit f37d55e

Please sign in to comment.