Readme

This val is part of a series of examples to introduce "val.town" in my computer science course at Stuttgart University of Applied Sciences.

The idea is to motivate even first-semester students not to wait but to put their ideas into practice from the very beginning and implement web apps with frontend and backend.

It contains a simple HTTP end point which expects a POST request with a JSON structure containing the properties "SystemMessage" and "UserMessage". These message are then used to run an OpenAI chat completion and produce an "assistant message" which is sent back to the client as plain text.

This val is the companion of

https://rozek-gdi_aichatcompletion.web.val.run/

which contains the browser part (aka "frontend") for this example.

The code was created using Townie - with only a few small manual corrections.

This val is licensed under the MIT License.

Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!