continue tracing impl

This commit is contained in:
2026-06-09 21:17:03 +00:00
parent 39c2afa0a7
commit efb35d5a8a
7 changed files with 40 additions and 12 deletions
+2
View File
@@ -1,6 +1,7 @@
use std::time::Duration;
use openrouter_rs::{Message, api::chat::ChatCompletionRequest};
use tracing::instrument;
pub struct ChatResult {
pub message: String,
@@ -27,6 +28,7 @@ impl OpenRouterClient {
})
}
#[instrument(skip(self), err)]
pub async fn chat(&self, msg: &str) -> anyhow::Result<ChatResult> {
let request = ChatCompletionRequest::builder()
.model(&self.model)