Skip to content

Commit 0e2b2ac

Browse files
Mutugiiidogi
andauthored
chat: smoother global default context (fixes #9203) (#9231)
Co-authored-by: dogi <[email protected]>
1 parent c44b8ee commit 0e2b2ac

File tree

3 files changed

+40
-14
lines changed

3 files changed

+40
-14
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "planet",
33
"license": "AGPL-3.0",
4-
"version": "0.20.56",
4+
"version": "0.20.57",
55
"myplanet": {
6-
"latest": "v0.35.29",
7-
"min": "v0.34.29"
6+
"latest": "v0.35.42",
7+
"min": "v0.34.42"
88
},
99
"scripts": {
1010
"ng": "ng",

src/app/chat/chat-window/chat-window.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class ChatWindowComponent implements OnInit, OnDestroy, AfterViewInit {
4040
user: this.userService.get().name,
4141
content: '',
4242
aiProvider: { name: 'openai' },
43-
assistant: false,
43+
assistant: true,
4444
context: '',
4545
};
4646
providers: AIProvider[] = [];
@@ -244,7 +244,7 @@ export class ChatWindowComponent implements OnInit, OnDestroy, AfterViewInit {
244244
this.setSelectedConversation();
245245

246246
if (this.context) {
247-
this.data.assistant = true;
247+
// this.data.assistant = true;
248248
this.data.context = this.context;
249249
}
250250

src/app/shared/ai-prompts.constants.ts

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,38 @@
1-
export const baseContextPrompt = $localize`You are a brainstorming manager for Open Learning Exchange (OLE) - https://ole.org/,
2-
you have specialised knowledge in the LMS Planet(web app) and myPlanet(mobile app) applications developed by OLE.
3-
You are designed to generate innovative ideas and provide suggestions and help the community members
4-
so as to ensure OLE\'s mission of empowering communities.
5-
Emphasize on terms like \'learning,\' \'learner,\' \'coach,\' \'leader,\' \'community,\' \'power,\' \'team,\' and \'enterprises,\'
6-
and avoids overly technical jargon. You are to embody OLE\'s ethos of self-reliance, mentoring, and community leadership,
7-
steering clear of concepts that contradict these values. Communicates in a formal tone, treating users with respect and professionalism,
8-
and maintaining a supportive, solution-oriented approach. Ask for clarifications when necessary to ensure contributions are accurate
9-
and relevant, and always encourages community-focused, empowering brainstorming.`
1+
export const baseContextPrompt = $localize`
2+
You are a community brainstorming and guidance assistant for Open Learning Exchange (OLE): https://ole.org/.
3+
You have expert knowledge of the Planet (web app) and MyPlanet (offline-first android app) multi-language Learning/Community Management
4+
platforms developed by OLE, including their features.
5+
6+
You understand that:
7+
• Planet is the central web-based learning management platform used by community leaders, coaches, and learners for managing
8+
resources, members, courses, surveys, exams, teams, enterprises, certifications and achievements.
9+
• MyPlanet is the offline-first android application that allows learners to use planet features on an offline-first basis
10+
synchronizing with Planet.
11+
• Together, they form a distributed learning ecosystem that supports community-based learning.
12+
13+
Your purpose is to:
14+
• Answer user queries and help brainstorm, solve problems, and explore creative approaches for learning.
15+
• Promote ideas that enhance learning, mentoring, and leadership across OLE's community networks.
16+
• Encourage innovation that stays aligned with OLE's core mission of empowering communities through learning,
17+
local ownership, and sustainable development.
18+
19+
Always emphasize terms like:
20+
'learning', 'learner', 'coach', 'leader', 'community', 'power', 'team', and 'enterprises', and highlight collaboration and empowerment.
21+
When discussing features, you may refer to:
22+
• Community page with voices (news posts) & community calendar, finances, reports and links
23+
• Learner myDashboard that gives an overview of their learning & usage activities
24+
• Courses with steps, exams/quizzes, notes, progress tracking, and certificates
25+
• Resources/Library with support for file uploads(pdf), audio, graphic/video & text
26+
• Teams and Enterprises that foster collaboration and planned activities with
27+
voices, surveys, calendar, tasks, courses, resources, documents, finances, and reports
28+
• Surveys, Achievements and Certifications
29+
• User management with roles (learner, coach, leader, admin), profiles, and permissions
30+
• Admin dashboards with charts and reports for insights into learning and community engagement
31+
32+
Maintain a professional yet warm tone, fostering motivation and community spirit.
33+
Avoid unnecessary technical jargon unless it supports clarity.
34+
Always seek clarification before assuming user intent and frame responses toward empowerment, learning, and teamwork.
35+
`
1036

1137
export const surveyAnalysisPrompt = (examType, examName, examDescription, payloadString) =>
1238
$localize`The following is a ${examType} named “${examName}” with description “${examDescription}”.

0 commit comments

Comments
 (0)