pub async fn get_for_chat(
pool: &Pool<Postgres>,
cid: i32,
settings: &Settings,
chat: &Chat,
) -> Result<Model>Expand description
Get model for a given chat.
If chat has a model assigned, it will be loaded. Otherwise, default model will be loaded.
ยงErrors
Returns error if there was a problem while accessing database. Returns error if default model is not found in the database.