setup and go

master
prplV 2025-06-23 09:59:29 -04:00
parent cc3eb6c3af
commit a6bc3e74ba
5 changed files with 40 additions and 1 deletions

20
.env.example Normal file
View File

@ -0,0 +1,20 @@
# `ML_API` mod's `.env` EXAMPLE
# `URL` and `ENDPOINT` that are used by model's API to integrate with
# -------------------------------------------------------------------
# i.e. using with `ollama` should set it to:
# http://{BASE_URL}:11434/api/generate
# -------------------------------------------------------------------
ML_TARGET_URL="http://url.to/ml/api"
# `ML_API` log level selecetion (default - `INFO`)
# -----------------------------------------------
# Existing options:
# 1) TRACE - full log info
# 2) DEBUG
# 3) INFO - common log info
# 4) WARN
# 5) ERROR
# 6) OFF - disabled logs
# -----------------------------------------------
ML_LOG_LEVEL="INFO"

View File

@ -4,3 +4,13 @@ version = "0.1.0"
edition = "2024"
[dependencies]
anyhow = "1.0.98"
axum = { version = "0.8.4", features = ["ws"] }
dotenv = "0.15.0"
lazy_static = "1.5.0"
reqwest = "0.12.20"
serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.140"
tokio = { version = "1.45.1", features = ["full"] }
tracing = "0.1.41"
tracing-subscriber = "0.3.19"

5
src/endpoints.rs Normal file
View File

@ -0,0 +1,5 @@
pub mod openapi {}
pub mod ws {}
pub mod rest {}

View File

@ -1,3 +1,7 @@
fn main() {
mod endpoints;
mod schemas;
#[tokio::main(flavor = "multi_thread")]
async fn main() {
println!("Hello, world!");
}

0
src/schemas.rs Normal file
View File