reafctor: all code without stream

This commit is contained in:
2026-06-02 18:30:39 +02:00
parent 974be437af
commit 28352d8bdb
90 changed files with 3581 additions and 2434 deletions
+30
View File
@@ -0,0 +1,30 @@
impl From<crate::core::llm::ChatRole> for crate::databases::postgres::chat::types::MessageRole {
fn from(m: crate::core::llm::ChatRole) -> Self {
match m {
crate::core::llm::ChatRole::System => {
crate::databases::postgres::chat::types::MessageRole::System
}
crate::core::llm::ChatRole::Assistant => {
crate::databases::postgres::chat::types::MessageRole::Assistant
}
crate::core::llm::ChatRole::User => {
crate::databases::postgres::chat::types::MessageRole::User
}
}
}
}
impl From<crate::core::auth::api_key::KeyRole>
for crate::databases::postgres::api_key::types::Role
{
fn from(role: crate::core::auth::api_key::KeyRole) -> Self {
match role {
crate::core::auth::api_key::KeyRole::User => {
crate::databases::postgres::api_key::types::Role::User
}
crate::core::auth::api_key::KeyRole::Admin => {
crate::databases::postgres::api_key::types::Role::Admin
}
}
}
}