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

feature/use functions not operators #1171

Merged
merged 6 commits into from
Nov 7, 2024

Conversation

gecBurton
Copy link
Collaborator

Context

As an Software-Engineer I am intimidated and confused by operators, lets use functions?

Changes proposed in this pull request

Guidance to review

Relevant links

Things to check

  • I have added any new ENV vars in all deployed environments
  • I have tested any code added or changed
  • I have run integration tests

@jamesrichards4
Copy link
Contributor

I like the refactor but those functions aren't handling the state they take some intermediate object which only makes sense in llm_chain. Could we use _get_text/_get_tools/etc and add an all to the module to make sure they're only used internally?

Also to go the extra step we can do:

@RunnableLamba def get_text(state: dict): pass
then we don't have to wrap it in RunnableLambda() as it's already a runnable

@gecBurton
Copy link
Collaborator Author

I really like your suggestions @jamesrichards4 and i think we can go one better still 2e27256

redbox-core/redbox/transform.py Outdated Show resolved Hide resolved
redbox-core/redbox/transform.py Outdated Show resolved Hide resolved
gecBurton and others added 2 commits November 7, 2024 10:29
Co-authored-by: James Richards <39167172+jamesrichards4@users.noreply.github.com>
Co-authored-by: James Richards <39167172+jamesrichards4@users.noreply.github.com>
@gecBurton gecBurton merged commit 55c9629 into main Nov 7, 2024
6 checks passed
@gecBurton gecBurton deleted the feature/use-functions-not-operators branch November 7, 2024 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants