Skip to content

Commit

Permalink
fix(query): Remove verbose debug and skip self in instrumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
timonv committed Sep 16, 2024
1 parent 39b6ecb commit 133cf1d
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 12 deletions.
8 changes: 0 additions & 8 deletions swiftide-query/src/answers/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,6 @@ impl Answer for Simple {
query.current()
};

let prompt = self
.prompt_template
.to_prompt()
.with_context_value("question", query.original())
.with_context_value("context", context);

tracing::debug!(prompt = ?prompt, "Prompting from Simple for answer");

let answer = self
.client
.prompt(
Expand Down
2 changes: 1 addition & 1 deletion swiftide-query/src/query_transformers/embed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ impl Embed {

#[async_trait]
impl TransformQuery for Embed {
#[tracing::instrument]
#[tracing::instrument(skip_self)]
async fn transform_query(
&self,
mut query: Query<states::Pending>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ fn default_prompt() -> PromptTemplate {

#[async_trait]
impl TransformQuery for GenerateSubquestions {
#[tracing::instrument]
#[tracing::instrument(skip_self)]
async fn transform_query(
&self,
mut query: Query<states::Pending>,
Expand Down
2 changes: 1 addition & 1 deletion swiftide-query/src/query_transformers/sparse_embed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl SparseEmbed {

#[async_trait]
impl TransformQuery for SparseEmbed {
#[tracing::instrument]
#[tracing::instrument(skip_self)]
async fn transform_query(
&self,
mut query: Query<states::Pending>,
Expand Down
2 changes: 1 addition & 1 deletion swiftide-query/src/response_transformers/summary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ fn default_prompt() -> PromptTemplate {

#[async_trait]
impl TransformResponse for Summary {
#[tracing::instrument]
#[tracing::instrument(skip_self)]
async fn transform_response(
&self,
mut query: Query<states::Retrieved>,
Expand Down

0 comments on commit 133cf1d

Please sign in to comment.