🌐 AI搜索 & 代理 主页
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pgml-extension/src/bindings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use pyo3::{pyfunction, PyResult, Python};
use crate::orm::*;

#[pyfunction]
fn r_insert_logs(project_id: i64, model_id: i64, logs: String) -> PyResult<String> {
pub fn r_insert_logs(project_id: i64, model_id: i64, logs: String) -> PyResult<String> {
let id_value = Spi::get_one_with_args::<i64>(
"INSERT INTO pgml.logs (project_id, model_id, logs) VALUES ($1, $2, $3::JSONB) RETURNING id;",
vec![
Expand All @@ -23,7 +23,7 @@ fn r_insert_logs(project_id: i64, model_id: i64, logs: String) -> PyResult<Strin
}

#[pyfunction]
fn r_log(level: String, message: String) -> PyResult<String> {
pub fn r_log(level: String, message: String) -> PyResult<String> {
match level.as_str() {
"info" => info!("{}", message),
"warning" => warning!("{}", message),
Expand Down