Giter Club home page Giter Club logo

chatunitest-core-annotated's Introduction

πŸ“£ ChatUnitest Core

logo

English | δΈ­ζ–‡

Background

Many people have tried using ChatGPT to help them with various programming tasks and have achieved good results. However, there are some issues with using ChatGPT directly. Firstly, the generated code often fails to execute correctly, leading to the famous saying "five minutes to code, two hours to debug". Secondly, it is inconvenient to integrate with existing projects as it requires manual interaction with ChatGPT and switching between different platforms. To address these problems, we have proposed the "Generate-Validate-Repair" framework and implemented a prototype. Additionally, to make it easier for everyone to use, we have developed some plugins that can be seamlessly integrated into existing development workflows.

Overview

Overview

Steps to run

0. Add our dependency to pom.xml and config

<dependency>
    <groupId>io.github.ZJU-ACES-ISE</groupId>
    <artifactId>chatunitest-core</artifactId>
    <version>1.1.0</version>
</dependency>

1. Add the following dependency to pom.xml

<dependency>
    <groupId>io.github.ZJU-ACES-ISE</groupId>
    <artifactId>chatunitest-starter</artifactId>
    <version>1.4.0</version>
    <type>pom</type>
</dependency>

Design Your Custom Prompt

1.Create a Directory Containing Your Prompt Files Using Freemarker

Refer to the examples in src/main/resources/prompt:

initial.ftl serves as the initial prompt in the basic generation process. initial_system.ftl serves as the corresponding system prompt in the basic generation process.

extra.ftl and extra_system.ftl are designed for further extensions in the pipeline (currently not in use).

repair.ftl serves as the repair prompt in the repair process.

2. Update the Template Filenames in the config.properties File

PROMPT_TEMPLATE_INIT=initial.ftl
PROMPT_TEMPLATE_EXTRA=extra.ftl
PROMPT_TEMPLATE_REPAIR=repair.ftl

3. To Use an Extra Template, Extend the MethodRunner and Override the startRounds Method

Refer to the example in ChatTester Github Repository.

πŸ“§ Contact us

If you have any questions, please feel free to contact us via email. The email addresses of the authors are as follows:

  1. Corresponding author: zjuzhichen AT zju.edu.cn
  2. Author: yh_ch AT zju.edu.cn, xiezhuokui AT zju.edu.cn

chatunitest-core-annotated's People

Contributors

zzzghttt avatar nccurry30 avatar coder-chenzhi avatar bababa8910 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.