Skip to content

Commit

Permalink
feat: add meeting hint type and use it as default (#110)
Browse files Browse the repository at this point in the history
Co-authored-by: Avram Tudor <[email protected]>
  • Loading branch information
quitrk and Avram Tudor authored Oct 17, 2024
1 parent 8ef27ec commit b57ed81
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
11 changes: 9 additions & 2 deletions skynet/modules/ttt/summaries/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@
from skynet.env import app_uuid, azure_openai_api_version, llama_n_ctx, llama_path, openai_api_base_url
from skynet.logs import get_logger

from .prompts.action_items import action_items_conversation, action_items_emails, action_items_text
from .prompts.summary import summary_conversation, summary_emails, summary_text
from .prompts.action_items import (
action_items_conversation,
action_items_emails,
action_items_meeting,
action_items_text,
)
from .prompts.summary import summary_conversation, summary_emails, summary_meeting, summary_text
from .v1.models import DocumentPayload, HintType, JobType

llm = None
Expand All @@ -19,11 +24,13 @@
JobType.SUMMARY: {
HintType.CONVERSATION: summary_conversation,
HintType.EMAILS: summary_emails,
HintType.MEETING: summary_meeting,
HintType.TEXT: summary_text,
},
JobType.ACTION_ITEMS: {
HintType.CONVERSATION: action_items_conversation,
HintType.EMAILS: action_items_emails,
HintType.MEETING: action_items_meeting,
HintType.TEXT: action_items_text,
},
}
Expand Down
10 changes: 10 additions & 0 deletions skynet/modules/ttt/summaries/prompts/action_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@
If there are no action items, respond just with "No action items", else start your response with "Response:", followed by the list of action items.
"""

action_items_meeting = """
You are an AI assistant that will be provided with a text transcript of a meeting. You will extract a short list of specific, unique action items from that transcript.
An action item can be defined when someone commits to doing something in the future, or when someone charges someone one else to do something in the future.
Example 1: If Andrew says "I will send you the report by tomorrow", then the action item would be "- Andrew will send the report by tomorrow".
Example 2: If George says "As an action item for Michael, don't forget to send the report by tomorrow", then the action item would be "- Michael will send the report by tomorrow".
If there are no action items, respond just with "No action items", else start your response with "Response:", followed by the list of action items.
"""

action_items_text = """
You are an AI assistant that will be provided with a text transcript. You will extract a short list of specific, unique action items from that transcript.
An action item can be defined when someone commits to doing something in the future, or when someone charges someone one else to do something in the future.
Expand Down
6 changes: 6 additions & 0 deletions skynet/modules/ttt/summaries/prompts/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
Start your response with "Response:".
"""

summary_meeting = """
You are an AI assistant that will be provided a text transcript of a meeting. You will extract a summary of that transcript.
The response should be plain text, without the use of any formatting like bullet points, numbering, or asterisks.
Start your response with "Response:".
"""

summary_text = """
You are an AI assistant that will be provided a text transcript of a meeting. You will extract a summary of that transcript.
The response should be plain text, without the use of any formatting like bullet points, numbering, or asterisks.
Expand Down
3 changes: 2 additions & 1 deletion skynet/modules/ttt/summaries/v1/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
class HintType(Enum):
CONVERSATION = 'conversation'
EMAILS = 'emails'
MEETING = 'meeting'
TEXT = 'text'


Expand All @@ -17,7 +18,7 @@ class Priority(Enum):

class DocumentPayload(BaseModel):
text: str
hint: HintType = HintType.TEXT
hint: HintType = HintType.MEETING
priority: Priority = Priority.NORMAL
prompt: str | None = None

Expand Down

0 comments on commit b57ed81

Please sign in to comment.