Files
HugoCasa 2f3138c65d feat: flow copilot (#2219)
* chore: refactoring

* feat: hub embeddings search benchmark

* feat: flow copilot v0

* feat: as trigger schedule + refactoring

* feat: improvements

* fix: remove unecessary filter

* feat: UX improvements

* fix: frontend check

* feat: switch to bun + other improvements

* fix: improve reactivity
2023-09-07 18:03:48 +02:00
..
2023-09-07 18:03:48 +02:00

Test sample queries of the AI feature

Setup

Create a virtual environment python -m venv .venv, activate it source .venv/bin/activate and install the requirements pip install -r requirements.txt. Put your OPENAI_API_KEY in .env.

Run

Run the script python src/gen_samples.py and check the results in sample_answers.yaml.

Add queries

You can add more queries in sample_queries.yaml. There are three types of queries:

Generate code from a prompt

- type: gen
  description: hello world
  lang: python3

Modifiy code according to a prompt

- type: edit
  description: comment
  lang: python3
  code: |-
    print("hello world")

Fix code given an error

- type: fix
  lang: python3
  code: |-
    def main():
        return 3 / 0
  error: division by zero