Skip to content

Commit

Permalink
refactor: file renaming etc. Default is graph agent.
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamMRS committed Nov 11, 2024
1 parent 0012835 commit 8efbee7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/Agents/neoagent.py → core/Agents/neo_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
ReAct is a simple multi-step agent architecture.
Smaller graphs are often better understood by the LLMs.
"""
class Neoagent:
class NeoAgent:
def __init__(self):
print("""
------------------------------
Expand Down
5 changes: 5 additions & 0 deletions core/graphAgent.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@

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

self.workflow.add_node("jarvis_agent", jarvis_agent)
Expand Down
6 changes: 3 additions & 3 deletions core/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from flask import Flask, request, url_for, jsonify
from graphAgent import Graph
from Agents.neoagent import Neoagent
from core.Agents.neo_agent import NeoAgent
from models import Model
from summarize_chat import summarize_chat
from rag import embed_and_store
Expand Down Expand Up @@ -31,9 +31,9 @@

# Agent instantiation
# Graph() contains all complex tools
# Neoagent() is a simple ReAct agent that only has websearch and the add tool. For testing purposes.
# 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 = NeoAgent()

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

0 comments on commit 8efbee7

Please sign in to comment.