From 3a81e492b1a820a1514ab4d5e88b967655ae9691 Mon Sep 17 00:00:00 2001 From: Shroominic Date: Sun, 8 Oct 2023 13:11:58 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20improve=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 89e3140..1e8c600 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,19 @@ # funcchain -🔖 write langchain prompts as python functions +```bash +> pip install funcchain +``` + +## Introduction + +`funcchain` is the *most pythonic* way of writing cognitive systems. Leveraging pydantic models as output schemas combined with langchain in the backend allows for a seamless integration of llms into your apps. +It works perfect with OpenAI Functions and soon with other models using JSONFormer. ## Demo ```python -from langchain.pydantic_v1 import BaseModel, Field from typing import Union, List +from langchain.pydantic_v1 import BaseModel, Field from funcchain import chain class Item(BaseModel): @@ -44,8 +51,33 @@ if isinstance(lst, ShoppingList): if isinstance(lst, TodoList): print("Here is your Todo List: ") - for item in lst.items: + for item in lst.todos: print(f"{item.name}: {item.description}") print(f"Urgency: {lst.urgency}") ``` + +## Features + +- increased productivity +- prompts as Python functions +- pydantic models as output schemas +- langchain schemas in the backend +- async support +- fstrings or jinja2 templates for prompts +- fully utilises OpenAI Functions +- minimalistic and easy to use + +## Documentation + +Coming soon and feel free to contribute + +## Contribution + +You want to contribute? That's great! Please run the dev setup to get started: + +```bash +> git clone https://github.com/shroominic/funcchain.git && cd funcchain + +> ./dev_setup.sh +```