diff --git a/server/bleep/src/agent.rs b/server/bleep/src/agent.rs index e141168c2c..36d903dcbe 100644 --- a/server/bleep/src/agent.rs +++ b/server/bleep/src/agent.rs @@ -256,7 +256,14 @@ impl Agent { .try_fold( llm_gateway::api::FunctionCall::default(), |acc, e| async move { - let e: FunctionCall = serde_json::from_str(&e)?; + let e: FunctionCall = serde_json::from_str(&e).map_err(|err| { + tracing::error!( + "Failed to deserialize to FunctionCall: {:?}. Error: {:?}", + e, + err + ); + err + })?; Ok(FunctionCall { name: acc.name.or(e.name), arguments: acc.arguments + &e.arguments, diff --git a/server/bleep/src/indexes/file.rs b/server/bleep/src/indexes/file.rs index f6b8b84cb4..43ab6b911c 100644 --- a/server/bleep/src/indexes/file.rs +++ b/server/bleep/src/indexes/file.rs @@ -724,7 +724,7 @@ impl RepoFile { let mut buffer = match self.buffer() { Ok(b) => b, Err(err) => { - error!(?err, "failed to open file buffer; skipping file"); + warn!(?err, "failed to open file buffer; skipping file"); return None; } }; diff --git a/server/bleep/src/webserver/answer.rs b/server/bleep/src/webserver/answer.rs index bf74ddf7ba..8a4ee4f65e 100644 --- a/server/bleep/src/webserver/answer.rs +++ b/server/bleep/src/webserver/answer.rs @@ -12,7 +12,7 @@ use axum::{ use futures::{future::Either, stream, StreamExt}; use reqwest::StatusCode; use serde_json::json; -use tracing::{error, warn}; +use tracing::{debug, error, info, warn}; use self::conversations::ConversationId; @@ -91,6 +91,7 @@ pub(super) async fn answer( Extension(app): Extension, Extension(user): Extension, ) -> super::Result { + info!(?params.q, "handling /answer query"); let query_id = uuid::Uuid::new_v4(); let conversation_id = ConversationId { @@ -135,6 +136,8 @@ pub(super) async fn answer( .clone() .into_owned(); + debug!(?query_target, "parsed query target"); + let action = Action::Query(query_target); exchanges.push(Exchange::new(query_id, query));