Skip to content
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

Support evaluating runnables and arbitrary functions #8698

Merged
merged 15 commits into from
Aug 4, 2023

Conversation

hinthornw
Copy link
Collaborator

@hinthornw hinthornw commented Aug 3, 2023

Added a couple of "integration tests" for these that I ran.

Main design point of feedback: at this point, would it just be better to have separate arguments for each type? Little confusing what is or isn't supported and what is the intended usage at this point since I try to wrap the function as runnable or pack or unpack chains/llms.

run_on_dataset(
...
llm_or_chain_factory = None,
llm = None,
chain = NOne,
runnable=None,
function=None
):
# raise error if none set

Downside with runnables and arbitrary function support is that you get much less helpful validation and error messages, but I don't think we should block you from this, at least.

@vercel
Copy link

vercel bot commented Aug 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Aug 3, 2023 6:35pm

@dosubot dosubot bot added the 🤖:improvement Medium size change to existing code to handle new use-cases label Aug 3, 2023
@hinthornw hinthornw marked this pull request as ready for review August 3, 2023 16:06
@hinthornw hinthornw marked this pull request as draft August 3, 2023 16:06
@hinthornw hinthornw marked this pull request as ready for review August 3, 2023 16:39
@hinthornw hinthornw marked this pull request as draft August 3, 2023 18:34
@hinthornw hinthornw marked this pull request as ready for review August 3, 2023 21:34
Copy link
Contributor

@hwchase17 hwchase17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im reviewing super fast but is it possible that it may be cleaner to branch at a higher level rather than pass around the duck type everywhere?

@hinthornw
Copy link
Collaborator Author

Probably - i'll think about it. Would want to still retain the key checking where available

@hinthornw hinthornw merged commit c8f3615 into master Aug 4, 2023
23 checks passed
@hinthornw hinthornw deleted the wfh/support_runnables branch August 4, 2023 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:improvement Medium size change to existing code to handle new use-cases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants