setup and go
parent
cc3eb6c3af
commit
a6bc3e74ba
|
|
@ -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"
|
||||||
10
Cargo.toml
10
Cargo.toml
|
|
@ -4,3 +4,13 @@ version = "0.1.0"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
|
||||||
[dependencies]
|
[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"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
pub mod openapi {}
|
||||||
|
|
||||||
|
pub mod ws {}
|
||||||
|
|
||||||
|
pub mod rest {}
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
fn main() {
|
mod endpoints;
|
||||||
|
mod schemas;
|
||||||
|
|
||||||
|
#[tokio::main(flavor = "multi_thread")]
|
||||||
|
async fn main() {
|
||||||
println!("Hello, world!");
|
println!("Hello, world!");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue