Spaces:
Sleeping
Sleeping
Update the chatbot to an LangGraph agent, handling four tasks including RAG, summary, translate and email. Update prompts. Update Gradio UI.
6861e2a
| from langchain_core.prompts import ChatPromptTemplate | |
| from app.models.model import LLM | |
| from app.utils.prompts import rewrite_prompts | |
| def get_rewrite_chain(language: str = "English"): | |
| system_prompt = rewrite_prompts[language] | |
| prompt = ChatPromptTemplate.from_messages([ | |
| ("system", system_prompt), | |
| ("human", "{input}"), | |
| ]) | |
| return LLM, prompt | |