Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix use of agent names in get_agent. No need for agent at end #116

Merged
merged 1 commit into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async def process_data(data: dict):
"""Process crypto data"""
logger.info("Data Agent: Received process_data request")
try:
crypto_agent = agent_manager_instance.get_agent("crypto data agent")
crypto_agent = agent_manager_instance.get_agent("crypto data")
if not crypto_agent:
return JSONResponse(
status_code=400,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def chat(self, request: ChatRequest):
# Build list of human readable names for selected agents
selected_agents_info = []
for agent in available_agents:
if agent["name"] in selected_agent_names and agent["name"] != "default agent":
if agent["name"] in selected_agent_names and agent["name"] != "default":
human_name = agent.get("human_readable_name", agent["name"])
selected_agents_info.append(f"- {human_name}: {agent['description']}")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async def claim(request: Request):
"""Process a claim request"""
logger.info("Received claim request")
try:
claim_agent = agent_manager_instance.get_agent("claim agent")
claim_agent = agent_manager_instance.get_agent("claim")
if not claim_agent:
return JSONResponse(
status_code=400,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async def upload_file(file: UploadFile = File(...)):
"""Upload a file for RAG processing"""
logger.info("Received upload request")
try:
rag_agent = agent_manager_instance.get_agent("rag agent")
rag_agent = agent_manager_instance.get_agent("rag")
if not rag_agent:
return JSONResponse(
status_code=400,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async def tx_status(request: Request):
"""Check transaction status"""
logger.info("Received tx_status request")
try:
swap_agent = agent_manager_instance.get_agent("crypto swap agent")
swap_agent = agent_manager_instance.get_agent("crypto swap")
if not swap_agent:
return JSONResponse(
status_code=400,
Expand All @@ -36,7 +36,7 @@ async def allowance(request: Request):
"""Get token allowance"""
logger.info("Received allowance request")
try:
swap_agent = agent_manager_instance.get_agent("crypto swap agent")
swap_agent = agent_manager_instance.get_agent("crypto swap")
if not swap_agent:
return JSONResponse(
status_code=400,
Expand All @@ -58,7 +58,7 @@ async def approve(request: Request):
"""Approve token spending"""
logger.info("Received approve request")
try:
swap_agent = agent_manager_instance.get_agent("crypto swap agent")
swap_agent = agent_manager_instance.get_agent("crypto swap")
if not swap_agent:
return JSONResponse(
status_code=400,
Expand All @@ -80,7 +80,7 @@ async def swap(request: Request):
"""Execute token swap"""
logger.info("Received swap request")
try:
swap_agent = agent_manager_instance.get_agent("crypto swap agent")
swap_agent = agent_manager_instance.get_agent("crypto swap")
if not swap_agent:
return JSONResponse(
status_code=400,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async def regenerate_tweet():
"""Regenerate a tweet"""
logger.info("Received regenerate tweet request")
try:
tweet_agent = agent_manager_instance.get_agent("tweet sizzler agent")
tweet_agent = agent_manager_instance.get_agent("tweet sizzler")
if not tweet_agent:
return JSONResponse(
status_code=400,
Expand All @@ -36,7 +36,7 @@ async def post_tweet(request: Request):
"""Post a tweet"""
logger.info("Received post tweet request")
try:
tweet_agent = agent_manager_instance.get_agent("tweet sizzler agent")
tweet_agent = agent_manager_instance.get_agent("tweet sizzler")
if not tweet_agent:
return JSONResponse(
status_code=400,
Expand Down