Skip to content

Commit fc45711

Browse files
authored
Merge pull request #155 from UiPath/fix/sample_company_message
fix: company research sample proper message
2 parents 560ece2 + 6221b55 commit fc45711

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

samples/company-research-agent/graph.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from langgraph.graph import END, START, MessagesState, StateGraph
44
from langgraph.prebuilt import create_react_agent
55
from pydantic import BaseModel
6+
from langchain_core.messages import HumanMessage
67

78
# Set up the Tavily search tool
89
tavily_tool = TavilySearch(max_results=5)
@@ -56,7 +57,7 @@ async def research_node(state: GraphState) -> GraphOutput:
5657
Ensure that each section is clearly labeled and contains relevant, concise information. If you need any additional specific information about {state.company_name} or its industry to enhance your analysis, please include your questions in the 'Additional Information Needed' section.
5758
"""
5859

59-
new_state = MessagesState(messages=[{"role": "user", "content": user_message}])
60+
new_state = MessagesState(messages=[HumanMessage(content=user_message)])
6061

6162
result = await research_agent.ainvoke(new_state)
6263

0 commit comments

Comments
 (0)