Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure deploy prod #452

Merged
merged 13 commits into from
Nov 26, 2024
Prev Previous commit
Next Next commit
20241124 @Mookse
- QA/Code Review for Registration Process #449
- remove passphrase from avatar (core only)
  • Loading branch information
Mookse committed Nov 24, 2024
commit 260c94bed4bf87715a4d90f64e9576793a692bc8
6 changes: 3 additions & 3 deletions inc/js/mylife-avatar.mjs
Original file line number Diff line number Diff line change
@@ -1520,18 +1520,18 @@ class Q extends Avatar {
}
/**
* Set MyLife core account basics. { birthdate, passphrase, }
* @todo - move to mylife agent factory
* @todo - deprecate addMember()
* @param {string} birthdate - The birthdate of the member.
* @param {string} passphrase - The passphrase of the member.
* @returns {boolean} - `true` if successful
* @returns {object} - The account creation object: { avatar, success, }
*/
async createAccount(birthdate, passphrase){
if(!birthdate?.length || !passphrase?.length)
throw new Error('birthdate _**and**_ passphrase required')
let avatar,
success = false
avatar = await this.#factory.createAccount(birthdate, passphrase)
if(Object.keys(avatar).length){
if(typeof avatar==='object' && Object.keys(avatar).length){
const { mbr_id, } = avatar
success = true
this.addMember(mbr_id)
4 changes: 4 additions & 0 deletions inc/js/mylife-dataservices.mjs
Original file line number Diff line number Diff line change
@@ -719,13 +719,17 @@ function mAvatarProperties(core, globals){
'assistant_id',
'avatarId',
'avatarName',
'bot_id',
'bots',
'command_word',
'conversations',
'form',
'format',
'llm_id',
'messages',
'metadata',
'passphrase',
'thread',
'thread_id',
'validation',
'validations',
3 changes: 2 additions & 1 deletion inc/js/mylife-factory.mjs
Original file line number Diff line number Diff line change
@@ -819,7 +819,8 @@ class MyLifeFactory extends AgentFactory {
/* create avatar */
if(Object.keys(memberAccount)?.length){
try{
return await this.dataservices.addAvatar(memberAccount?.core) ?? {}
const avatarData = await this.dataservices.addAvatar(memberAccount?.core)
return avatarData
} catch(error) {
console.log(chalk.blueBright('createAccount()::createAvatar()::error'), chalk.bgRed(error))
}