Proposal: changing the Chain interface to support types #1073
amitaifrey
started this conversation in
General
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.
-
Currently the
Chain
interface is defined as follows:The interface assumes the following:
InputKeys
.map[string]any
.GetOutputKeys()
function (and sometimes previous knowledge), extract the relevant result from themap[string]any
.I believe this interface could be changed to be more useful. I propose the following:
By typing the interface, we achieve the following:
GetOutputKeys()
.*Note that we still return a
map[string]any
from theCall
function for returning values other than the response itself.This would result in a breaking change for this interface, however I believe this would increase the usability of the library and would encourage more users to use it. What are your thoughts?
Beta Was this translation helpful? Give feedback.
All reactions