Show HN: Trellis – open-source Python framework to build DAG-based LLM workflows https://ift.tt/Tt3HWeK
Show HN: Trellis – open-source Python framework to build DAG-based LLM workflows Hey HN! Trellis is an open-source framework for programmatically orchestrating LLM workflows as Directed Acyclic Graphs (DAGs) in Python. My friend and I started working on this a few weeks ago after we tried building applications using mainstream LLM frameworks, and faced all the common complaints (too abstracted, hard to customize, bad docs/support). After talking to a few other people building with LLMs, we also noticed that these frameworks were not inherently built to support DAG-based LLM workflows. We designed Trellis to be as minimal and flat as possible, so developers can have lower level control over their DAGs. Trellis is composed of only three abstractions: Node, DAG, and LLM. Node: the atomic unit of Trellis. Nodes are chained together to form a DAG. Node is an abstract class with only one method required to implement. DAG: a directed acyclic graph of Nodes. It is the primary abstraction for orchestrating LLM workflows. When you add edges between Nodes, you can specify a transformation function to reuse Nodes and connect any two Nodes. Trellis verifies the data flowing between Nodes in a DAG to ensure the flow of data is validated. LLM: a wrapper around a large language model with simple catches for common OpenAI errors. Currently, the only provider that Trellis supports is OpenAI. Check out our docs if this sounds interesting: https://ift.tt/BR1eL30... We'd love it if you tried hacking with it and give us any feedback you have! :) https://ift.tt/UGzMCm9 September 6, 2023 at 03:04AM
No comments