Skip to content

Adding further example #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions example_scripts/GPT/meeting summarizer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#The following summarizes meeting notes including overall discussion, action items, and future topics.
import os
import openai

openai.api_key = os.getenv("OPENAI_API_KEY")
messages=[{"role":"system", "content": "You will be provided with meeting notes, and your task is to summarize the meeting as follows:

-Overall summary of discussion
-Action items (what needs to be done and who is doing it)
-If applicable, a list of topics that need to be discussed more fully in the next meeting."]

def multiline_input():
input_list=[]
while True:
line=input()
if line:
input_list.append(line)
else:
break
return '\n'.join(input_list)

def summarize_meeting():
global messages
while True:
user_content=multiline_input()
messages.append({"role": "user", "content": user_content})
response = openai.ChatCompletion.create(
model="gpt-4",
messages=messages,
temperature=0,
max_tokens=1024
)
messages.append({"role": "assistant", "content": response})
print(f"Assistant: {response}")
if user_content.lower() in ("quit", "exit"):
exit(0)

summarize_meeting()