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.chains.combine_documents import create_stuff_documents_chain | |
| from langchain_core.prompts import ChatPromptTemplate | |
| from app.models.model import LLM | |
| from app.managers import vector_manager as vm | |
| from app.utils.prompts import summary_prompts | |
| def get_summary_chain(language: str = "Deutsch"): | |
| system_prompt = summary_prompts[language] | |
| prompt = ChatPromptTemplate.from_messages([ | |
| ("system", system_prompt), | |
| ("human", "{input}"), | |
| ]) | |
| return LLM, prompt | |