Spaces:
Sleeping
Sleeping
Corrected Msg Type
Browse files
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
|
| 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(
|
| 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 |
|