Discover and explore top open-source AI tools and projects—updated daily.
Dynamic code generation for Python objects
Top 52.6% on SourcePulse
GREMLLM provides a dynamic object-oriented interface for interacting with Large Language Models (LLMs), enabling on-the-fly method and property generation based on LLM reasoning. It targets developers seeking to create fluid, chainable, and self-modifying code structures, offering "wet mode" for continuous method chaining and "verbose mode" for LLM-generated code transparency.
How It Works
GREMLLM intercepts every method call and attribute access, routing them through an LLM to dynamically generate and execute Python code. This approach allows objects to exhibit emergent behavior, implementing functionality as needed. "Wet mode" enhances this by returning LLM-generated objects instead of primitive types, facilitating infinite chaining of operations.
Quick Start & Requirements
pip install gremllm
llm keys set <provider>
to configure LLM access.example/counter.py
and example/cart.py
.Highlighted Details
llm
library.Maintenance & Community
The project appears to be a personal endeavor with limited community engagement signals in the README. The author expresses surprise that it works and encourages users to share their experiences.
Licensing & Compatibility
The README does not explicitly state a license.
Limitations & Caveats
The project's author expresses significant uncertainty about its stability and practical use ("please don't use this"). The dynamic nature of LLM-generated code can lead to unpredictable behavior and potential errors.
2 months ago
1 week