-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat: add builtin vf-memory variable (CT-000) #698
Conversation
lib/services/aiAssist.ts
Outdated
} | ||
|
||
static stringifyTranscript(messages: BaseUtils.ai.Message[]) { | ||
return messages.map(({ role, content }) => `${role}: ${content.replaceAll('\n', ' ')}`).join('\n'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replacing new lines with spaces to make the format easier to understand for AI
return messages.map(({ role, content }) => `${role}: ${content.replaceAll('\n', ' ')}`).join('\n'); | |
return messages.map(({ role, content }) => `${role}: ${content.replaceAll('\n', ' ')}`).join('\n'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the newline is actually okay, Denys did some testing
if (isPathRequest(request)) { | ||
return request.payload.label ?? null; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use button's label as user message
|
bors r+ |
<!-- You can erase any parts of this template not applicable to your Pull Request. --> **Fixes or implements VF-XXX** ### Brief description. What is this change? <!-- Build up some context for your teammates on the changes made here and potential tradeoffs made and/or highlight any topics for discussion -->
Build failed: |
bors r+ |
<!-- You can erase any parts of this template not applicable to your Pull Request. --> **Fixes or implements VF-XXX** ### Brief description. What is this change? <!-- Build up some context for your teammates on the changes made here and potential tradeoffs made and/or highlight any topics for discussion -->
🎉 This PR is included in version 1.212.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Build failed: |
Caused by: #698 The `isPathRequest` guard did not assert a payload label existed, so when using that in the ai memory variable the types indicate that payload will be there. ![image](https://github.com/voiceflow/general-runtime/assets/15315657/b2e59242-c146-4c11-a4d9-148438cadaa4) So accessing `payload.label` resulted in a "Cannot read payload from undefined" error. This change adds a `payload.label` check to guard itself, as the typing for `payload` is wrong, and could be null or undefined. ![image](https://github.com/voiceflow/general-runtime/assets/15315657/eac325bf-1b69-4e6b-b7c0-296987f61e47) See: #690 Co-authored-by: Tyler Stewart <git@tylerstewart.ca>
Fixes or implements VF-XXX
Brief description. What is this change?
Implementation details. How do you make this change?
Setup information
Deployment Notes
Related PRs
Checklist