Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 1.63 KB

README.md

File metadata and controls

28 lines (21 loc) · 1.63 KB

generate-project-speculations

generate-project-speculations is an Edge Function that generates fictitious and bittersweet sentences about a project using the OpenAI API.

To see the rules for the sentences generated by this function, see this file.

HTTP Codes

HTTP Code Description Details
200 OK When the sentences are successfully generated.
204 No Content When the project already has speculations generated and no new ones are needed.
400 Bad Request Any error from the API that results from a malformed or invalid request.
405 Method Not Allowed When the method used in the request is not POST.
406 Not Acceptable When the specified project in the request does not exist or cannot be found.

Example of a success Response

{
    "sentences": [
        "CloudCanvas was supposed to be the ultimate canvas for digital artists, but it ended up being just a cloud of disappointment.",
        "The sky was the limit for CloudCanvas, but it seems like they got lost in the fog of their own ambitions.",
        "In a world full of clouds, CloudCanvas tried to stand out, but it looks like their uniqueness got lost in the storm."
    ]
}