Skip to content

Commit

Permalink
Added the component reference lookups
Browse files Browse the repository at this point in the history
  • Loading branch information
heiko-braun committed Dec 12, 2023
1 parent 9485dc6 commit 47f7762
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,20 @@ def configure_retriever(collection_name):
"Searches and returns documents regarding Camel Components and their configuration options. Camel Components are used within the Camel framework to integrate third-party systems",
)

tools = [comp_ref_tool]
camel_dev_tool = create_retriever_tool(
configure_retriever("agent_fuse_camel_dev"),
"search_camel_developer_guide",
"Searches and returns documents regarding core concepts and API's used to develop Camel applications. The developer guide also explains how to leverage the enterprise integration patterns in Camel.",
)


tools = [comp_ref_tool, camel_dev_tool]
llm = ChatOpenAI(temperature=0, streaming=True, model="gpt-3.5-turbo-1106")
message = SystemMessage(
content=(
"You are an assistant helping software developers create integrations with third-party systems using the Apache Camel framework."
"Unless otherwise explicitly stated, it is probably fair to assume that questions are about Apache Camel. "
"If there is any ambiguity, you probably assume they are about that."
"You always request additional information using the functions provided before answering the original question."
"If possible, provide examples that include Java code within the response."
)
)
Expand All @@ -79,7 +86,7 @@ def configure_retriever(collection_name):
return_intermediate_steps=True,
)
memory = AgentTokenBufferMemory(llm=llm)
starter_message = "Ask me anything about Camel!"
starter_message = "How can I help you?"
if "messages" not in st.session_state or st.sidebar.button("Clear message history"):
st.session_state["messages"] = [AIMessage(content=starter_message)]

Expand Down

0 comments on commit 47f7762

Please sign in to comment.