Giter Site home page Giter Site logo

mylife-services / mylife-maht Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 17.53 MB

MyLife Member Services Repository

Home Page: https://humanremembranceproject.org

License: MIT License

JavaScript 82.47% HTML 6.78% CSS 10.73% Dockerfile 0.01%
ai mylife digital-self maht openai openai-api openai-assistant-api artificial-intelligence biography culture

mylife-maht's People

Contributors

mookse avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

mookse

mylife-maht's Issues

Context Curiosity

Would like to instill an agent, upon population, to construct a curiosity of context, where it will try to ascertain its environment (in this case, MyLife) in order to flesh itself out - i.e., based upon where I am, and my description, what sort of data points, should "I" be aware of, and use some sort of external probing mechanic (questions in this case) to derive and summarize answers
like:
Finding oneself as an agent who is intending to represent someone professionally, what sort of core data is available and leverageable or where is more nuance presumed?

  1. system looks at core for professional data and summarizes
  2. evaluates own information for holes according to mothership 3-turbo [what keys are most relevant to: business professional]
  3. creates topics of outreach
  4. ask 1-3 questions [ready or not to summarize can be asked of 3-turbo]
  5. write data summary answer to self

guest interactions with member

need url scheme for the display of member-avatars as opposed to the logged-in variant currently built

  • /avatars/:avatarid
    • display if avatar exists
    • display if open to public, i.e., consensual arrangement between presumed visitor and object handshake
  • core flag property and avatar flag property for whether to display to public
    • unclear if we are into the settings mechanics yet or not, I don't think so

Persistent vm for agent-factory

architectural refactor

  • move relevant functionality from globals.js
  • ensure network connections are maintained and are more secure
  • identify new functionality and create issues

Member Session Agent

Need to proxy as [active] human, one per session (inactive would be separate, that would be animating

  • 'login' via .env
  • session core creation
    • watch scoping in ctx.session
    • sub-agent references via routes
  • build out /board routes, each of them leading to the MyLife Agent of 'them' instead of Maht...?
    • I think that makes sense...
  • response commands using 'Maht' and proxy (perhaps put var in called local command bot? i.e., mine would be Maht?)
  • how to handle such nested routes? Emit routes to parent? koa must have, need to set all sub-routes to ${sysName}

AI-Settings-Assistant

AI-Settings-Assistant

whether relating to settings of a specific agent or MyLife account (or potentially extrinsic asset), allows for intelligent modification or elucidation around a particular setting (or related group of settings)

  • activate purpose
    • be the best darn setting you can be! ergo, ensure you are consistent with user preference and methodology
  • +/-/~ per setting

Generic Prototype Additions

add prototype definitions to globals.js

  • generic classes are instantiated via code from JSON, so
    • add Agent prototypes when instantiating objects
    • this may be the best way to get the updated glue for .agent other dynamically constructed objects
  • chat should be subsidiary of agent

base->azure compatibility

if (typeof process.env._variable === 'undefined') {
  console.log('The "hi" environment variable is not defined');
}

Improved data categories

Person:

  • Background Facts (biological, historical)
  • Beliefs and Values
  • Personality Traits
  • Important Life Experiences
  • Preferences
  • Interests and Hobbies
  • Career and Professional Life
  • Skills and Abilities
  • Relationships
  • Goals and Aspirations
  • Challenges and setbacks
    Corporation
  • Mission & Vision
  • Principles/Values
  • Facts (+founding/history, -governance)
    • Personnel
    • Founding/History
    • Technology
    • Architecture
  • Governance
    • Organizational structure
    • Funding and financial information
    • Roadmap
    • Strategies
  • Programs and services
  • Partnerships and collaborations
  • Success Stories/Achievements
  • Membership
    • Get Involved
    • Audience/Beneficiaries

basic session management

introduced basic koa-session management

  • session is pulled down to ctx.state immediately upon request
  • state is read to generate prompts

Alpha Release Final Sprint

  • basic login fixed
  • challenge logic re-routed
  • avatar construction-logic
    • define minimal data requirements for avatar creation (see appropriate comment)
    • sign-up routine?
    • develop first consent object
      • create consent.json
      • assign unique functionalities in factory
        • allow()
          • currently returns simple boolean
      • #98
      • all consent objects instantiated by factory will be reported to session
        • special case: no getters/setters for this.consent in factory
        • instantiate through async factory function getConsent(_consent_id)
      • consent array will persist in session memory in this.#consents
      • insert object on access actions inside of factory
      • will function generally as pass-through/storage of permissions/consents for pre-alpha
      • capture e-signature for member, and contain basic system info on MyLife Membership such as license, code of conduct, etc.
      • note: consent objects are never exposed directly to anyone for modification except owning mbr_id for now; additionally, other than during configuration, they are not accessible to anything but the MyLife platform, they are always "behind-the-scenes" cartilage between objects/entities
    • populate
      • instructions: what parameters can define what to populate? Work with Maht to work up appropriate number of sentences and how to influence tone effectively (perhaps through chat samples as next describes?)
      • as example, categories should exist as metadata and their usage explained in instructions
    • create master file that outlines MyLife Membership and will be attached (with tool retrieval) to every
    • upload (to all familiar destinations) a file of historical member chats (when existing) and attach to agent build
  • #101
  • #106
    • be able to see the avatars that are assigned and constructed for various objects - avatars that represent cores are called personae (in front-end vernacular, back-end exists only as query for avatars against mbr_id_id as parent_id)
  • #107
  • #108
  • member-browser for logged in entities
    • protect with message?
    • change url exposure (obfuscate) for board examples?
  • member-controlled (frontend interface) object build (outline both innate (i.e., system built based on how member uses system opposite user-defined; both triggered by interface usage)
    • Core objects are reserved for members/MyLife, but anything can have an avatar that is not an avatar
    • Do agents need to be stored in Cosmos right away, or best left until having prove themselves in testing, i.e., they conduct enough activity to get saved
    • This is likely tied to the capacity to "build" objects (superintelligent or not) of any ilk
    • thinking of several levels: unintelligent bean objects(user?system?)? cosmos objects (user-built)? structural enhancements (member-built in source code)? Ecosystem plugins (partner objects by reference)? Eco-system objects (outsource?)?
      • who is able to "make" and/or "authorize" such objects. those I personally am familiar with? have shared with? [managed by consent, but here is example in action] -- objects coming up in generalized search for content/concepts/people/ideas
  • signup
    • incorporate age-range
  • incorporate age/age range

openai assistants connection

Build core infrastructure to include the GPT-assistant technology and the new SDK

  • reconnect all patterns to gpt-assistant architecture
  • assign _factory to session not Member/MyLife
    • factory pointer can be overwritten when logged in? but yes, should be contained in ctx.session as there will not be multiple factories per member session
    • PASSED 20231126 @Mookse
  • assign thread to session (logged in or otherwise)
    • thread acquisition should reside in _factory
    • PASSED 20231126 @Mookse
  • store messages in Cosmos
    • as conversations, matched by ids to avatar, ergo, if one needs to retrieve conversations per avatar, just search for parent_id
    • when creating thread, create conversation in Cosmos, then add to that object via thread.id (but cosmos threadId)

Agent (Type) Selection & Display

Since agents are the primary operators, as concierge service staff, one's MyLife interface itself is the face to the customer, but each agent has its own role and purpose - ergo, Q should give way to second agent when someone tries to register or is accessing their member account (unless it is so decided that Q should be fully capable of all of these tasks for now, which seems legitimate to me); in any case, a story-receiving agent is different than talking to your avatar is different than talking to Q

Interface:

  • create colored clickable area on or near the name Q, displaying unique
    • agent name (user pref?)
    • agent function
    • unique color (user pref)

Button

  • Hover
    • show more info: purpose of agent content
    • dropdown of available agents each with +/-/edit
  • Click
    • Select agent or +/-/edit

connection-agent v1.0

Connection-Agent

  • manages array of external API connections
    • OneDrive
    • Google Drive
  • CRUD given external API connection
  • frontend display interface (chat or click)
    • list API connections
    • +/-/~ per API connection

AI-Asset-Assistant

Asset Assistant

Upload functionality

Recently, openai released beta v2 of their GPT assistant tech; as a result, file structuring has changed, theoretically for the better, where they have the vector store, which obviates a branch of development internally for the moment. Original specifications are found now in comments

  • upload endpoint
    • routes.mjs: member-route only /upload
    • functions.mjs, api-functions.mjs: upload(ctx) function routes to avatar
      • storing in api-functions, with member validation wrapper
    • mylife-avatar.mjs: instantiates Asset Assistant
    • asset-assistant.mjs: enhance/refactor for new vector-store
    • mylife-factory.mjs: stores vectorstoreId to datacore
    • mylife-llm-services.mjs: upload(), list() from openAI
  • frontend upload
  • frontend collections: note - avoid local cosmos for now on this, everything from openAI
    • Asset Agent must be transferred to singleton for permanence of file assets
    • refresh triggers collection call
    • asset agent (via avatar) delivers file-list on-demand
    • upon collection receipt (or upload), update file-collection list

Minor Mods

  • chat-bubble linting in members.html
  • .gitignore linter

Refactor for Fine-Tuned Model

OpenAI has finally released fine-tuning for the turbo model we are using, so incorporate into an environment variable and run against intelligent model

  • original
    • gpt-3.5-turbo-0613
  • find-tuned
    • ft:gpt-3.5-turbo-0613:mylife-incorporated::87kbZHIQ

Upgrade few-shotting

Few shotting upgrades:

  • categories defined
    • Products, Services, Customer Support, Security, Business Info, Technology, Other
  • send to simpler engine (as LangChain'y PoC)
    • text-babbage-01
      • Give best category for Phrase about the nonprofit company MyLife.org
    • "Give best category for Phrase about the nonprofit company MyLife.org\nPhrase: user input"
    • store categorization choices in db field, so that I can see how it's doing
    • (this typeof) categorization data (for as long as needed) should be stored in agent primarily (here Q - it will endure for now in global), as these are the sorts of actions that would differ from vantage point, i.e., each agent would have its own categorization data or way of seeing the core personality

store direct chat q&a contents in Cosmos

store direct chat q&a contents in Cosmos

  • determine if different partition
  • build conversation data object
  • for now, generalized chat attached to core, later on, id's could be mapped to something other
    • parent_id: required, so if not specified assign to 'core' id:

Design and Build Core Service Models

Core Service Model

The core service model(s) should reflect basic ai-narration agent abilities. Before functionality can be built, the relational architecture for where to build the logic and how to separate it out comes into play. My preference is UML, but I don't have any programs that are both free and easy to use to my knowledge.

  • #89
  • AI-Assistant functionality development
  • AI-Story-Agent development
    • logical determination: owner? [this could ultimately get thorny, as it is the decision between visiting another member agent or crafting one's own, but keep simple for now]
    • define minimal requirements for interface and functionality
    • unique endpoints will establish UI/requirements
    • image build for story representation as part of dynamism

Out-of-Scope

add-ing an agent beyond those initially provided will not be part of this issue; this only provides for selection; presume however, that it would be implemented sensibly similarly

Maht "sensing"

Idea:
I believe that GPT at least is very capable of detecting tense or intense emotion. Use this, but transparently (ex. display to user in faint area of chat: sensing anger...)

Consent Object

  • build skeleton in JSON and server that manages the relationships between different-ownerships of underlying objects
    • how many consent ports would such an object have?

create settings JSON-schema type

  • capture initial MyLife settings in order to start exposing them (and changes) to gui AI
  • should be linked to member core
  • Maht's settings would be unique? but show pathway for other org entities inside/outside HRP

Flag for Unlikely Untruths

Given ai hallucinations, have a mechanic to submit back about incorrect information about an individual, in our cases, either ourselves, or someone we know
Incidents should then be summarized and available presenting a review/improve mechanic for fine-tuning
Must work for all agents (MyLife, Board[#x], Member)

Incorporate pgvector data

  • Interface access to local containers
  • incorporate data into request chain
    • before fine-tuned gpt-3.5
    • A/B test using different language, as well as having different roles assert content from PGvector
    • think of ways to confirm/validate? Make sure temperature is bound

create azure-deployable branch

According to gpt, best plan would be to move env variables to azure application space, and remove npm package from production and limit it to save-dev

Issue with 'you' in human agent reflection

Issue

When asking a question of a human-representing agent, 'you' is getting confused in gpt

Solution

convert all you phrasing to first name when question is indicated
consider whether to use extremely cheap model to categorize or reframe

onStartSession

when session starts, sniff first request in order to determine whether question or statement -- if statement, then add: how can MyLife help?

move envVars to Cosmos

aside from bootup security, move keys, etc to cosmos
-- follow-on=hash security items

Docker Image Creation

create docker assets

  • Dockerfile
  • .dockerignore

for image to be sent to Docker Hub
mookse/mylife-server
MyLife's Q-server is an AI project in proto-alpha stage as we build the engine and train the models.

Add Moderation to chat requests

when not issuing commands to local outcomes, add moderation to chat requests, see documentation, it should be free from openAI
Moderation Documentation

Additionally, what we would want to do is take the response types, and maybe have GPT create a response that is about MyLife values, philosophy and mission

Agent Selection Mechanism

  • frontend design
    • add agent selection widget
      • options: MyLife Q, Digital Self, Narration-AI
      • also include any custom agents by agent type (question, chat, etc.)
    • hover, etc. actions upon selection
    • make call to pipeline
    • update page
  • route endpoint(s)
    • add routes under /member/:mid/:agentid
      • default agentid = core system agent
  • backend handling
    • permissions
    • session-memory swapping as required by agent-swap request

bug: db capitalization

  • hotfix required for cosmos
  • db capitalization wrong in code for chatExchange, chatSnippet

agent-factory

Factory takes requests for objects and returns a ready-to-create class
manages following types

  • avatars
  • assistants
  • agents (anything represented in noSQL)
  • hypernatural objects? [things like the factory itself, that have no JSON representation]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.