-
Notifications
You must be signed in to change notification settings - Fork 112
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
Batch render user/agent messages & content fragments #2681
Conversation
743ad37
to
32ad485
Compare
const agents = ( | ||
await Promise.all( | ||
agentConfigurationIds.map(async (agentConfigId) => { | ||
return await getAgentConfiguration(auth, agentConfigId); |
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.
I took a shortcut here, WDYT? I think it's worth shipping with it and iterate if we want to optimize again.
); | ||
return await Promise.all( | ||
agentRetrievalActionIds.map(async (agentRetrievalActionId) => { | ||
return await renderRetrievalActionByModelId(agentRetrievalActionId); |
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.
Same kind of shortcut here!
141aa77
to
d2de821
Compare
* code simplification * nit * clean-up
10d62aa
to
763d715
Compare
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.
LGTM
@@ -498,6 +498,9 @@ Message.init( | |||
unique: true, | |||
fields: ["conversationId", "rank", "version"], | |||
}, | |||
{ | |||
fields: ["conversationId"], |
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.
Should be covered by the index above?
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.
I removed it and instead I updated the query to fetch the reactions to load only the sId of messages, which is the only field we use.
b530934
to
1ef9172
Compare
No description provided.