Skip to content

vibe-engineers/vibegen

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.

About

Fake it till you make it: LLM-powered function stubs with vibes.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages