update app.py with o1-mini
Browse files
app.py
CHANGED
@@ -7,42 +7,44 @@ from dotenv import load_dotenv
|
|
7 |
|
8 |
load_dotenv()
|
9 |
|
10 |
-
#
|
11 |
-
user_template = """You are
|
12 |
-
1.
|
13 |
-
2.
|
14 |
-
3.
|
15 |
-
4.
|
16 |
-
5.
|
17 |
-
|
18 |
-
Frame your
|
19 |
-
-
|
20 |
-
-
|
21 |
-
-
|
22 |
-
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
-
|
28 |
-
-
|
29 |
-
-
|
30 |
-
-
|
31 |
-
|
32 |
-
|
|
|
33 |
"""
|
34 |
|
35 |
@cl.on_chat_start
|
36 |
async def start_chat():
|
37 |
-
# Welcome message with
|
38 |
await cl.Message(
|
39 |
-
content="π Welcome to the
|
40 |
-
"
|
41 |
-
"1.
|
42 |
-
"2.
|
43 |
-
"3.
|
44 |
-
"4.
|
45 |
-
"5.
|
|
|
46 |
).send()
|
47 |
|
48 |
settings = {
|
@@ -84,12 +86,12 @@ async def main(message: cl.Message):
|
|
84 |
prompt.completion = msg.content
|
85 |
msg.prompt = prompt
|
86 |
|
87 |
-
# Add indicator emoji based on
|
88 |
-
if any(word in msg.content.lower() for word in ['
|
89 |
-
await msg.stream_token("
|
90 |
-
elif any(word in msg.content.lower() for word in ['
|
91 |
-
await msg.stream_token("
|
92 |
else:
|
93 |
-
await msg.stream_token("
|
94 |
|
95 |
await msg.send()
|
|
|
7 |
|
8 |
load_dotenv()
|
9 |
|
10 |
+
# Template for LLM system vibe checking
|
11 |
+
user_template = """You are an assistant helping to perform quick evaluations of LLM-powered systems. Your role is to:
|
12 |
+
1. Help identify potential critical failure points in the system
|
13 |
+
2. Assess basic functionality and obvious issues
|
14 |
+
3. Look for significant problems that would be immediately noticeable
|
15 |
+
4. Provide a cursory but meaningful evaluation
|
16 |
+
5. Focus on crucial functions where failure would be severe
|
17 |
+
|
18 |
+
Frame your assessment in these sections:
|
19 |
+
- Basic Functionality Check
|
20 |
+
- Critical Issues Assessment
|
21 |
+
- Obvious Failure Points
|
22 |
+
- Quick Recommendations
|
23 |
+
|
24 |
+
System or component to evaluate: {input}
|
25 |
+
|
26 |
+
Key areas to examine:
|
27 |
+
- Core functionality problems
|
28 |
+
- Obvious response issues
|
29 |
+
- Critical safety concerns
|
30 |
+
- Basic performance problems
|
31 |
+
- User-facing issues
|
32 |
+
|
33 |
+
Provide an informal but insightful evaluation focusing on major concerns.
|
34 |
"""
|
35 |
|
36 |
@cl.on_chat_start
|
37 |
async def start_chat():
|
38 |
+
# Welcome message with LLM system vibe check introduction
|
39 |
await cl.Message(
|
40 |
+
content="π Welcome to the LLM System Vibe Check Assistant! I'll help you perform quick evaluations "
|
41 |
+
"of LLM-powered systems. Share any component or behavior you want to evaluate, such as:\n\n"
|
42 |
+
"1. Response quality or consistency\n"
|
43 |
+
"2. Safety mechanism effectiveness\n"
|
44 |
+
"3. Basic functionality issues\n"
|
45 |
+
"4. User interaction problems\n"
|
46 |
+
"5. Critical system behaviors\n\n"
|
47 |
+
"Remember: This is meant to be a cursory check for obvious issues, not a comprehensive evaluation."
|
48 |
).send()
|
49 |
|
50 |
settings = {
|
|
|
86 |
prompt.completion = msg.content
|
87 |
msg.prompt = prompt
|
88 |
|
89 |
+
# Add indicator emoji based on evaluation result
|
90 |
+
if any(word in msg.content.lower() for word in ['critical', 'severe', 'serious', 'failing']):
|
91 |
+
await msg.stream_token(" π¨") # Critical issues found
|
92 |
+
elif any(word in msg.content.lower() for word in ['minor', 'small', 'minimal']):
|
93 |
+
await msg.stream_token(" β οΈ") # Minor issues found
|
94 |
else:
|
95 |
+
await msg.stream_token(" β
") # No obvious issues
|
96 |
|
97 |
await msg.send()
|