How return multiple generations from the LLMChain? #1786
Unanswered
arthureberledev
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey,
i have a simple supabase edge function (deno) with the following content:
My problem is that the "n" value doesn't change anything because
chain.call(...)
only returns the final answer even though i can see the multiple generations within the logs (when usingverbose: true
).This happens because of the way
chain.call
is implemented. It actually calls_getFinalOutput
which in turn returnsgenerations[0].text;
as you can see here: https://github.com/hwchase17/langchainjs/blob/78e00a363682d283a0a6445b9a655b8729ace9a1/langchain/src/chains/llm_chain.ts#L43Is there currently any way to return all generations from a chain call?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions