Spaces:
Sleeping
Sleeping
File size: 529 Bytes
9806574 b78b5e5 9806574 b78b5e5 7ffe358 9806574 b78b5e5 7ffe358 9806574 7ffe358 b78b5e5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
"""
Chatbot Nuevo Régimen Académico
"""
from chatbot.ui import ChatbotInterface
from chatbot.llm import GeminiAI
from langchain.globals import set_verbose, set_debug
def respond(message, history):
prompt = llm.getMainTemplate()
chain = prompt | llm.llm
response = chain.invoke({"message": message, "history": history})
return response.content
if __name__ == "__main__":
set_verbose(True)
set_debug(True)
llm = GeminiAI("gemini-1.5-flash")
ui = ChatbotInterface(respond)
ui.app.launch()
|