Bring vibes into your code: LLM-powered if-statements and loops!
Project description
VibeGen
Table of Contents
Introduction
VibeGen is a lightweight python package that allows users to use natural language (LLMs) to generate responses for functions that are described but not implemented. It acts as a decorator that intercepts function calls and uses an LLM to generate a plausible return value based on the function's signature and docstring.
It supports OpenAI and Google Gemini clients currently, and a simple example illustrating how it can be used is shown below:
from google import genai
from vibegen import VibeGen
# initialize client
client = genai.Client(api_key=GEMINI_API_KEY)
# wrap it in VibeGen
vg = VibeGen(client, model="gemini-2.0-flash-lite")
@vg
def get_antonym(word: str) -> str:
"""
This function takes a word and returns its antonym.
For example, the antonym of 'hot' is 'cold'.
"""
pass
# a simple example that gets the antonym of a word
user_input = input("Enter a word:")
antonym = get_antonym(user_input)
print(f"The antonym of {user_input} is {antonym}")
VibeGen is published on pypi and can be easily installed with:
python3 -m pip install vibegen
Features
- Function Mocking: Automatically generate responses for functions that are described but not yet implemented.
- Natural Language Implementation: Use docstrings to define the behavior of your functions in natural language.
- Multi-provider Support: Seamlessly switch between different LLM providers. VibeGen currently supports OpenAI and Google Gemini.
- Type Hint Enforcement: Ensures that the generated response strictly matches the declared return type of the function.
Technologies
Technologies used by VibeGen are as below:
Done with:
Python
Project Repository
https://github.com/vibe-engineers/vibegen
Team
Contributing
If you are looking to contribute to the project, you may find the Developer Guide useful.
In general, the forking workflow is encouraged and you may open a pull request with clear descriptions on the changes and what they are intended to do (enhancement, bug fixes etc). Alternatively, you may simply raise bugs or suggestions by opening an issue or raising it up on discord.
Note: Templates have been created for pull requests and issues to guide you in the process.
Others
For any questions regarding the implementation of the project, you may also reach out on discord.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vibegen-1.0.0.tar.gz.
File metadata
- Download URL: vibegen-1.0.0.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
666d4d8fd50842f7c5531504549a54f2b53b0d18a2d841234757d2c2e33f8d9a
|
|
| MD5 |
3bc229f89eea364f7bc3d7d931465402
|
|
| BLAKE2b-256 |
1d0a37b813d081cfd23041f1b604a8c765378966be7912fbf0863424b6e0e2e7
|
File details
Details for the file vibegen-1.0.0-py3-none-any.whl.
File metadata
- Download URL: vibegen-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e731284f77501138715a15b0b7ea846c619f3d46acc90dd18c794d100027712
|
|
| MD5 |
ea4d439f47acdf932fa275599ea9b04a
|
|
| BLAKE2b-256 |
346eacb79a575fbdbc89b8d41cceb928a855784a8bbde1db0cc3a717481756ce
|