Skip to content

Commit f0c9478

Browse files
change some versions, go back to docker slim, and fix object id being
null in chat command
1 parent 400f82a commit f0c9478

6 files changed

Lines changed: 20 additions & 13 deletions

File tree

Cargo.lock

Lines changed: 12 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "agent-kitten-rust"
3-
version = "3.0.3"
3+
version = "3.0.4"
44
edition = "2024"
55

66
[dependencies]
@@ -27,7 +27,7 @@ poise = { version = "0.6.1", features = [
2727
"chrono",
2828
"handle_panics",
2929
], default-features = false }
30-
tokio = { version = "1.48.0", features = [
30+
tokio = { version = "1.49.0", features = [
3131
"rt-multi-thread",
3232
"macros",
3333
"signal",
@@ -53,7 +53,7 @@ sysinfo = { version = "0.37.2" }
5353
chrono = { version = "0.4.42" }
5454
mongodb = { version = "3.4.1" }
5555
serde = { version = "1.0.228", features = ["derive"] }
56-
serde_json = { version = "1.0.146" }
56+
serde_json = { version = "1.0.148" }
5757
serde_with = { version = "3.16.1" }
5858
futures = { version = "0.3.31" }
5959
async-openai = { version = "0.32.2", features = [

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ RUN --mount=type=cache,target=/app/target/ \
4545
################################################################################
4646
# Runtime stage: minimal Debian slim environment
4747

48-
FROM debian:trixie AS final
48+
FROM debian:trixie-slim AS final
4949
ARG UID
5050

5151
# Install only what's needed to run the binary

src/commands/textgen/chat.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use async_openai::types::chat::{
77
ChatCompletionRequestMessage, ChatCompletionRequestSystemMessageArgs,
88
ChatCompletionRequestUserMessageArgs,
99
};
10+
use bson::oid::ObjectId;
1011
use mongodb::bson::doc;
1112
use poise::{CreateReply, serenity_prelude as serenity};
1213
use serenity::builder::CreateEmbed;
@@ -24,7 +25,7 @@ pub async fn chat(ctx: Context<'_>, message: String) -> Result<(), Error> {
2425

2526
let default_messages: Vec<ChatCompletionRequestMessage> = vec![ChatCompletionRequestSystemMessageArgs::default().content("You are Agent Kitten, a helpful AI powered discord bot made by the ClowderTech LLC. You are here to help people with their problems or to interact with the person to help them feel better. Your own website is https://agentkitten.com/. Please make sure to use your tools and function calls whenever useful. You can search the internet, scrape websites, and execute typescript code. Also remember to follow discord's markdown syntax which is somewhat limited. You should ask questions to the user if it is needed to respond to them reasonably.").build()?.into()];
2627
let default_user_content = TextgenDoc {
27-
id: None,
28+
id: ObjectId::new(),
2829
userid: ctx.author().id.get().to_string(),
2930
messages: default_messages,
3031
};

src/commands/utils/debug.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ pub async fn debug(ctx: Context<'_>) -> Result<(), Error> {
6060
.timestamp(Utc::now())
6161
.field("Bot Latency", format!("{latency_ms:#?}"), true)
6262
.field("Bot Uptime", uptime_str, true)
63-
.field("Bot Version", "3.0.3", true)
63+
.field("Bot Version", "3.0.4", true)
6464
.field("Bot Owner", "<@!1208479777900470344>", true)
6565
.field(
6666
"Bot Administrators",

src/textgen_helpers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ pub async fn chat_with_funcs(
114114
#[derive(Debug, Serialize, Deserialize)]
115115
pub struct TextgenDoc {
116116
#[serde(rename = "_id")]
117-
pub id: Option<bson::oid::ObjectId>,
117+
pub id: bson::oid::ObjectId,
118118
pub userid: String,
119119
pub messages: Vec<ChatCompletionRequestMessage>,
120120
}

0 commit comments

Comments
 (0)