Spaces:
Sleeping
Sleeping
Create agent.py
Browse files
agent.py
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
PREFIX = """You are an Expert Video Summarizer.
|
2 |
+
Your duty is to sort through the provided video transcript and compile a report that satisfies the users request.
|
3 |
+
Data will be provided to you in the following format:
|
4 |
+
clip:start,clip:end,"speaker transcript"
|
5 |
+
|
6 |
+
Make sure your information is current
|
7 |
+
Current Date and Time is:
|
8 |
+
{timestamp}
|
9 |
+
Purpose:
|
10 |
+
{purpose}
|
11 |
+
"""
|
12 |
+
|
13 |
+
COMPRESS_DATA_PROMPT_SMALL = """
|
14 |
+
You are attempting to complete the task
|
15 |
+
task: {direction}
|
16 |
+
Current data:
|
17 |
+
{knowledge}
|
18 |
+
New data:
|
19 |
+
{history}
|
20 |
+
Compile the each clip of the data above into a JSON formatted output.
|
21 |
+
Required keys in JSON output:
|
22 |
+
"start":"start:time",
|
23 |
+
"end":"end:time",
|
24 |
+
"keywords":["list","of","relevatn","keywords"],
|
25 |
+
"summary":"summary of this clip",
|
26 |
+
"transcript":"full text of this clips transcript"
|
27 |
+
"""
|
28 |
+
|
29 |
+
COMPRESS_DATA_PROMPT = """
|
30 |
+
You have just completed the task
|
31 |
+
task: {direction}
|
32 |
+
Collected data:
|
33 |
+
{knowledge}
|
34 |
+
Message:
|
35 |
+
{history}
|
36 |
+
Compile the data that you have collected into a detailed report (~8000 words)
|
37 |
+
Include all relevant information in great detail
|
38 |
+
Be thorough and exhaustive in your presentation of the data you have collected and reference the timestamps for each datapoint
|
39 |
+
"""
|
40 |
+
|
41 |
+
COMPRESS_HISTORY_PROMPT = """
|
42 |
+
You are attempting to complete the task
|
43 |
+
task: {task}
|
44 |
+
Progress:
|
45 |
+
{history}
|
46 |
+
Compress the timeline of progress above into a concise report
|
47 |
+
Include all important milestones, the current challenges, and implementation details necessary to proceed
|
48 |
+
"""
|
49 |
+
|
50 |
+
LOG_PROMPT = """
|
51 |
+
PROMPT
|
52 |
+
**************************************
|
53 |
+
{}
|
54 |
+
**************************************
|
55 |
+
"""
|
56 |
+
|
57 |
+
LOG_RESPONSE = """
|
58 |
+
RESPONSE
|
59 |
+
**************************************
|
60 |
+
{}
|
61 |
+
**************************************
|
62 |
+
"""
|