Skip to content

Hamilton action improvements for taking state in/out #10

@elijahbenizzy

Description

@elijahbenizzy

Problems with Hamilton integration:

  • We can't modify inputs from state
  • We can't modify outputs to state

Idea:

h = Hamilton( 
    inputs={"most_recent_item": from_state("all_items", process=lambda x: x[-1]) # get the last one
    outputs={"count": update_state("count", process=lambda count: count + 1)} # increments it
)

Also:

h = Hamilton(
    inputs=...,
    outputs=...,
    extra_updates=lambda result, state: ...
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/integrationsExternal integrations (LLMs, frameworks)kind/improvementImproving something that already existspriority/lowNice-to-have, backlog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions