msaifee commited on
Commit
9d521b6
·
1 Parent(s): f503142

Corrected Msg Type

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,7 +4,7 @@ import os
4
  from langchain_groq import ChatGroq
5
  from typing_extensions import TypedDict
6
  from langgraph.graph import add_messages, StateGraph, END, START
7
- from langchain_core.messages import AIMessage, HumanMessage, ToolMessage
8
  from typing import Annotated, List, Dict, Any
9
  from langdetect import detect
10
  from langchain_community.tools.tavily_search import TavilySearchResults
@@ -149,7 +149,7 @@ def review_content(state: BlogState):
149
 
150
  with st.status("🔍 Reviewing Content..."):
151
  feedback = llm.invoke(prompt)
152
- state["reviewed_content"].append(HumanMessage(content=feedback.content))
153
  st.write(feedback.content)
154
  return state
155
 
 
4
  from langchain_groq import ChatGroq
5
  from typing_extensions import TypedDict
6
  from langgraph.graph import add_messages, StateGraph, END, START
7
+ from langchain_core.messages import AIMessage
8
  from typing import Annotated, List, Dict, Any
9
  from langdetect import detect
10
  from langchain_community.tools.tavily_search import TavilySearchResults
 
149
 
150
  with st.status("🔍 Reviewing Content..."):
151
  feedback = llm.invoke(prompt)
152
+ state["reviewed_content"].append(AIMessage(content=feedback.content))
153
  st.write(feedback.content)
154
  return state
155