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

Biographer Thread Lost #201

Closed
Tracked by #197
Mookse opened this issue May 16, 2024 · 4 comments · Fixed by #203
Closed
Tracked by #197

Biographer Thread Lost #201

Mookse opened this issue May 16, 2024 · 4 comments · Fixed by #203
Assignees
Labels
bot bug Something isn't working required functionality required for primary pre-alpha release to family and friends

Comments

@Mookse
Copy link
Member

Mookse commented May 16, 2024

Thread is getting lost (new one created) every exchange at local dev - might have to do with save or if, correct asap

  • could be front-end payload where id=null
@Mookse Mookse mentioned this issue May 16, 2024
9 tasks
@Mookse Mookse self-assigned this May 16, 2024
@Mookse Mookse added bug Something isn't working required functionality required for primary pre-alpha release to family and friends bot labels May 16, 2024
@Mookse Mookse moved this from Open to In Development in MyLife Alpha-Talc May 16, 2024
@Mookse Mookse changed the title Thread is getting lost (new one created) every exchange Biographer Thread Lost May 16, 2024
@Mookse
Copy link
Member Author

Mookse commented May 16, 2024

  • MemberSession has no such thing as thread... should be avatar, but not really relevant here - fix.
async function chat(ctx){
	ctx.state.chatMessage = ctx.request.body
	ctx.state.thread = ctx.state.MemberSession.thread
	const message = ctx.request.body?.message ?? false /* body has all the nodes sent by fe */
	if(!message?.length)
			ctx.throw(400, 'missing `message` content')
	const response = await ctx.state.avatar.chatRequest(ctx)
	ctx.body = response
}

1 similar comment
@Mookse
Copy link
Member Author

Mookse commented May 16, 2024

  • MemberSession has no such thing as thread... should be avatar, but not really relevant here - fix.
async function chat(ctx){
	ctx.state.chatMessage = ctx.request.body
	ctx.state.thread = ctx.state.MemberSession.thread
	const message = ctx.request.body?.message ?? false /* body has all the nodes sent by fe */
	if(!message?.length)
			ctx.throw(400, 'missing `message` content')
	const response = await ctx.state.avatar.chatRequest(ctx)
	ctx.body = response
}

@Mookse
Copy link
Member Author

Mookse commented May 16, 2024

async function chat(ctx){
	const message = ctx.request.body?.message
		?? false /* body has all the nodes sent by fe */
	if(!message?.length)
			ctx.throw(400, 'missing `message` content')
	const response = await ctx.state.avatar.chatRequest(message)
	ctx.body = response
}

@Mookse
Copy link
Member Author

Mookse commented May 16, 2024

See file alterations in branch for fix. Entire handshake was broken between frontend (sending null) to backend not pre-creating conversations it knew it could undertake from thread ids found in bots.

  • frontend: bots.mjs manages and shares its image of active bot which gets sent in payloads
  • backend: avatar initialization for non-mylife instances pre-seeds potential conversations

@Mookse Mookse closed this as completed May 16, 2024
@github-project-automation github-project-automation bot moved this from In Development to Done in MyLife Alpha-Talc May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot bug Something isn't working required functionality required for primary pre-alpha release to family and friends
Projects
Status: Done
1 participant