Spaces:
Sleeping
Sleeping
Update llm_app_enhanced.py
Browse files- llm_app_enhanced.py +12 -18
llm_app_enhanced.py
CHANGED
|
@@ -428,25 +428,19 @@ Thanks! Slide number:"""
|
|
| 428 |
Here's what the curriculum slide says about it:
|
| 429 |
{slide_content}
|
| 430 |
Could you help me explain this to them in a friendly, educational way? I'd like you to:
|
| 431 |
-
-
|
| 432 |
-
-
|
| 433 |
-
-
|
| 434 |
-
-
|
| 435 |
-
-
|
| 436 |
-
-
|
| 437 |
-
-
|
| 438 |
-
- Show multiple variations of the concept
|
| 439 |
-
- Include common mistakes and how to avoid them
|
| 440 |
-
- Provide practice exercises or challenges
|
| 441 |
-
- Be comprehensive, detailed, and educational
|
| 442 |
-
- Make it engaging and interesting to read
|
| 443 |
|
| 444 |
Format your response with:
|
| 445 |
-
- Clear
|
| 446 |
-
- Code examples in proper code blocks
|
| 447 |
-
-
|
| 448 |
-
-
|
| 449 |
-
- Practical applications and use cases
|
| 450 |
|
| 451 |
Thanks for your help! Here's what I'd tell the student:"""
|
| 452 |
|
|
@@ -577,7 +571,7 @@ Thanks for your help! Here's what I'd tell the student:"""
|
|
| 577 |
# Get LLM's answer
|
| 578 |
response = self.anthropic_client.messages.create(
|
| 579 |
model="claude-3-5-haiku-20241022",
|
| 580 |
-
max_tokens=
|
| 581 |
temperature=0.7,
|
| 582 |
messages=[{"role": "user", "content": prompt}]
|
| 583 |
)
|
|
|
|
| 428 |
Here's what the curriculum slide says about it:
|
| 429 |
{slide_content}
|
| 430 |
Could you help me explain this to them in a friendly, educational way? I'd like you to:
|
| 431 |
+
- Use the curriculum slide content as your main reference
|
| 432 |
+
- Keep explanations concise but clear
|
| 433 |
+
- Include practical code examples when relevant
|
| 434 |
+
- Make it easy to follow and understand
|
| 435 |
+
- Focus on the key concepts from the slide
|
| 436 |
+
- Add helpful examples if the slide doesn't have them
|
| 437 |
+
- Keep it engaging but not overwhelming
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 438 |
|
| 439 |
Format your response with:
|
| 440 |
+
- Clear, simple explanations
|
| 441 |
+
- Code examples in proper code blocks when helpful
|
| 442 |
+
- Use the slide content as your foundation
|
| 443 |
+
- Keep it concise and focused
|
|
|
|
| 444 |
|
| 445 |
Thanks for your help! Here's what I'd tell the student:"""
|
| 446 |
|
|
|
|
| 571 |
# Get LLM's answer
|
| 572 |
response = self.anthropic_client.messages.create(
|
| 573 |
model="claude-3-5-haiku-20241022",
|
| 574 |
+
max_tokens=1200,
|
| 575 |
temperature=0.7,
|
| 576 |
messages=[{"role": "user", "content": prompt}]
|
| 577 |
)
|