You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a tough one to fix because each template render is executed independently and in parallel during request build. The solution would probably be to scan all parsed templates at the start of the request, and collect all used chains into a de-duplicated pool. Then resolve those chain values first, before finally rendering the templates themselves. This has the added benefit of de-duplicating other chain types too (e.g. if a slow shell command is chained, it won't have to execute multiple times).
It's very possible, just requires rearchitecting the template code a fair amount.
If the same chained prompt value is used multiple times in a request, it prompts once per usage. It should only prompt once per request.
This is a tough one to fix because each template render is executed independently and in parallel during request build. The solution would probably be to scan all parsed templates at the start of the request, and collect all used chains into a de-duplicated pool. Then resolve those chain values first, before finally rendering the templates themselves. This has the added benefit of de-duplicating other chain types too (e.g. if a slow shell command is chained, it won't have to execute multiple times).
It's very possible, just requires rearchitecting the template code a fair amount.
futures::future::shared may be helpful for caching the futures.
The text was updated successfully, but these errors were encountered: