Skip to content

Commit

Permalink
feat: add to prompt that RAG-functionality is available to the LLM
Browse files Browse the repository at this point in the history
  • Loading branch information
JonBergland committed Nov 7, 2024
1 parent 16bf9f0 commit 6d262fb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion core/graphAgent.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(self):
self.workflow.add_node("perplexity_agent", perplexity_agent)
self.workflow.add_node("calendar_tool", ToolNode(get_tools()))
self.workflow.add_node("use_calendar_tool", calendar_tool_decider)
self.workflow.add_node("calendar_decider", calendar_desicion_agent)
self.workflow.add_node("calendar_decider", calendar_decision_agent)
self.workflow.add_node("other_agent", other_agent)

self.workflow.add_edge(START, "jarvis_agent")
Expand Down
12 changes: 6 additions & 6 deletions core/noder.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ def tool_agent_decider(state: GraphState):
Data: {data}
Your options for agents are the following:
- "perplexity": This agent has access to tools that use the perplexity API.
These tools are the following: {perplexity_tools}
- "perplexity": This agent has access to tools that use the perplexity API and tools
for doing a RAG-search. These tools are the following: {perplexity_tools}
- "calendar": This agent has access to calendar tools
These tools are the following: {calendar_tools}
- "other": Other tools available: {other_tools}
Expand Down Expand Up @@ -112,8 +112,8 @@ def perplexity_agent(state: GraphState):
"""Agent that handles tools using the perplexity api"""
prompt = PromptTemplate(
template= """
Your job is to create tool_calls to tools using the perplexity API.
The tool or tools you decide
Your job is to create tool_calls to tools using the perplexity API or
to tools that do a RAG-search. The tool or tools you decide
to call should help answer the users question.
Here are previous messages:
Expand All @@ -134,11 +134,11 @@ def perplexity_agent(state: GraphState):
return {"messages": [response]}


def calendar_desicion_agent(state: GraphState):
def calendar_decision_agent(state: GraphState):
"""Agent that decides what to do with the calendar"""
prompt = PromptTemplate(
template= """
Your job is to determine if you wich calendar related tools you need to answer the
Your job is to determine if you which calendar related tools you need to answer the
jarvis agents question and answer with only the name of the option
choose.
Expand Down

0 comments on commit 6d262fb

Please sign in to comment.