srush / MiniChain

A tiny library for coding with large language models.
https://srush-minichain.hf.space/
MIT License
1.19k stars 74 forks source link

V0.2 of MiniChain #10

Closed srush closed 1 year ago

srush commented 1 year ago

v0.2 is a breaking rewrite of the MiniChain library. The main idea is to really make it easy for users to chain together prompts as functions. Because of this, I moved away from the class API and to a decorator based approach. In some sense this is more like the Pytorch way of making graphs, where the user simply calls each of the functions and behind the scenes the model traces the interactions. This also makes it easier to pass prompt / non-prompt information with each call.