3 ms·
Show HN: Dhenara – A Simple, TypeSafe Open Source Alternative to LangChain
Hello Everyone,
Yesterday, we published our PyPI package named dhenara. This is a lightweight, straightforward framework for integrating multiple AI models into Python applications. It’s similar in spirit to LangChain but with a focus on simplicity and minimal dependencies.
This package is in a decent state, we have already integrated this into our production code for our multi provider chat-bot app (DhenChat) and works smoothly there.
Here are some features:
- Genuinely Open Source: Built from the ground up as a community resource, not an afterthought or internal tool
- Unified API: Interact with different AI providers through a consistent interface
- Type Safety: Built with Pydantic for robust type checking and validation
- Easy Regeneration across Providers: With a unified Pydantic output and built-in prompt formatting, send output from a model to any other model easily
- Streaming: First-class support for streaming responses along with accumulated responses similar to non-streaming responses
- Async Support: Both synchronous and asynchronous interfaces for maximum flexibility
- Resource Management: Automatic handling of connections, retries, and timeouts
- Foundation Models: Pre-configured models with sensible defaults
- Test Mode: Bring up your app with dummy responses for streaming and non-streaming generation
- Cost/Usage Data: Derived cost and usage data along with responses, with optional charge for each model endpoint for commercial deployment
Would appreciate your thought and feedback on this.
Thanks,
Ajith