Skip to content

Commit de7f365

Browse files
commit111nullfunc
andauthored
Apply suggestions from code review
Co-authored-by: Eric Liu <[email protected]>
1 parent 9004ecb commit de7f365

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

samples/agentic-langgraph/app/agent.mts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ function shouldContinue({ messages }: typeof MessagesAnnotation.State) {
3737
// Define the function that calls the model
3838
async function callModel(state: typeof MessagesAnnotation.State) {
3939
const response = await model.invoke(state.messages);
40-
// console.log("Model response:", response);
4140

4241
// We return a list, because this will get added to the existing list
4342
return { messages: [response] };
@@ -56,12 +55,10 @@ const app = workflow.compile();
5655

5756
// Helper function to get agent output for a given input and optional previous messages
5857
const getAgentOutput = async (input: string, previousMessages: (HumanMessage | AIMessage)[] = []) => {
59-
console.log("Getting agent output for input:", input);
6058

6159
const initialState = {
6260
messages: [...previousMessages, new HumanMessage(input)],
6361
};
64-
console.log("Initial state messages (JSON):", JSON.stringify(initialState.messages, null, 2));
6562

6663
const finalState = await app.invoke(initialState);
6764
return {

samples/agentic-langgraph/app/public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</head>
1717
<body>
1818
<h1>LangGraph Agent Output</h1>
19-
<p>Try a query that uses tools, e.g., "what's the weather like in new york?"</p>
19+
<p>Try a query that uses tools, e.g., "What's the weather like in New York?"</p>
2020
<input type="text" id="userInput" placeholder="Type your input" style="width: 400px; height: 40px; font-size: 1.2em; padding: 8px;" />
2121
<button id="sendBtn" style="width: 80px; height: 60px; font-size: 1.2em; padding: 8px;">Send</button>
2222
<div id="conversation" style="margin-top: 20px;">

0 commit comments

Comments
 (0)