Experimental work with AI-assisted code generation.
This repository contains the following directories:
1- all_codebase
: LF files for all target languages, extracted from the Playground repository [https://github.com/lf-lang/playground-lingua-franca].
2- python_codebase
: LF files for Python target. It's a subdirectory of all_codebase
.
3- lib
: LF file implementing an Accelerometer
reactor for the C
target. To be used by the DropSensor
reactor for the C
target. The DropSensor
reactor code will be automatically generated in the following.
You should have python3 installed.
Create a virtual environment named .env
:
python3 -m venv .venv
You need an OpenAI Key to use LLMs like gpt-4.
Copy the .env.example
to .env
:
cp .env.example .env
Edit the .env
file and add your OpenAI API Key:
OPENAI_API_KEY='your_OpenAI_AP_Key'
- Open the NoteBook
Context_Engineering4LF.ipynb
. - On the right corner click on
select kernel
and choose the.env
kernel. - Run all cells.