Skip to content

Commit

Permalink
rename var
Browse files Browse the repository at this point in the history
  • Loading branch information
zmezei committed Feb 15, 2024
1 parent f9a7e38 commit e2331a2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions integrations/langchain-rag/src/agents/langchain_rag_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
endpoint=["http://127.0.0.1:8000/submit"],
)

langchain_rag_user = Protocol("Langchain RAG user")
rag_user = Protocol("Langchain RAG user")


@langchain_rag_user.on_interval(60, messages=RagRequest)
@rag_user.on_interval(60, messages=RagRequest)
async def ask_question(ctx: Context):
ctx.logger.info(
f"Asking RAG agent to answer {QUESTION} based on document located at {URL}, readin nested pages too: {DEEP_READ}"
Expand All @@ -30,12 +30,12 @@ async def ask_question(ctx: Context):
)


@langchain_rag_user.on_message(model=UAgentResponse)
@rag_user.on_message(model=UAgentResponse)
async def handle_data(ctx: Context, sender: str, data: UAgentResponse):
ctx.logger.info(f"Got response from RAG agent: {data.message}")


user.include(langchain_rag_user)
user.include(rag_user)

if __name__ == "__main__":
langchain_rag_user.run()
rag_user.run()

0 comments on commit e2331a2

Please sign in to comment.