module

Habit

Constants

API_KEY = ENV["OPENAI_API_KEY"]
BASE_URL = "https://api.groq.com/openai/v1"

Class methods

get_daily_action(habit : String, previous_action : String | Nil = nil, user_results : String | Nil = nil, day : Int32 = 1)
get_todays_action(user_id : Int64)
get_yesterdays_progress(user_id : Int64)
parse_response(raw : String)
save_progress(user_id : Int64, habit : String, action : String, completed : Bool, day : Int32)
system_prompt
user_prompt(habit : String, previous_action : String | Nil = nil, user_results : String | Nil = nil, day : Int32 = 1) : String