Settings

Theme

Show HN: Tzap – Simple contextual code generation

tzap.io

4 points by Alexanfa 3 years ago · 2 comments · 2 min read

Reader

One of the notable limitations of GPT when generating code is its generic answers; to remedy this we've built Tzap. We index your entire repository using embeddings which enables GPT to give contextual code suggestions. Just ask it a very specific question, and it'll generate a solution that fits your codebase seamlessly.

For instance, you can ask Tzap, "How do I implement a new endpoint that enables customers to pay and add a Stripe subscription?". Regardless of your backend setup—be it GraphQL, Express, or Java Spring — Tzap will search your existing code and endpoints and propose a contextualised Stripe subscription solution.

Or, you might be looking to refactor some dependencies; just query Tzap with "In 'file_name.a' I have 'function x' that is depended on by 'file_name.b' and 'file_name.c', refactor away this dependency", and watch it do the magic.

Tzap functions: * tzap prompt: Indexes your entire repository * tzap commit: Applies semantic Git commit messages based on a Git diff * tzap search: Search in natural language and find things like where you defined or used a particular variable or function, e.g., "Where did I define 'User'?" or "Where did I use 'User'?".

We'd love to hear about how you're using GPT and if we can help you out!

gustavolmo 3 years ago

The tool is quite powerful, I did some testing and it refactored my code beautifully. A question though, is there a limit on how large my codebase can be since there is a limit of tokens in GPT I/O

  • AlexanfaOP 3 years ago

    Hey! We did some texting on https://github.com/twitter/the-algorithm without issues(*), that was around 150K lines of code.

    And it works great, I wish I knew more domain details about twitter to be able to really leverage it, but it quickly finds parts of your system and how to build features like "removing echo chambers from the-algorithm by recommending posts to a broader audience that is likely to have opposing views and interact with others."

    I think one of our users tried indexing their internal code on about 200k LOC.

    The outputs are however limited to 4k or 8k depending on what model you use.

    *(initial indexing might be slow and re-indexing might need to be disabled)

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection