From 8efbee7010c1e1d9206641d4a6695b873e9bda1b Mon Sep 17 00:00:00 2001 From: William M Schmidt Date: Mon, 11 Nov 2024 23:56:56 +0100 Subject: [PATCH] refactor: file renaming etc. Default is graph agent. --- core/Agents/{neoagent.py => neo_agent.py} | 2 +- core/graphAgent.py | 5 +++++ core/main.py | 6 +++--- 3 files changed, 9 insertions(+), 4 deletions(-) rename core/Agents/{neoagent.py => neo_agent.py} (99%) diff --git a/core/Agents/neoagent.py b/core/Agents/neo_agent.py similarity index 99% rename from core/Agents/neoagent.py rename to core/Agents/neo_agent.py index 7d72e11..39e42c8 100644 --- a/core/Agents/neoagent.py +++ b/core/Agents/neo_agent.py @@ -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(""" ------------------------------ diff --git a/core/graphAgent.py b/core/graphAgent.py index 0c74ca4..1accf4c 100644 --- a/core/graphAgent.py +++ b/core/graphAgent.py @@ -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) diff --git a/core/main.py b/core/main.py index 0bb6ae0..674226f 100644 --- a/core/main.py +++ b/core/main.py @@ -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 @@ -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": []})