Skip to content

Commit

Permalink
Version 0.0.8 (#226)
Browse files Browse the repository at this point in the history
* 20240429 @Mookse
- assets

* 20240429 @Mookse
wip stable

* 20240429 @Mookse
- assets

Signed-off-by: Erik Jespersen <mookse@gmail.com>

* 20240429 @Mookse
wip stable

Signed-off-by: Erik Jespersen <mookse@gmail.com>

* Update azure-deploy-prod_maht.yml

Updated version numbers

* Update azure-deploy-prod_maht.yml

updated azure/webapps-deploy to v3

* 20240507 @Mookse
- `Globals` improvement
- select help type
- submit help
- receive reponse
- cosmetic update of @module in ESDocs

* 20240511 @Mookse
- display chat/request response bubbles
- begin breakout of animations.css
- llm conectivity
- await css

* 20240512 @Mookse
- help chat refresh

* 20240512 @Mookse
- availableExperiences()
- launch tutorial button
- launchExperience event

* 20240513 @Mookse
- popup-container css

* 20240513 @Mookse
- env defaults to gpt-4o

* 20240513 @Mookse
- gpt updates
- improved message parsing
- cosmetic

* 20240513 @Mookse
wip unstable

* Version 0.0.6 Release (#198)

* 20240429 @Mookse
- assets

* 20240429 @Mookse
wip stable

* 20240429 @Mookse
- assets

Signed-off-by: Erik Jespersen <mookse@gmail.com>

* 20240429 @Mookse
wip stable

Signed-off-by: Erik Jespersen <mookse@gmail.com>

* 20240507 @Mookse
- `Globals` improvement
- select help type
- submit help
- receive reponse
- cosmetic update of @module in ESDocs

* 20240511 @Mookse
- display chat/request response bubbles
- begin breakout of animations.css
- llm conectivity
- await css

* 20240512 @Mookse
- help chat refresh

* 20240512 @Mookse
- availableExperiences()
- launch tutorial button
- launchExperience event

* 20240513 @Mookse
- popup-container css

* 20240513 @Mookse
- env defaults to gpt-4o

* 20240513 @Mookse
- gpt updates
- improved message parsing
- cosmetic

---------

Signed-off-by: Erik Jespersen <mookse@gmail.com>

* 20240513 @Mookse
- clean-up after wip

* 20240514 @Mookse
- vector store initial paint

* 20240514 @Mookse
- bug fix: system experiences frontend function

* 20240514 @Mookse
- multi-file upload button frontend

* 20240515 @Mookse
- pipeline to vector-store to attach files

* 20240515 @Mookse
- vector store attached to PA

* 20240515 @Mookse
- avatar upload() returns
```
{
 uploads: files,
 files: vectorstoreFileList,
 success: true,
}
```
- api adds:
```
{
 type: type,
 message: `File(s) [type=${ type }] uploaded successfully.`
}
```

* 20240515 @Mookse
- file-collection returned correctly on refresh

* 20240515 @Mookse
- file-collection displays

* 20240516 @Mookse
- HTML parsed in bubbles

* 20240516 @Mookse
- bot thread memory restored

* 197 version 007 updates (#208)

* 20240516 @Mookse
- alert background -> aliceblue

* 20240517 @Mookse
- `createBot` endpoint
- cosmetic

* 20240518 @Mookse
- `updateTools` becomes `updateAssistant`
- fix: merge error

* 20240518 @Mookse
- createBot, type=journaler succeeds

* 20240518 @Mookse
- icon asset

* 202401518 @Mookse
- journal-thumb.png
- cosmetic console clear

* 20240519 @Mookse
- entrySummary()

* 20240519 @Mookse
- cosmetic

* 20240519 @Mookse
- Teams placeholder
- addTeamMember()
- getAvailableTeamMembers(team)

* 20240520 @Mookse
- public/private avatar placeholder toggle
- cosmetic

* 20240521 @Mookse
- `greetings` pipeline
- cosmetic

* 20240521 @Mookse
- hotfix

* 20240521 @Mookse
- guest
``` javascript
document.addEventListener('DOMContentLoaded', event=>{
    /* load data */
    mLoadStart()
    /* display page */
    mShowPage()
})
```

* 20240521 @Mookse
- hotfix: registration restored

* 206-version-008-updates (#217)

* Emergency Hotfix: Azure deploy prod (#215)

* 20240429 @Mookse
- assets

* 20240429 @Mookse
wip stable

* 20240429 @Mookse
- assets

Signed-off-by: Erik Jespersen <mookse@gmail.com>

* 20240429 @Mookse
wip stable

Signed-off-by: Erik Jespersen <mookse@gmail.com>

* Update azure-deploy-prod_maht.yml

Updated version numbers

* Update azure-deploy-prod_maht.yml

updated azure/webapps-deploy to v3

* 20240507 @Mookse
- `Globals` improvement
- select help type
- submit help
- receive reponse
- cosmetic update of @module in ESDocs

* 20240511 @Mookse
- display chat/request response bubbles
- begin breakout of animations.css
- llm conectivity
- await css

* 20240512 @Mookse
- help chat refresh

* 20240512 @Mookse
- availableExperiences()
- launch tutorial button
- launchExperience event

* 20240513 @Mookse
- popup-container css

* 20240513 @Mookse
- env defaults to gpt-4o

* 20240513 @Mookse
- gpt updates
- improved message parsing
- cosmetic

* 20240513 @Mookse
wip unstable

* Version 0.0.6 Release (#198)

* 20240429 @Mookse
- assets

* 20240429 @Mookse
wip stable

* 20240429 @Mookse
- assets

Signed-off-by: Erik Jespersen <mookse@gmail.com>

* 20240429 @Mookse
wip stable

Signed-off-by: Erik Jespersen <mookse@gmail.com>

* 20240507 @Mookse
- `Globals` improvement
- select help type
- submit help
- receive reponse
- cosmetic update of @module in ESDocs

* 20240511 @Mookse
- display chat/request response bubbles
- begin breakout of animations.css
- llm conectivity
- await css

* 20240512 @Mookse
- help chat refresh

* 20240512 @Mookse
- availableExperiences()
- launch tutorial button
- launchExperience event

* 20240513 @Mookse
- popup-container css

* 20240513 @Mookse
- env defaults to gpt-4o

* 20240513 @Mookse
- gpt updates
- improved message parsing
- cosmetic

---------

Signed-off-by: Erik Jespersen <mookse@gmail.com>

* 20240513 @Mookse
- clean-up after wip

* 20240514 @Mookse
- vector store initial paint

* 20240514 @Mookse
- bug fix: system experiences frontend function

* 20240514 @Mookse
- multi-file upload button frontend

* 20240515 @Mookse
- pipeline to vector-store to attach files

* 20240515 @Mookse
- vector store attached to PA

* 20240515 @Mookse
- avatar upload() returns
```
{
 uploads: files,
 files: vectorstoreFileList,
 success: true,
}
```
- api adds:
```
{
 type: type,
 message: `File(s) [type=${ type }] uploaded successfully.`
}
```

* 20240515 @Mookse
- file-collection returned correctly on refresh

* 20240515 @Mookse
- file-collection displays

* 20240516 @Mookse
- HTML parsed in bubbles

* 20240516 @Mookse
- bot thread memory restored

* 197 version 007 updates (#208)

* 20240516 @Mookse
- alert background -> aliceblue

* 20240517 @Mookse
- `createBot` endpoint
- cosmetic

* 20240518 @Mookse
- `updateTools` becomes `updateAssistant`
- fix: merge error

* 20240518 @Mookse
- createBot, type=journaler succeeds

* 20240518 @Mookse
- icon asset

* 202401518 @Mookse
- journal-thumb.png
- cosmetic console clear

* 20240519 @Mookse
- entrySummary()

* 20240519 @Mookse
- cosmetic

* 20240519 @Mookse
- Teams placeholder
- addTeamMember()
- getAvailableTeamMembers(team)

* 20240520 @Mookse
- public/private avatar placeholder toggle
- cosmetic

* 20240521 @Mookse
- hotfix

---------

Signed-off-by: Erik Jespersen <mookse@gmail.com>
Signed-off-by: Erik Jespersen <42016062+Mookse@users.noreply.github.com>

* 20240521 @Mookse
- hotfix: registration restored

---------

Signed-off-by: Erik Jespersen <mookse@gmail.com>
Signed-off-by: Erik Jespersen <42016062+Mookse@users.noreply.github.com>

* 20240521 @Mookse
- wip

* 20240522 @Mookse
- JSON assets for journaler bot
  - entrySummary

* 20240522 @Mookse
wip stable

* 20240522 @Mookse
- validate registration pipeline
- ctx.request.query required JSON parsing

* 20240522 @Mookse
- confirmRegistration() closes loop on confirmation

* 20240523 @Mookse
- `globals.mjs`: create `createDocumentName`

* 20240523 @Mookse
- self-service registration finished

* 20240523 @Mookse
- fix: id created with avatar, not human name

* 20240523 @Mookse
- added thread_id for tracking to system-generated summaries

* 20240523 @Mookse
- frontend fix for chatInput bloat and shrink

* 20240523 @Mookse
- resize input box after submission

* 20240523 @Mookse
- resize input box after submission

* 20240523 @Mookse
- thread refix
- cosmetic

* 20240524 @Mookse
- cosmetic (fix memoir)

* 20240524 @Mookse
- fix: delimeter for mbr_id

* 20240523 @Mookse
- scrollable bot options

* 20240523 @Mookse
- cosmetic and nomenclature changes

* 20240524 @Mookse
- cosmetic microphone

* 20240524 @Mookse
- activebot name in connecting

* 20240525 @Mookse
- add globals.clearArray()

* 20240525 @Mookse
- refactor botContainer [part-1]

* 20240525 @Mookse
- scrollbar improvements

* 20240525 @Mookse
- hostedMembers update
- move `aboutContainer` to Globals
- move mLoginSelect to guests
- move `mChallengeError`, `mChallengeInput`, `mChallengeSubmit`  to guests
- removed extraneous HTML files, now embeded in Q

* 20240526 @Mookse
- remove contributions
- remove category(ies)
- remove local embedding [for now]

* 20240526 @Mookse
- signup overhaul

* 20240526 @Mookse
- refresh on first open of collection

* 20240527 @Mookse
- addMessages in members.mjs

* 20240527 @Mookse
- summarize document shortcut
- modified LLM to create thread on `getLLMResponse` (only)

---------

Signed-off-by: Erik Jespersen <mookse@gmail.com>
Signed-off-by: Erik Jespersen <42016062+Mookse@users.noreply.github.com>
  • Loading branch information
Mookse authored May 28, 2024
1 parent 1539745 commit f0d809e
Show file tree
Hide file tree
Showing 44 changed files with 2,144 additions and 1,388 deletions.
15 changes: 0 additions & 15 deletions inc/js/api-functions.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -158,20 +158,6 @@ async function library(ctx){
success: true,
}
}
/**
* Login function for member. Requires mid in params.
* @module
* @public
* @param {Koa} ctx - Koa Context object
* @returns {Koa} Koa Context object
* @property {string} ctx.body.challengeId
*/
async function login(ctx){
if(!ctx.params.mid?.length)
ctx.throw(400, `missing member id`) // currently only accepts single contributions via post with :cid
ctx.session.MemberSession.challenge_id = decodeURIComponent(ctx.params.mid)
ctx.body = { challengeId: ctx.session.MemberSession.challenge_id }
}
/**
* Logout function for member.
* @param {Koa} ctx - Koa Context object
Expand Down Expand Up @@ -362,7 +348,6 @@ export {
experiencesLived,
keyValidation,
library,
login,
logout,
register,
story,
Expand Down
44 changes: 24 additions & 20 deletions inc/js/core.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ class Member extends EventEmitter {
this.factory.on('avatar-init-end',(_avatar,bytes)=>{
console.log(chalk.grey(`Member::init::avatar-init-end|memory-size=${bytes}b`))
})
this.factory.on('on-contribution-new',(_contribution)=>{
console.log(chalk.grey(`Member::on-contribution-new`),_contribution.request)
})
}
// getter/setter functions
get abilities(){
Expand Down Expand Up @@ -100,13 +97,6 @@ class Member extends EventEmitter {
set consent(_consent){
this.factory.consents.unshift(_consent.id)
}
/**
* Gets Member Contributions, i.e., questions that need posing to Member
* @returns {array} returns array of Member Contributions
*/
get contributions(){
return this.#avatar?.contributions
}
get core(){
return this.factory.core
}
Expand Down Expand Up @@ -293,21 +283,35 @@ class MyLife extends Organization { // form=server
async getMyLifeSession(){
return await this.factory.getMyLifeSession()
}
/**
* Returns Array of hosted members based on validation requirements.
* @param {Array} validations - Array of validation strings to filter membership.
* @returns {Promise<Array>} - Array of string ids, one for each hosted member.
*/
async hostedMembers(validations){
return await this.factory.hostedMembers(validations)
}
/**
* Submits a request for a library item from MyLife via API.
* @public
* @param {string} _mbr_id - Requesting Member id.
* @param {string} _assistantType - String name of assistant type.
* @param {string} _library - Library entry with or without `items`.
* @param {string} mbr_id - Requesting Member id.
* @param {string} assistantType - String name of assistant type.
* @param {string} library - Library entry with or without `items`.
* @returns {object} - The library document from Cosmos.
*/
async library(_mbr_id, _assistantType, _library){
_library.assistantType = _assistantType
_library.id = _library.id && this.globals.isValidGuid(_library.id) ? _library.id : this.globals.newGuid
_library.mbr_id = _mbr_id
_library.type = _library.type??_assistantType??'personal'
const _libraryCosmos = await this.factory.library(_library)
return this.globals.stripCosmosFields(_libraryCosmos)
async library(mbr_id, assistantType='personal-avatar', library){
const { id, type, } = library
library.assistantType = assistantType
library.id = this.globals.isValidGuid(id)
? id
: this.globals.newGuid
library.mbr_id = mbr_id
library.type = type
?? assistantType
const _library = this.globals.stripCosmosFields(
await this.factory.library(library)
)
return _library
}
/**
* Registers a new candidate to MyLife membership
Expand Down
File renamed without changes.
File renamed without changes.
11 changes: 5 additions & 6 deletions inc/js/factory-class-extenders/class-extenders.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import{
mGetSceneNext,
} from './class-experience-functions.mjs'
import {
mAssignContent,
assignContent,
} from './class-message-functions.mjs'
/**
* Extends the `Consent` class.
Expand Down Expand Up @@ -143,7 +143,7 @@ function extendClass_conversation(originClass, referencesObject) {
this.#thread = thread
this.#botId = botId
this.name = `conversation_${this.#factory.mbr_id}_${thread.thread_id}`
this.type = this.type??'chat'
this.type = this.type ?? 'chat'
}
/* public functions */
/**
Expand Down Expand Up @@ -380,7 +380,6 @@ function extendClass_file(originClass, referencesObject) {
// self-validation
if(!this.contents && this.type=='text')
throw new Error('No contents provided for text file; will not store')
// save to embedder
}
// public getters/setters
// private functions
Expand All @@ -406,7 +405,7 @@ function extendClass_message(originClass, referencesObject) {
const { content, ..._obj } = obj
super(_obj)
try{
this.#content = mAssignContent(content ?? obj)
this.#content = assignContent(content ?? obj)
} catch(e){
console.log('Message::constructor::ERROR', e)
this.#content = ''
Expand All @@ -418,7 +417,7 @@ function extendClass_message(originClass, referencesObject) {
}
set content(_content){
try{
this.#content = mAssignContent(_content)
this.#content = assignContent(_content)
} catch(e){
console.log('Message::content::ERROR', e)
}
Expand All @@ -427,7 +426,7 @@ function extendClass_message(originClass, referencesObject) {
return this
}
get micro(){
return { content: this.content, role: this.role??'user' }
return { content: this.content, role: this.role ?? 'user' }
}
}
return Message
Expand Down
29 changes: 4 additions & 25 deletions inc/js/factory-class-extenders/class-message-functions.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @param {any} obj - Element to assign to `content` property
* @returns {string} - message text content
*/
function mAssignContent(obj){
function assignContent(obj){
const contentErrorMessage = 'No content found.'
const keyIncludes = ['category', 'content', 'input', 'message', 'text', 'value']
switch(typeof obj){
Expand All @@ -18,7 +18,7 @@ function mAssignContent(obj){
throw new Error(contentErrorMessage)
for(const element of obj){
try{
const content = mAssignContent(element)
const content = assignContent(element)
return content
} catch(e){
if(e.message===contentErrorMessage)
Expand All @@ -30,7 +30,7 @@ function mAssignContent(obj){
for(const key in obj){
try{
if(keyIncludes.includes(key)){
const content = mAssignContent(obj[key])
const content = assignContent(obj[key])
return content
}
} catch(e){
Expand All @@ -48,27 +48,6 @@ function mAssignContent(obj){
}
}
/* private module functions */
/**
* When incoming text is too large for a single message, generate dynamic text file and attach/submit.
* @module
* @private
* @param {string} _file - The file to construct.
* @returns
*/
async function mConstructFile(_file){
// construct file object
const __file = new (this.factory.file)({
name: `file_message_${this.id}`,
type: 'text',
contents: _file,
})
// save to embedder
return {
name: __file.name,
type: __file.type,
contents: await __file.arrayBuffer(),
}
}
/**
* Checks if content is a non-empty string.
* @module
Expand All @@ -81,5 +60,5 @@ function mIsNonEmptyString(content){
}
/* exports */
export {
mAssignContent,
assignContent,
}
Loading

0 comments on commit f0d809e

Please sign in to comment.