AiAssistant uses OpenAI client and provides 2 endpoints: /api/v1/CodeStyle/FixStyle - for fixing the style of a code snippet according to Code Conventions /api/v1/UnitTests/Generate - for creating unit tests for provided code snippet
For this project you need to have a working API key for OpenAI API
- Clone project from "https://github.com/Kolfer/AiAssistant.git".
- Navigate to appsettings.json file in solution root.
- Insert your OpenAI API key into AppSettings:ApiKey.
- If you want, you can change OpenAI model in AppSettings:Model (By default the "gpt-3.5-turbo" is used).
- Start the application.
- You will be redirected to Swagger UI page, where you can choose an endpoint.
- Press "Try it out" button.
- Enter code snippet in "Code" field and press "Execute" button.
- You will see the result in Responses below.