diff --git a/actix-web/clerk/backend/Cargo.toml b/actix-web/clerk/backend/Cargo.toml index 045f76b2..66d16ba0 100644 --- a/actix-web/clerk/backend/Cargo.toml +++ b/actix-web/clerk/backend/Cargo.toml @@ -10,5 +10,5 @@ clerk-rs = "0.2.3" openssl-sys = { version = "0.9.9", features = ["vendored"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -shuttle-actix-web = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-actix-web = "0.47.0" +shuttle-runtime = "0.47.0" diff --git a/actix-web/cookie-authentication/Cargo.toml b/actix-web/cookie-authentication/Cargo.toml index db7126bb..5b7b4521 100644 --- a/actix-web/cookie-authentication/Cargo.toml +++ b/actix-web/cookie-authentication/Cargo.toml @@ -7,6 +7,6 @@ edition = "2021" actix-identity = "0.7.1" actix-session = { version = "0.9.0", features = ["cookie-session"] } actix-web = "4.3.1" -shuttle-actix-web = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-actix-web = "0.47.0" +shuttle-runtime = "0.47.0" tokio = "1.26.0" diff --git a/actix-web/hello-world/Cargo.toml b/actix-web/hello-world/Cargo.toml index 6f813d23..00621904 100644 --- a/actix-web/hello-world/Cargo.toml +++ b/actix-web/hello-world/Cargo.toml @@ -5,6 +5,6 @@ edition = "2021" [dependencies] actix-web = "4.3.1" -shuttle-actix-web = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-actix-web = "0.47.0" +shuttle-runtime = "0.47.0" tokio = "1.26.0" diff --git a/actix-web/postgres/Cargo.toml b/actix-web/postgres/Cargo.toml index f9f7366b..d9e59266 100644 --- a/actix-web/postgres/Cargo.toml +++ b/actix-web/postgres/Cargo.toml @@ -5,9 +5,9 @@ edition = "2021" [dependencies] actix-web = "4.3.1" -shuttle-actix-web = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-actix-web = "0.47.0" +shuttle-runtime = "0.47.0" serde = "1.0.148" -shuttle-shared-db = { version = "0.46.0", features = ["postgres", "sqlx"] } +shuttle-shared-db = { version = "0.47.0", features = ["postgres", "sqlx"] } sqlx = "0.7.1" tokio = "1.26.0" diff --git a/actix-web/static-files/Cargo.toml b/actix-web/static-files/Cargo.toml index 5ff483c1..dcbd7416 100644 --- a/actix-web/static-files/Cargo.toml +++ b/actix-web/static-files/Cargo.toml @@ -6,6 +6,6 @@ edition = "2021" [dependencies] actix-files = "0.6.2" actix-web = "4.3.1" -shuttle-actix-web = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-actix-web = "0.47.0" +shuttle-runtime = "0.47.0" tokio = "1.26.0" diff --git a/actix-web/websocket-actorless/Cargo.toml b/actix-web/websocket-actorless/Cargo.toml index 6687f21c..de871ff6 100644 --- a/actix-web/websocket-actorless/Cargo.toml +++ b/actix-web/websocket-actorless/Cargo.toml @@ -13,7 +13,7 @@ futures = "0.3" reqwest = "0.11" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -shuttle-actix-web = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-actix-web = "0.47.0" +shuttle-runtime = "0.47.0" tokio = { version = "1", features = ["rt-multi-thread", "sync"] } tracing = "0.1" diff --git a/axum/hello-world/Cargo.toml b/axum/hello-world/Cargo.toml index 72dd1905..5460ee82 100644 --- a/axum/hello-world/Cargo.toml +++ b/axum/hello-world/Cargo.toml @@ -5,6 +5,6 @@ edition = "2021" [dependencies] axum = "0.7.4" -shuttle-axum = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-axum = "0.47.0" +shuttle-runtime = "0.47.0" tokio = "1.28.2" diff --git a/axum/htmx-crud/Cargo.toml b/axum/htmx-crud/Cargo.toml index 614dba6d..a0081241 100644 --- a/axum/htmx-crud/Cargo.toml +++ b/axum/htmx-crud/Cargo.toml @@ -9,9 +9,9 @@ askama_axum = "0.4.0" axum = "0.7.4" serde = { version = "1.0.189", features = ["derive"] } serde_json = "1.0.107" -shuttle-axum = "0.46.0" -shuttle-runtime = "0.46.0" -shuttle-shared-db = { version = "0.46.0", features = ["postgres", "sqlx"] } +shuttle-axum = "0.47.0" +shuttle-runtime = "0.47.0" +shuttle-shared-db = { version = "0.47.0", features = ["postgres", "sqlx"] } sqlx = "0.7.2" tokio = "1.28.2" tokio-stream = { version = "0.1.14", features = ["sync"] } diff --git a/axum/jwt-authentication/Cargo.toml b/axum/jwt-authentication/Cargo.toml index 44ea0c84..3fe2929d 100644 --- a/axum/jwt-authentication/Cargo.toml +++ b/axum/jwt-authentication/Cargo.toml @@ -10,7 +10,7 @@ jsonwebtoken = "8.3.0" once_cell = "1.18.0" serde = { version = "1.0.188", features = ["derive"] } serde_json = "1.0.107" -shuttle-axum = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-axum = "0.47.0" +shuttle-runtime = "0.47.0" tokio = "1.28.2" tracing-subscriber = "0.3.17" diff --git a/axum/metadata/Cargo.toml b/axum/metadata/Cargo.toml index ffe76973..ec054b9a 100644 --- a/axum/metadata/Cargo.toml +++ b/axum/metadata/Cargo.toml @@ -5,6 +5,6 @@ edition = "2021" [dependencies] axum = "0.7.3" -shuttle-axum = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-axum = "0.47.0" +shuttle-runtime = "0.47.0" tokio = "1.28.2" diff --git a/axum/oauth2/Cargo.toml b/axum/oauth2/Cargo.toml index 9a8f7ca1..2fc330c9 100644 --- a/axum/oauth2/Cargo.toml +++ b/axum/oauth2/Cargo.toml @@ -11,9 +11,9 @@ chrono = { version = "0.4.35", features = ["clock"] } oauth2 = "4.4.1" reqwest = { version = "0.11.18", features = ["json"] } serde = { version = "1.0.183", features = ["derive"] } -shuttle-axum = "0.46.0" -shuttle-runtime = "0.46.0" -shuttle-shared-db = { version = "0.46.0", features = ["postgres", "sqlx"] } +shuttle-axum = "0.47.0" +shuttle-runtime = "0.47.0" +shuttle-shared-db = { version = "0.47.0", features = ["postgres", "sqlx"] } sqlx = { version = "0.7.2", features = ["runtime-tokio-rustls", "macros", "chrono"] } thiserror = "1.0.57" time = "0.3.25" diff --git a/axum/openai/Cargo.toml b/axum/openai/Cargo.toml new file mode 100644 index 00000000..8147f477 --- /dev/null +++ b/axum/openai/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "shuttle-axum-openai" +version = "0.1.0" +edition = "2021" + +[dependencies] +async-openai = "0.23.0" +axum = "0.7.3" +serde_json = "1" +shuttle-axum = "0.47.0" +shuttle-openai = "0.47.0" +shuttle-runtime = "0.47.0" +tokio = "1.26.0" diff --git a/axum/openai/README.md b/axum/openai/README.md new file mode 100644 index 00000000..776fbbdb --- /dev/null +++ b/axum/openai/README.md @@ -0,0 +1,7 @@ +A simple endpoint that sends a chat message to ChatGPT and returns the response. + +Set your OpenAI API key in `Secrets.toml`, then try it on a local run with: + +```sh +curl http://localhost:8000 -H 'content-type: application/json' --data '{"message":"What is shuttle.rs?"}' +``` diff --git a/axum/openai/Secrets.toml b/axum/openai/Secrets.toml new file mode 100644 index 00000000..0dcefec8 --- /dev/null +++ b/axum/openai/Secrets.toml @@ -0,0 +1 @@ +OPENAI_API_KEY = 'your_api_key' diff --git a/axum/openai/src/main.rs b/axum/openai/src/main.rs new file mode 100644 index 00000000..1d6c794a --- /dev/null +++ b/axum/openai/src/main.rs @@ -0,0 +1,53 @@ +use std::sync::Arc; + +use async_openai::{ + config::OpenAIConfig, + types::{ + ChatCompletionRequestMessage, ChatCompletionRequestUserMessageArgs, + CreateChatCompletionRequestArgs, + }, + Client, +}; +use axum::{extract::State, routing::post, Json, Router}; +use serde_json::{json, Value}; + +struct AppState { + openai: Client, +} + +async fn chat(State(state): State>, Json(v): Json) -> Result, ()> { + let user_msg: ChatCompletionRequestMessage = ChatCompletionRequestUserMessageArgs::default() + .content(v["message"].as_str().unwrap()) + .build() + .unwrap() + .into(); + let req = CreateChatCompletionRequestArgs::default() + .model("gpt-4o-mini") + .messages(vec![user_msg]) + .n(1) + .build() + .unwrap(); + let res = state.openai.chat().create(req).await.unwrap(); + let reply = res + .choices + .first() + .unwrap() + .message + .content + .as_ref() + .unwrap() + .to_owned(); + + Ok(Json(json!({ "response": reply }))) +} + +#[shuttle_runtime::main] +async fn main( + #[shuttle_openai::OpenAI(api_key = "{secrets.OPENAI_API_KEY}")] openai: Client, +) -> shuttle_axum::ShuttleAxum { + let state = Arc::new(AppState { openai }); + + let router = Router::new().route("/", post(chat)).with_state(state); + + Ok(router.into()) +} diff --git a/axum/postgres/Cargo.toml b/axum/postgres/Cargo.toml index cb40d10b..7b29ed70 100644 --- a/axum/postgres/Cargo.toml +++ b/axum/postgres/Cargo.toml @@ -6,8 +6,8 @@ edition = "2021" [dependencies] axum = "0.7.3" serde = { version = "1.0.188", features = ["derive"] } -shuttle-axum = "0.46.0" -shuttle-runtime = "0.46.0" -shuttle-shared-db = { version = "0.46.0", features = ["postgres", "sqlx"] } +shuttle-axum = "0.47.0" +shuttle-runtime = "0.47.0" +shuttle-shared-db = { version = "0.47.0", features = ["postgres", "sqlx"] } sqlx = "0.7.1" tokio = "1.28.2" diff --git a/axum/qdrant/Cargo.toml b/axum/qdrant/Cargo.toml index 66ca1817..acfd58bc 100644 --- a/axum/qdrant/Cargo.toml +++ b/axum/qdrant/Cargo.toml @@ -5,8 +5,8 @@ edition = "2021" [dependencies] axum = "0.7.3" -qdrant-client = "1.7.0" -shuttle-axum = "0.46.0" -shuttle-qdrant = "0.46.0" -shuttle-runtime = "0.46.0" +qdrant-client = "1.10.1" +shuttle-axum = "0.47.0" +shuttle-qdrant = "0.47.0" +shuttle-runtime = "0.47.0" tokio = "1.26.0" diff --git a/axum/qdrant/src/main.rs b/axum/qdrant/src/main.rs index 924cef11..5359b30d 100644 --- a/axum/qdrant/src/main.rs +++ b/axum/qdrant/src/main.rs @@ -1,9 +1,9 @@ use axum::{extract::State, routing::get, Router}; -use qdrant_client::prelude::*; +use qdrant_client::Qdrant; use std::sync::Arc; struct AppState { - qdrant: QdrantClient, + qdrant: Qdrant, } async fn list_collections(State(state): State>) -> String { @@ -13,7 +13,7 @@ async fn list_collections(State(state): State>) -> String { #[shuttle_runtime::main] async fn main( #[shuttle_qdrant::Qdrant(cloud_url = "{secrets.CLOUD_URL}", api_key = "{secrets.API_KEY}")] - qdrant: QdrantClient, + qdrant: Qdrant, ) -> shuttle_axum::ShuttleAxum { let state = Arc::new(AppState { qdrant }); diff --git a/axum/static-files/Cargo.toml b/axum/static-files/Cargo.toml index af622437..0792e5e9 100644 --- a/axum/static-files/Cargo.toml +++ b/axum/static-files/Cargo.toml @@ -6,7 +6,7 @@ publish = false [dependencies] axum = "0.7.3" -shuttle-axum = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-axum = "0.47.0" +shuttle-runtime = "0.47.0" tokio = "1.28.2" tower-http = { version = "0.5.0", features = ["fs"] } diff --git a/axum/turso/Cargo.toml b/axum/turso/Cargo.toml index 8073b885..f8f69235 100644 --- a/axum/turso/Cargo.toml +++ b/axum/turso/Cargo.toml @@ -5,9 +5,9 @@ edition = "2021" [dependencies] axum = "0.7.3" -shuttle-axum = "0.46.0" -shuttle-runtime = "0.46.0" -shuttle-turso = "0.46.0" +shuttle-axum = "0.47.0" +shuttle-runtime = "0.47.0" +shuttle-turso = "0.47.0" libsql = "0.3.1" tokio = "1.26.0" serde = { version = "1.0.164", features = ["derive"] } diff --git a/axum/websocket/Cargo.toml b/axum/websocket/Cargo.toml index 423386a1..fcb64f8a 100644 --- a/axum/websocket/Cargo.toml +++ b/axum/websocket/Cargo.toml @@ -10,7 +10,7 @@ futures = "0.3.28" reqwest = "0.11.23" serde = { version = "1.0.163", features = ["derive"] } serde_json = "1.0.96" -shuttle-axum = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-axum = "0.47.0" +shuttle-runtime = "0.47.0" tokio = "1.28.2" tower-http = { version = "0.5.0", features = ["fs"] } diff --git a/bevy/hello-world/server/Cargo.toml b/bevy/hello-world/server/Cargo.toml index 005c7253..dc1293f0 100644 --- a/bevy/hello-world/server/Cargo.toml +++ b/bevy/hello-world/server/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" [dependencies] axum = "0.7.4" -shuttle-axum = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-axum = "0.47.0" +shuttle-runtime = "0.47.0" tokio = "1.28.2" tower-http = { version = "0.5.0", features = ["fs"] } diff --git a/custom-resource/pdo/Cargo.toml b/custom-resource/pdo/Cargo.toml index 48f228f3..dac296dd 100644 --- a/custom-resource/pdo/Cargo.toml +++ b/custom-resource/pdo/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" async-trait = "0.1.56" axum = "0.7.3" serde = { version = "1", features = ["derive"] } -shuttle-service = "0.46.0" -shuttle-axum = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-service = "0.47.0" +shuttle-axum = "0.47.0" +shuttle-runtime = "0.47.0" tokio = "1.28.2" diff --git a/custom-service/none/Cargo.toml b/custom-service/none/Cargo.toml index 90fa0961..36d95733 100644 --- a/custom-service/none/Cargo.toml +++ b/custom-service/none/Cargo.toml @@ -5,5 +5,5 @@ edition = "2021" publish = false [dependencies] -shuttle-runtime = "0.46.0" +shuttle-runtime = "0.47.0" tokio = "1" diff --git a/custom-service/request-scheduler/Cargo.toml b/custom-service/request-scheduler/Cargo.toml index c6d554c3..60f93159 100644 --- a/custom-service/request-scheduler/Cargo.toml +++ b/custom-service/request-scheduler/Cargo.toml @@ -10,7 +10,7 @@ chrono = "0.4.24" cron = "0.12.0" reqwest = "0.11.17" serde = "1.0.163" -shuttle-persist = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-persist = "0.47.0" +shuttle-runtime = "0.47.0" tokio = "1.28.0" tracing = "0.1.37" diff --git a/fullstack-templates/saas/backend/Cargo.toml b/fullstack-templates/saas/backend/Cargo.toml index 6d57284b..c616581d 100644 --- a/fullstack-templates/saas/backend/Cargo.toml +++ b/fullstack-templates/saas/backend/Cargo.toml @@ -16,9 +16,9 @@ lettre = "0.11.4" rand = "0.8.5" reqwest = "0.11.16" serde = { version = "1.0.160", features = ["derive"] } -shuttle-axum = "0.46.0" -shuttle-runtime = "0.46.0" -shuttle-shared-db = { version = "0.46.0", features = ["postgres", "sqlx"] } +shuttle-axum = "0.47.0" +shuttle-runtime = "0.47.0" +shuttle-shared-db = { version = "0.47.0", features = ["postgres", "sqlx"] } sqlx = { version = "0.7.1", features = ["time"] } time = { version = "0.3.20", features = ["serde"] } tokio = "1.27.0" diff --git a/loco/hello-world/Cargo.toml b/loco/hello-world/Cargo.toml index fecbd3a5..0a649d3a 100644 --- a/loco/hello-world/Cargo.toml +++ b/loco/hello-world/Cargo.toml @@ -13,8 +13,8 @@ async-trait = "0.1.74" axum = "0.7.1" eyre = "*" loco-rs = { version = "0.3.1", default-features = false, features = ["cli"] } -shuttle-axum = "0.46.0" -shuttle-runtime = { version = "0.46.0", default-features = false } +shuttle-axum = "0.47.0" +shuttle-runtime = { version = "0.47.0", default-features = false } serde = "*" serde_json = "*" tokio = "1.33.0" diff --git a/other/feature-flags/Cargo.toml b/other/feature-flags/Cargo.toml index 42a6f2f2..8dcf269d 100644 --- a/other/feature-flags/Cargo.toml +++ b/other/feature-flags/Cargo.toml @@ -6,8 +6,8 @@ publish = false [dependencies] axum = "0.7.3" -shuttle-axum = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-axum = "0.47.0" +shuttle-runtime = "0.47.0" [features] # Shuttle will disable default features and enable the feature "shuttle" if it exists. diff --git a/other/standalone-binary/Cargo.toml b/other/standalone-binary/Cargo.toml index 9f4e7924..f87a900a 100644 --- a/other/standalone-binary/Cargo.toml +++ b/other/standalone-binary/Cargo.toml @@ -15,6 +15,6 @@ path = "src/bin/standalone.rs" [dependencies] axum = "0.7.3" dotenvy = "0.15.7" -shuttle-axum = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-axum = "0.47.0" +shuttle-runtime = "0.47.0" tokio = "1.28.2" diff --git a/poem/hello-world/Cargo.toml b/poem/hello-world/Cargo.toml index 7b2cccbd..f62525fc 100644 --- a/poem/hello-world/Cargo.toml +++ b/poem/hello-world/Cargo.toml @@ -5,6 +5,6 @@ edition = "2021" [dependencies] poem = "3.0.0" -shuttle-poem = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-poem = "0.47.0" +shuttle-runtime = "0.47.0" tokio = "1.26.0" diff --git a/poem/mongodb/Cargo.toml b/poem/mongodb/Cargo.toml index 6eda9f90..3d0af509 100644 --- a/poem/mongodb/Cargo.toml +++ b/poem/mongodb/Cargo.toml @@ -6,9 +6,9 @@ edition = "2021" [dependencies] mongodb = "2.4.0" poem = "3.0.0" -shuttle-poem = "0.46.0" -shuttle-shared-db = { version = "0.46.0", features = ["mongodb"] } -shuttle-runtime = "0.46.0" +shuttle-poem = "0.47.0" +shuttle-shared-db = { version = "0.47.0", features = ["mongodb"] } +shuttle-runtime = "0.47.0" serde = { version = "1.0.148", features = ["derive"] } serde_json = "1.0.89" tokio = "1.26.0" diff --git a/poise/hello-world/Cargo.toml b/poise/hello-world/Cargo.toml index 7012935c..338475cd 100644 --- a/poise/hello-world/Cargo.toml +++ b/poise/hello-world/Cargo.toml @@ -7,8 +7,8 @@ publish = false [dependencies] anyhow = "1.0.68" poise = "0.6.1" -shuttle-runtime = "0.46.0" +shuttle-runtime = "0.47.0" # Since poise is a serenity command framework, it can run on Shuttle with shuttle-serenity -shuttle-serenity = "0.46.0" +shuttle-serenity = "0.47.0" tracing = "0.1.37" tokio = "1.26.0" diff --git a/rocket/dyn-templates/Cargo.toml b/rocket/dyn-templates/Cargo.toml index de1c0afa..aa2d17de 100644 --- a/rocket/dyn-templates/Cargo.toml +++ b/rocket/dyn-templates/Cargo.toml @@ -6,6 +6,6 @@ edition = "2021" [dependencies] rocket = "0.5.0" rocket_dyn_templates = { version = "0.1.0", features = ["handlebars"] } -shuttle-rocket = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-rocket = "0.47.0" +shuttle-runtime = "0.47.0" tokio = "1.26.0" diff --git a/rocket/hello-world/Cargo.toml b/rocket/hello-world/Cargo.toml index 24978886..466a2b0c 100644 --- a/rocket/hello-world/Cargo.toml +++ b/rocket/hello-world/Cargo.toml @@ -5,6 +5,6 @@ edition = "2021" [dependencies] rocket = "0.5.0" -shuttle-rocket = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-rocket = "0.47.0" +shuttle-runtime = "0.47.0" tokio = "1.26.0" diff --git a/rocket/jwt-authentication/Cargo.toml b/rocket/jwt-authentication/Cargo.toml index 5f3eff6a..730d9a13 100644 --- a/rocket/jwt-authentication/Cargo.toml +++ b/rocket/jwt-authentication/Cargo.toml @@ -9,6 +9,6 @@ jsonwebtoken = { version = "8.1.1", default-features = false } lazy_static = "1.4.0" rocket = { version = "0.5.0", features = ["json"] } serde = { version = "1.0.148", features = ["derive"] } -shuttle-rocket = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-rocket = "0.47.0" +shuttle-runtime = "0.47.0" tokio = "1.26.0" diff --git a/rocket/opendal-memory/Cargo.toml b/rocket/opendal-memory/Cargo.toml index 760d07e2..8631c824 100644 --- a/rocket/opendal-memory/Cargo.toml +++ b/rocket/opendal-memory/Cargo.toml @@ -4,10 +4,10 @@ version = "0.1.0" edition = "2021" [dependencies] -shuttle-runtime = "0.46.0" -shuttle-opendal = "0.46.0" +shuttle-runtime = "0.47.0" +shuttle-opendal = "0.47.0" tokio = "1.26.0" -shuttle-rocket = "0.46.0" +shuttle-rocket = "0.47.0" opendal = "0.45" rocket = { version = "0.5.0", features = ["json"] } serde = { version = "1.0.148", features = ["derive"] } diff --git a/rocket/persist/Cargo.toml b/rocket/persist/Cargo.toml index 3c68157c..e558278c 100644 --- a/rocket/persist/Cargo.toml +++ b/rocket/persist/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" [dependencies] rocket = { version = "0.5.0", features = ["json"] } serde = { version = "1.0.148", features = ["derive"] } -shuttle-persist = "0.46.0" -shuttle-rocket = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-persist = "0.47.0" +shuttle-rocket = "0.47.0" +shuttle-runtime = "0.47.0" tokio = "1.26.0" diff --git a/rocket/postgres/Cargo.toml b/rocket/postgres/Cargo.toml index 04b464f4..7391e82b 100644 --- a/rocket/postgres/Cargo.toml +++ b/rocket/postgres/Cargo.toml @@ -6,8 +6,8 @@ edition = "2021" [dependencies] rocket = { version = "0.5.0", features = ["json"] } serde = "1.0.148" -shuttle-rocket = "0.46.0" -shuttle-runtime = "0.46.0" -shuttle-shared-db = { version = "0.46.0", features = ["postgres", "sqlx"] } +shuttle-rocket = "0.47.0" +shuttle-runtime = "0.47.0" +shuttle-shared-db = { version = "0.47.0", features = ["postgres", "sqlx"] } sqlx = "0.7.1" tokio = "1.26.0" diff --git a/rocket/secrets/Cargo.toml b/rocket/secrets/Cargo.toml index f17044c4..c0a72dd4 100644 --- a/rocket/secrets/Cargo.toml +++ b/rocket/secrets/Cargo.toml @@ -6,6 +6,6 @@ edition = "2021" [dependencies] anyhow = "1.0.66" rocket = "0.5.0" -shuttle-rocket = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-rocket = "0.47.0" +shuttle-runtime = "0.47.0" tokio = "1.26.0" diff --git a/rocket/static-files/Cargo.toml b/rocket/static-files/Cargo.toml index c74b1f92..7e07e905 100644 --- a/rocket/static-files/Cargo.toml +++ b/rocket/static-files/Cargo.toml @@ -5,6 +5,6 @@ edition = "2021" [dependencies] rocket = "0.5.0" -shuttle-rocket = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-rocket = "0.47.0" +shuttle-runtime = "0.47.0" tokio = "1.26.0" diff --git a/rocket/url-shortener/Cargo.toml b/rocket/url-shortener/Cargo.toml index 1c3c2133..e572b453 100644 --- a/rocket/url-shortener/Cargo.toml +++ b/rocket/url-shortener/Cargo.toml @@ -7,9 +7,9 @@ edition = "2021" nanoid = "0.4.0" rocket = { version = "0.5.0", features = ["json"] } serde = "1.0.148" -shuttle-rocket = "0.46.0" -shuttle-runtime = "0.46.0" -shuttle-shared-db = { version = "0.46.0", features = ["postgres", "sqlx"] } +shuttle-rocket = "0.47.0" +shuttle-runtime = "0.47.0" +shuttle-shared-db = { version = "0.47.0", features = ["postgres", "sqlx"] } sqlx = "0.7.1" tokio = "1.26.0" url = "2.3.1" diff --git a/rocket/workspace/hello-world/Cargo.toml b/rocket/workspace/hello-world/Cargo.toml index 0653e35e..da36d440 100644 --- a/rocket/workspace/hello-world/Cargo.toml +++ b/rocket/workspace/hello-world/Cargo.toml @@ -6,6 +6,6 @@ edition = "2021" [dependencies] rocket = "0.5.0" shared = { path = "../shared", version = "0.1.0" } -shuttle-rocket = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-rocket = "0.47.0" +shuttle-runtime = "0.47.0" tokio = "1.26.0" diff --git a/salvo/hello-world/Cargo.toml b/salvo/hello-world/Cargo.toml index 6385e521..225021f1 100644 --- a/salvo/hello-world/Cargo.toml +++ b/salvo/hello-world/Cargo.toml @@ -5,6 +5,6 @@ edition = "2021" [dependencies] salvo = "0.63.0" -shuttle-salvo = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-salvo = "0.47.0" +shuttle-runtime = "0.47.0" tokio = "1.26.0" diff --git a/salvo/image-rescaler/Cargo.toml b/salvo/image-rescaler/Cargo.toml index 5b106428..2adffab0 100644 --- a/salvo/image-rescaler/Cargo.toml +++ b/salvo/image-rescaler/Cargo.toml @@ -6,6 +6,6 @@ edition = "2021" [dependencies] image = "0.24.8" salvo = "0.63.0" -shuttle-salvo = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-salvo = "0.47.0" +shuttle-runtime = "0.47.0" tokio = "1.26.0" diff --git a/serenity/hello-world/Cargo.toml b/serenity/hello-world/Cargo.toml index c1bf1e95..197c2cd9 100644 --- a/serenity/hello-world/Cargo.toml +++ b/serenity/hello-world/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" [dependencies] anyhow = "1.0.66" serenity = { version = "0.12.0", default-features = false, features = ["client", "gateway", "rustls_backend", "model"] } -shuttle-runtime = "0.46.0" -shuttle-serenity = "0.46.0" +shuttle-runtime = "0.47.0" +shuttle-serenity = "0.47.0" tokio = "1.26.0" tracing = "0.1.37" diff --git a/serenity/postgres/Cargo.toml b/serenity/postgres/Cargo.toml index fd370dec..0aecf398 100644 --- a/serenity/postgres/Cargo.toml +++ b/serenity/postgres/Cargo.toml @@ -7,9 +7,9 @@ edition = "2021" anyhow = "1.0.66" serde = "1.0.148" serenity = { version = "0.12.0", default-features = false, features = ["client", "gateway", "rustls_backend", "model"] } -shuttle-runtime = "0.46.0" -shuttle-serenity = "0.46.0" -shuttle-shared-db = { version = "0.46.0", features = ["postgres", "sqlx"] } +shuttle-runtime = "0.47.0" +shuttle-serenity = "0.47.0" +shuttle-shared-db = { version = "0.47.0", features = ["postgres", "sqlx"] } sqlx = "0.7.1" tokio = "1.26.0" tracing = "0.1.37" diff --git a/serenity/weather-forecast/Cargo.toml b/serenity/weather-forecast/Cargo.toml index 8bfed6c4..8651c42b 100644 --- a/serenity/weather-forecast/Cargo.toml +++ b/serenity/weather-forecast/Cargo.toml @@ -8,7 +8,7 @@ anyhow = "1.0.66" reqwest = { version = "0.11.24", features = ["json"] } serde = "1.0.197" serenity = { version = "0.12.0", default-features = false, features = ["client", "gateway", "rustls_backend", "model"] } -shuttle-runtime = "0.46.0" -shuttle-serenity = "0.46.0" +shuttle-runtime = "0.47.0" +shuttle-serenity = "0.47.0" tokio = "1.26.0" tracing = "0.1.37" diff --git a/templates.toml b/templates.toml index b6c4d95b..7497d2a0 100644 --- a/templates.toml +++ b/templates.toml @@ -24,6 +24,7 @@ qdrant = "https://avatars.githubusercontent.com/u/73504361?v=4" nextjs = "https://assets.vercel.com/image/upload/v1662130559/nextjs/Icon_light_background.png" mongodb = "https://avatars.githubusercontent.com/u/45120?v=4" opendal = "https://avatars.githubusercontent.com/u/47359?v=4" +openai = "https://avatars.githubusercontent.com/u/14957082?v=4" # fallback shuttle = "https://avatars.githubusercontent.com/u/54710151?v=4" @@ -200,6 +201,13 @@ path = "axum/oauth2" use_cases = ["Web app", "Authentication"] tags = ["axum", "oauth"] +[templates.axum-openai] +title = "OpenAI ChatGPT chat" +description = "Connect your app to OpenAI ChatGPT" +path = "axum/openai" +use_cases = ["Web app", "AI"] +tags = ["openai", "axum"] + [templates.axum-postgres] title = "Postgres" description = "Todo list with a Postgres database" diff --git a/thruster/hello-world/Cargo.toml b/thruster/hello-world/Cargo.toml index c3c0d5a0..c6826e1d 100644 --- a/thruster/hello-world/Cargo.toml +++ b/thruster/hello-world/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -shuttle-thruster = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-thruster = "0.47.0" +shuttle-runtime = "0.47.0" thruster = { version = "1.3.0", features = ["hyper_server"] } tokio = "1.26.0" diff --git a/tide/hello-world/Cargo.toml b/tide/hello-world/Cargo.toml index 038eaf08..f240d7e1 100644 --- a/tide/hello-world/Cargo.toml +++ b/tide/hello-world/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -shuttle-tide = "0.46.0" -shuttle-runtime = "0.46.0" +shuttle-tide = "0.47.0" +shuttle-runtime = "0.47.0" tokio = "1.26.0" tide = "0.16.0" diff --git a/tower/hello-world/Cargo.toml b/tower/hello-world/Cargo.toml index 197242b1..d36e6052 100644 --- a/tower/hello-world/Cargo.toml +++ b/tower/hello-world/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" [dependencies] hyper = { version = "0.14.23", features = ["full"] } -shuttle-runtime = "0.46.0" -shuttle-tower = "0.46.0" +shuttle-runtime = "0.47.0" +shuttle-tower = "0.47.0" tower = { version = "0.4.13", features = ["full"] } tokio = "1.26.0" diff --git a/tracing/custom-tracing-subscriber/Cargo.toml b/tracing/custom-tracing-subscriber/Cargo.toml index aa7824e5..1dd4af4f 100644 --- a/tracing/custom-tracing-subscriber/Cargo.toml +++ b/tracing/custom-tracing-subscriber/Cargo.toml @@ -5,9 +5,9 @@ edition = "2021" [dependencies] actix-web = "4.3.1" -shuttle-actix-web = "0.46.0" +shuttle-actix-web = "0.47.0" # disable default features to disable the Shuttle default tracing subscriber -shuttle-runtime = { version = "0.46.0", default-features = false } +shuttle-runtime = { version = "0.47.0", default-features = false } tokio = "1.26.0" tracing = "0.1.37" tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } diff --git a/warp/hello-world/Cargo.toml b/warp/hello-world/Cargo.toml index 8acdce55..45a5114b 100644 --- a/warp/hello-world/Cargo.toml +++ b/warp/hello-world/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -shuttle-runtime = "0.46.0" -shuttle-warp = "0.46.0" +shuttle-runtime = "0.47.0" +shuttle-warp = "0.47.0" tokio = "1.26.0" warp = "0.3.3"