Spaces:
Runtime error
Runtime error
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 translate_prompts | |
| def get_translate_chain(language: str = "English"): | |
| system_prompt = translate_prompts[language] | |
| prompt = ChatPromptTemplate.from_messages([ | |
| ("system", system_prompt), | |
| ("human", "{input}"), | |
| ]) | |
| return LLM, prompt | |