Skip to content

Commit

Permalink
chat: smoother default configuration (fixes #7569) (#7570)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <[email protected]>
  • Loading branch information
Mutugiii and dogi authored Oct 1, 2024
1 parent 0889e59 commit 10230b9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "planet",
"license": "AGPL-3.0",
"version": "0.14.82",
"version": "0.14.83",
"myplanet": {
"latest": "v0.19.70",
"min": "v0.18.70"
"latest": "v0.19.71",
"min": "v0.18.71"
},
"scripts": {
"ng": "ng",
Expand Down
24 changes: 23 additions & 1 deletion src/app/configuration/configuration.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,34 @@ export class ConfigurationComponent implements OnInit {
confirmPassword,
...credentials
} = this.loginForm.value;

const chatConfig = {
streaming: false,
keys: {
openai: '',
perplexity: '',
gemini: ''
},
models: {
openai: 'gpt-3.5-turbo',
perplexity: 'llama-3-sonar-small-32k-online',
gemini: 'gemini-pro'
},
assistant: {
name: 'Planet Context',
instructions: 'You are a brainstorming manager for Open Learning Exchange (OLE) - https://ole.org/, you have specialised knowledge in Planet(web app) and myPlanet(mobile app) applications developed by OLE. You are designed to generate innovative ideas and provide suggestions and help the community members so as to ensure OLE\'s mission of empowering communities. Emphasize on terms like \'learning,\' \'learner,\' \'coach,\' \'leader,\' \'community,\' \'power,\' \'team,\' and \'enterprises,\' and avoids overly technical jargon. You are to embody OLE\'s ethos of self-reliance, mentoring, and community leadership, steering clear of concepts that contradict these values. Communicates in a formal tone, treating users with respect and professionalism, and maintaining a supportive, solution-oriented approach. Ask for clarifications when necessary to ensure contributions are accurate and relevant, and always encourages community-focused, empowering brainstorming.'
}
};

const configuration = Object.assign(
{
registrationRequest: 'pending',
adminName: credentials.name + '@' + this.configurationFormGroup.controls.code.value
},
this.configuration, this.configurationFormGroup.value, this.contactFormGroup.value
this.configuration,
this.configurationFormGroup.value,
this.contactFormGroup.value,
this.configurationType === 'new' ? chatConfig : {}
);
return { credentials, configuration };
}
Expand Down

0 comments on commit 10230b9

Please sign in to comment.