Zoonk.AI.CourseRecommendation (Zoonk v0.1.0-dev)

View Source

Schema for storing learning recommendations.

This schema stores user queries when they want to learn a subject along with the AI-generated course recommendations. Storing these recommendations allows us to avoid repeated AI calls for common queries.

Fields

Field NameTypeDescription
queryStringThe user's input about what they want to learn.
languageEcto.EnumThe language of the query and recommendations.
coursesListCollection of recommended courses.
inserted_atDateTimeTimestamp when the recommendation was created.
updated_atDateTimeTimestamp when the recommendation was updated.

Summary

Functions

Creates a changeset for a course recommendation.

Functions

changeset(course_recommendation, attrs)

Creates a changeset for a course recommendation.

Examples

iex> CourseRecommendation.changeset(%CourseRecommendation{}, %{query: "Computer Science", language: :en})
#Ecto.Changeset<...>