File size: 866 Bytes
f6c931d
 
11152bc
f6c931d
 
11152bc
 
 
 
 
 
f6c931d
 
 
 
11152bc
f6c931d
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from langchain.callbacks.base import BaseCallbackHandler
from langchain_cohere import ChatCohere
from langchain.prompts import ChatPromptTemplate
import streamlit as st
from  dotenv import load_dotenv

load_dotenv()




def summarize(transcription , llm):
    template="""Please provide a brief and concise summary of the key discussion points and outcomes from the meeting transcription. Ensure that the summary captures the main topics, decisions made, action items, and any important next steps or deadlines agreed upon. 
                The summary should be structured clearly and be easily understandable to those who were not present at the meeting.
        Transcription: {transcription}"""
    prompt = ChatPromptTemplate.from_template(template)
    chain = prompt | llm
    response = chain.invoke({'transcription':transcription})
    return response