funcchain  by shroominic

SDK for building cognitive systems with Python

created 1 year ago
339 stars

Top 82.4% on sourcepulse

GitHubView on GitHub
Project Summary

Funcchain provides a Pythonic framework for building cognitive systems by integrating Large Language Models (LLMs) with Pydantic models for structured output. It targets developers looking to seamlessly embed LLM capabilities into their applications, offering a simplified syntax that compiles into Langchain runnables for efficient pipeline execution.

How It Works

Funcchain leverages Pydantic models as output schemas, enabling LLMs to generate data in a structured, type-safe format. It supports OpenAI Functions and LlamaCpp grammars for efficient structured output generation. The library compiles its custom syntax into Langchain Expression Language (LCEL) runnables, allowing for easy invocation, streaming, and batch processing of LLM-driven workflows.

Quick Start & Requirements

Highlighted Details

  • Pythonic syntax with native Python features for prompt definition.
  • Supports dynamic output types, including nested Pydantic models and union types.
  • Integrates vision model capabilities for image analysis.
  • Seamlessly supports local LLMs via Ollama and GGUF downloads from Hugging Face.
  • Offers Langsmith support, auto-retries, and composability with Langchain LCEL.

Maintenance & Community

Licensing & Compatibility

  • MIT License.
  • Permissive license suitable for commercial use and integration into closed-source applications.

Limitations & Caveats

The library relies heavily on the LLM's ability to adhere to the specified output schema; complex or ambiguous schemas may lead to parsing errors or unexpected outputs. While it supports local models, performance and reliability will vary based on the chosen model and hardware.

Health Check
Last commit

8 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
1
Star History
3 stars in the last 90 days

Explore Similar Projects

Starred by John Resig John Resig(Author of jQuery; Chief Software Architect at Khan Academy), Travis Fischer Travis Fischer(Founder of Agentic), and
1 more.

instructor-js by 567-labs

0%
738
Typescript tool for structured extraction from LLMs
created 1 year ago
updated 6 months ago
Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Didier Lopes Didier Lopes(Founder of OpenBB), and
5 more.

lmql by eth-sri

0.2%
4k
LMQL: Language for constraint-guided LLM programming
created 2 years ago
updated 2 months ago
Starred by Tobi Lutke Tobi Lutke(Cofounder of Shopify), Stas Bekman Stas Bekman(Author of Machine Learning Engineering Open Book; Research Engineer at Snowflake), and
21 more.

guidance by guidance-ai

0.1%
21k
Guidance is a programming paradigm for steering LLMs
created 2 years ago
updated 1 day ago
Feedback? Help us improve.