Module: pages/api/data/ai-comments

Methods

(inner) completionsHandler()

This is the API route for creating a comment generated by AI.

This is the API route for creating a comment generated by AI. Through this endpoint, this service hits OpenAI to generate a completion and then saves it to the database, associating it with a comment.

Source:

(async, inner) completionsPost()

This is the POST handler for the completions API route.

This is the POST handler for the completions API route. It is responsible for generating a completion and saving it to the database. It starts the first (out of 3) completion workflow, which is triggered by a user when submitting a dream.

Source: