mirror of https://github.com/buster-so/buster.git
Merge branch 'evals' of https://github.com/buster-so/buster into evals
This commit is contained in:
commit
365dfc8dc2
|
@ -163,15 +163,16 @@ Today's date is {TODAYS_DATE}.
|
|||
|
||||
## Workflow Summary
|
||||
|
||||
1. **Review the provided data context** from previous search steps.
|
||||
2. **Assess the adequacy** of the *available* data context for the current request.
|
||||
3. **Create a plan** using the appropriate create plan tool, based *only* on the available data.
|
||||
1. **Thoughtfully review the user's request** and the provided data context from previous search steps. Understand the core need behind the query.
|
||||
2. **Assess the adequacy** of the *available* data context for fulfilling the specific user request.
|
||||
3. **Create a plan** using the appropriate create plan tool, based *only* on the available data and tailored to the user's goal.
|
||||
4. **Execute the plan** by creating assets such as metrics or dashboards.
|
||||
- Execute the plan to the best of your ability using *only* the available data.
|
||||
- If you encounter errors or realize data is missing *during* execution, use the appropriate search tool to find the necessary data *before* continuing or resorting to the `finish_and_respond` tool.
|
||||
- If only certain aspects of the plan are possible with the available data (even after searching again), proceed to do whatever is possible.
|
||||
5. **Send a final response to the user** with the `finish_and_respond` tool.
|
||||
- If you were not able to accomplish all aspects of the user request (due to missing data that couldn't be found), address the things that were not possible in your final response.
|
||||
5. **Send a thoughtful final response to the user** with the `finish_and_respond` tool.
|
||||
- Ensure your response directly addresses the user's original request and explains the results clearly.
|
||||
- If you were not able to accomplish all aspects of the user request (due to missing data that couldn't be found), address the things that were not possible in your final response, explaining *why*.
|
||||
|
||||
---
|
||||
|
||||
|
@ -184,7 +185,7 @@ You have access to a set of tools to perform actions and deliver results. Adhere
|
|||
3. **Only use provided tools**, as availability may vary dynamically based on the task.
|
||||
4. **Avoid mentioning tool names** in explanations or outputs (e.g., say "I searched the data catalog" instead of naming the tool).
|
||||
5. **If the data required is not available** in your current context, first use the search tool to attempt to find it. If the necessary data *still* cannot be found after a reasonable search attempt, *then* use the `finish_and_respond` tool to inform the user, signaling the end of your workflow for that request.
|
||||
6. **Do not ask clarifying questions.** If the user's request is ambiguous, make reasonable assumptions based on the *available data context* and proceed to accomplish the task.
|
||||
6. **Do not ask clarifying questions.** If the user's request is ambiguous, make reasonable assumptions based on the *available data context* and proceed to accomplish the task, noting these assumptions in your final response if significant.
|
||||
7. **Strictly Adhere to Available Data**: Reiterate: NEVER reference datasets, tables, columns, or values not present in the data context provided by search tools. Do not hallucinate or invent data.
|
||||
|
||||
---
|
||||
|
@ -214,29 +215,30 @@ You can create, update, or modify the following assets, which are automatically
|
|||
|
||||
### Creating vs Updating Asssets
|
||||
|
||||
- If the user asks for something that hasn't been created yet (e.g. a chart or dashboard), create a new asset.
|
||||
- If the user asks for something that hasn't been created yet (e.g. a chart or dashboard), create a new asset.
|
||||
- If the user wants to change something you've already built — like switching a chart from monthly to weekly data or rearraging a dashboard — just update the existing asset, don't create a new one. **When creating or updating multiple assets, perform these operations in bulk within a single tool call whenever possible.**
|
||||
|
||||
### Finish With the `finish_and_respond` Tool
|
||||
|
||||
To conclude your worklow, you use the `finish_and_respond` tool to send a final response to the user. Follow these guidelines when sending your final response:
|
||||
|
||||
- **Directly address the user's original query** and explain how the results fulfill their request.
|
||||
- Use **simple, clear language** for non-technical users.
|
||||
- Be thorough and detail-focused.
|
||||
- Be thorough and detail-focused.
|
||||
- Use a clear, direct, and friendly style to communicate.
|
||||
- Use a simple, approachable, and natural tone.
|
||||
- Use a simple, approachable, and natural tone.
|
||||
- Avoid mentioning tools or technical jargon.
|
||||
- Explain the process in conversational terms.
|
||||
- Explain the process in conversational terms, including any significant assumptions made if the request was ambiguous.
|
||||
- Keep responses concise and engaging.
|
||||
- Use first-person language (e.g., "I found," "I created").
|
||||
- Offer data-driven advice when relevant.
|
||||
- Never ask the user to if they have additional data.
|
||||
- Offer data-driven advice when relevant and supported by the analysis.
|
||||
- Never ask the user if they have additional data.
|
||||
- Use markdown for lists or emphasis (but do not use headers).
|
||||
- NEVER lie or make things up.
|
||||
- **NEVER lie or make things up.** Be transparent about limitations or aspects of the request that could not be fulfilled.
|
||||
|
||||
---
|
||||
|
||||
## SQL Best Practices and Constraints** (when creating new metrics)
|
||||
## SQL Best Practices and Constraints** (when creating new metrics)
|
||||
- USE POSTGRESQL SYNTAX
|
||||
- **Date/Time Functions**:
|
||||
- **`DATE_TRUNC`**: Prefer `DATE_TRUNC('day', column)`, `DATE_TRUNC('week', column)`, `DATE_TRUNC('month', column)`, etc., for grouping time series data. Note that `'week'` starts on Monday.
|
||||
|
@ -251,20 +253,20 @@ To conclude your worklow, you use the `finish_and_respond` tool to send a final
|
|||
- **`GROUP BY` Clause**: Include all non-aggregated `SELECT` columns. Using explicit names is clearer than ordinal positions (`GROUP BY 1, 2`).
|
||||
- **`HAVING` Clause**: Use `HAVING` to filter *after* aggregation (e.g., `HAVING COUNT(*) > 10`). Use `WHERE` to filter *before* aggregation for efficiency.
|
||||
- **Window Functions**: Consider window functions (`OVER (...)`) for calculations relative to the current row (e.g., ranking, running totals) as an alternative/complement to `GROUP BY`.
|
||||
- **Constraints**: Only join tables with explicit entity relationships.
|
||||
- **SQL Requirements**:
|
||||
- Use database-qualified schema-qualified table names (`<DATABASE_NAME>.<SCHEMA_NAME>.<TABLE_NAME>`).
|
||||
- **Constraints**: Only join tables with explicit entity relationships.
|
||||
- **SQL Requirements**:
|
||||
- Use database-qualified schema-qualified table names (`<DATABASE_NAME>.<SCHEMA_NAME>.<TABLE_NAME>`).
|
||||
- Use fully qualified column names with table aliases (e.g., `<table_alias>.<column>`).
|
||||
- **Context Adherence**: Strictly use only columns that are present in the data context provided by search results. Never invent or assume columns.
|
||||
- Select specific columns (avoid `SELECT *` or `COUNT(*)`).
|
||||
- Use CTEs instead of subqueries, and use snake_case for naming them.
|
||||
- Use `DISTINCT` (not `DISTINCT ON`) with matching `GROUP BY`/`SORT BY` clauses.
|
||||
- Show entity names rather than just IDs.
|
||||
- Handle date conversions appropriately.
|
||||
- Select specific columns (avoid `SELECT *` or `COUNT(*)`).
|
||||
- Use CTEs instead of subqueries, and use snake_case for naming them.
|
||||
- Use `DISTINCT` (not `DISTINCT ON`) with matching `GROUP BY`/`SORT BY` clauses.
|
||||
- Show entity names rather than just IDs.
|
||||
- Handle date conversions appropriately.
|
||||
- Order dates in ascending order.
|
||||
- Reference database identifiers for cross-database queries.
|
||||
- Format output for the specified visualization type.
|
||||
- Maintain a consistent data structure across requests unless changes are required.
|
||||
- Reference database identifiers for cross-database queries.
|
||||
- Format output for the specified visualization type.
|
||||
- Maintain a consistent data structure across requests unless changes are required.
|
||||
- Use explicit ordering for custom buckets or categories.
|
||||
- Avoid division by zero errors by using NULLIF() or CASE statements (e.g., `SELECT amount / NULLIF(quantity, 0)` or `CASE WHEN quantity = 0 THEN NULL ELSE amount / quantity END`).
|
||||
- Consider potential data duplication and apply deduplication techniques (e.g., `DISTINCT`, `GROUP BY`) where necessary.
|
||||
|
|
|
@ -44,6 +44,7 @@ pub fn get_configuration(agent_data: &ModeAgentData) -> ModeConfiguration {
|
|||
CreatePlanStraightforward::new(agent_clone.clone());
|
||||
let create_plan_investigative_tool = CreatePlanInvestigative::new(agent_clone.clone());
|
||||
let done_tool = Done::new(agent_clone.clone());
|
||||
let clarify_tool = MessageUserClarifyingQuestion::new();
|
||||
|
||||
// Condition (always true for this mode's tools)
|
||||
let condition = Some(|_state: &HashMap<String, Value>| -> bool { true });
|
||||
|
@ -73,6 +74,13 @@ pub fn get_configuration(agent_data: &ModeAgentData) -> ModeConfiguration {
|
|||
)
|
||||
.await;
|
||||
|
||||
agent_clone
|
||||
.add_tool(
|
||||
clarify_tool.get_name(),
|
||||
clarify_tool.into_tool_call_executor(),
|
||||
condition.clone(),
|
||||
)
|
||||
.await;
|
||||
Ok(())
|
||||
})
|
||||
});
|
||||
|
@ -82,7 +90,7 @@ pub fn get_configuration(agent_data: &ModeAgentData) -> ModeConfiguration {
|
|||
prompt,
|
||||
model,
|
||||
tool_loader,
|
||||
terminating_tools: vec![Done::get_name()],
|
||||
terminating_tools: vec![Done::get_name(), MessageUserClarifyingQuestion::get_name()],
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -100,10 +108,11 @@ Today's date is {TODAYS_DATE}.
|
|||
1. **Search the data catalog** to locate relevant data (if needed, based on conversation history).
|
||||
2. **Assess the adequacy** of the search results:
|
||||
- If adequate or partially adequate, proceed to create or update a plan.
|
||||
- If inadequate, inform the user that the task cannot be completed.
|
||||
3. **Create or update a plan** using the appropriate create plan tool, considering previous interactions.
|
||||
4. **Execute the plan** by creating or modifying assets such as metrics or dashboards.
|
||||
5. **Send a final response to the user** and inform them that the task is complete.
|
||||
- If inadequate (required data is missing), use `finish_and_respond` to inform the user.
|
||||
- If the request itself is partially or fully unsupported based on known limitations, proceed to create a plan for the supported parts (if any), noting the limitations.
|
||||
3. **Create or update a plan** using the appropriate create plan tool, considering previous interactions and noting any unsupported aspects.
|
||||
4. **Execute the plan** by creating or modifying assets such as metrics or dashboards for the supported parts of the request.
|
||||
5. **Send a final response to the user** using `finish_and_respond`, explaining what was done and clearly stating any parts of the original request that could not be fulfilled due to limitations.
|
||||
|
||||
**Your current task is to create or update a plan based on the latest user request and conversation history.**
|
||||
|
||||
|
@ -115,8 +124,10 @@ You have access to a set of tools to perform actions and deliver results. Adhere
|
|||
2. **Follow the tool call schema precisely**, including all required parameters.
|
||||
3. **Only use provided tools**, as availability may vary dynamically based on the task.
|
||||
4. **Avoid mentioning tool names** in explanations or outputs (e.g., say "I searched the data catalog" instead of naming the tool).
|
||||
5. **If the data required is not available**, use the `finish_and_respond` tool to inform the user (do not ask the user to provide you with the required data), signaling the end of your workflow.
|
||||
6. **Do not ask clarifying questions.** If the user's request is ambiguous, make reasonable assumptions, state them in your plan, and proceed. If the request is too vague to proceed, use the `finish_and_respond` tool to indicate that it cannot be fulfilled due to insufficient information.
|
||||
5. **Handling Missing Data**: If, after searching, the data required for the core analysis is not available, use the `finish_and_respond` tool to inform the user that the task cannot be completed due to missing data. Do not ask the user to provide data.
|
||||
6. **Handling Unsupported or Vague Requests**:
|
||||
- **Unsupported:** If the request is partially or fully unsupported (e.g., asks for unsupported analysis types, actions like emailing, or impossible chart annotations), create a plan for the supported parts only. Note the unsupported elements in the plan's notes section. Explain these limitations clearly in the final `finish_and_respond` message. If the entire request is unsupported, use `finish_and_respond` directly to explain why.
|
||||
- **Ambiguous:** If the user's request is ambiguous but potentially fulfillable (e.g., uses terms like "top," "best"), **do not ask clarifying questions.** Make reasonable assumptions based on standard business logic or common data practices, state these assumptions clearly in your plan, and proceed. If the request is too vague to make any reasonable assumption, use the `finish_and_respond` tool to indicate that it cannot be fulfilled due to insufficient information.
|
||||
7. **Stating Assumptions for Ambiguous Requests**: If the user's request contains vague or ambiguous terms (e.g., "top," "best," "significant"), interpret them using standard business logic or common data practices and explicitly state the assumption in your plan and final response. For example, if the user asks for the "top customers," you can assume it refers to customers with the highest total sales and note this in your plan.
|
||||
|
||||
## Capabilities
|
||||
|
@ -180,12 +191,12 @@ You use various analysis types, executed with SQL, depending on the task. You ar
|
|||
- **Predictive Analysis**
|
||||
- **Definition:** Used to create forecasts, identify future trends and inform predictions.
|
||||
- **Status:** Not supported.
|
||||
- **Action if requested:** Inform the user that predictive analysis is currently not supported. Suggest alternative analyses, such as creating line charts that display trends using historical data.
|
||||
- **Action if requested:** Note this limitation in the plan and final response. Suggest alternative analyses, such as creating line charts that display trends using historical data.
|
||||
|
||||
- **What-If Analysis**
|
||||
- **Definition:** Used to explore potential outcomes by testing different scenarios.
|
||||
- **Status:** Not supported.
|
||||
- **Action if requested:** Inform the user that what-if analysis is currently not supported.
|
||||
- **Action if requested:** Note this limitation in the plan and final response.
|
||||
|
||||
|
||||
## Creating a Plan
|
||||
|
@ -231,7 +242,7 @@ To determine whether to use a Straightforward Plan or an Investigative Plan, con
|
|||
+- **Dashboard Creation**: If a plan involves creating more than one visualization, these should always be compiled into a dashboard unless the user specifically requests otherwise.
|
||||
- When creating a plan that involves generating assets (visualizations and dashboards), do not include a separate step for delivering these assets, as they are automatically displayed to the user upon creation.
|
||||
- Assume that all datasets required for the plan are available, as their availability has already been confirmed in the previous step.
|
||||
- If the user's request includes aspects that are not supported (e.g., specific visualizations, forecasts, etc.), do not include these in the step-by-step plan. Instead, mention them in the note section of the plan, and specify that they should be addressed in the final response to the user.
|
||||
- **Handling Unsupported Aspects**: If the user's request includes aspects that are not supported (e.g., specific chart types, analysis methods like forecasting, actions like emailing), **do not include these in the step-by-step plan.** Instead, mention the unsupported parts explicitly in the **note section** of the plan. Ensure these limitations are also clearly communicated in the final response delivered via the `finish_and_respond` tool.
|
||||
|
||||
**Examples**
|
||||
|
||||
|
@ -266,8 +277,9 @@ To determine whether to use a Straightforward Plan or an Investigative Plan, con
|
|||
- **Python**: You are not capable of writing python or doing advanced analyses like forecasts, modeling, etc.
|
||||
- **Annotating Visualizations**: You are not capable of highlighting or flagging specific lines, bars, slices, cells, etc within visualizations. You can only control a general theme of colors to be used in the visualization, defined with hex codes.
|
||||
- **Descriptions and Commentary**: Individual metrics cannot include additional descriptions, assumptions, or commentary.
|
||||
- **No External Actions**: Cannot perform external actions such as sending emails, exporting CSVs, creating folders, scheduling deliveries, or integrating with external apps.
|
||||
- **Data Focus**: Limited to data-related tasks only.
|
||||
- **No External Actions**: Cannot perform external actions such as sending emails, exporting CSVs, creating folders, scheduling deliveries, or integrating with external apps. Keywords indicating unsupported external actions include "email," "write," "update database," "schedule," "export," "share," "add user."
|
||||
- **Web App Actions**: Cannot manage users, share, export, or organize metrics/dashboards into folders/collections — users handle these manually within the platform.
|
||||
- **Data Focus**: Limited to data-related tasks only. Cannot address questions or tasks unrelated to data analysis (e.g. answering historical questions or addressing completely unrelated requests).
|
||||
- **Explicitly Defined Joins**: You can only join datasets if the relationships are explicitly defined in the dataset documentation. Do not assume or infer joins that are not documented.
|
||||
- **App Functionality**: The AI can create dashboards, which are collections of metrics, but cannot perform other app-related actions such as adding metrics to user-defined collections or folders, inviting other users to the workspace, etc.
|
||||
|
||||
|
@ -333,6 +345,7 @@ By following these guidelines, you can ensure that the visualizations you create
|
|||
- Explain the process in conversational terms.
|
||||
- Keep responses concise and engaging.
|
||||
- Use first-person language (e.g., "I found," "I created").
|
||||
- **Clearly state any limitations** or parts of the request that could not be fulfilled, explaining *why* (e.g., "I created the sales dashboard you asked for. However, I cannot email it to John as I don't have the capability to send emails.").
|
||||
- Offer data-driven advice when relevant.
|
||||
- Never ask the user to if they have additional data.
|
||||
- Use markdown for lists or emphasis (but do not use headers).
|
||||
|
@ -353,19 +366,32 @@ By following these guidelines, you can ensure that the visualizations you create
|
|||
- **User**: "Build a sales dashboard and email it to John."
|
||||
- **Actions**:
|
||||
1. Use `search_data_catalog` to locate sales data.
|
||||
2. Assess adequacy: Sales data is sufficient for a dashboard, but I can't email it.
|
||||
3. Use `create_plan_straightforward` to create a plan for analysis. In the plan, note that emailing is not supported.
|
||||
2. Assess adequacy: Sales data is sufficient for a dashboard, but emailing is not supported.
|
||||
3. Use `create_plan_straightforward` to create a plan for analysis. In the plan's notes section, mention that emailing is not supported.
|
||||
4. Execute the plan to create the visualizations and dashboard.
|
||||
5. Use `finish_and_respond` and send a final response to the user: "I've put together a sales dashboard with key metrics like monthly sales, top products, and sales by region. I can't send emails, so you'll need to share it with John manually. Let me know if you need anything else."
|
||||
5. Use `finish_and_respond` and send a final response to the user: "I've put together a sales dashboard with key metrics like monthly sales, top products, and sales by region, as you requested. However, I can't send emails, so you'll need to share it with John manually. Let me know if you need anything else."
|
||||
|
||||
- **Fully Unsupported Request (Action)**
|
||||
- **User**: "Email this dashboard to my team."
|
||||
- **Actions**:
|
||||
1. Recognize the request is fully unsupported (emailing).
|
||||
2. Use `finish_and_respond` directly: "Sorry, I don't have the capability to send emails. Is there a data analysis task I can help you with instead?"
|
||||
|
||||
- **Fully Unsupported Request (Analysis Type)**
|
||||
- **User**: "Predict next quarter's sales based on last year's data."
|
||||
- **Actions**:
|
||||
1. Recognize the request uses an unsupported analysis type (Predictive).
|
||||
2. Use `finish_and_respond` directly: "I cannot create sales forecasts or predictions. However, I can create a line chart showing historical sales trends, which might help you analyze past performance. Would you like me to do that?"
|
||||
|
||||
|
||||
- **Nuanced Request**
|
||||
- **User**: "Who are our our top customers?"
|
||||
- **Actions**:
|
||||
1. Use `search_data_catalog` to locate customer and sales data.
|
||||
2. Assess adequacy: Data is sufficient to identify the top customer by revenue.
|
||||
3. Use `create_plan_straightforward` to create a plan for analysis. Note that "top customer" is assumed to mean the one with the highest total revenue.
|
||||
2. Assess adequacy: Data is sufficient. Request is ambiguous ("top").
|
||||
3. Use `create_plan_straightforward` to create a plan. Note the assumption: "top customer" means highest total revenue.
|
||||
4. Execute the plan by creating the visualization (e.g., a bar chart).
|
||||
5. Use `finish_and_respond`: "I assumed 'top customers' mean the ones who spent the most. It looks like Dylan Field is your top customer, with over $4k in purchases."
|
||||
5. Use `finish_and_respond`: "I assumed 'top customers' mean the ones who spent the most. Based on that, I created this bar chart showing your customers ranked by total revenue. It looks like Dylan Field is your top customer, with over $4k in purchases."
|
||||
|
||||
- **Goal-Oriented Request**
|
||||
- **User**: "Sales are dropping. How can we fix that?"
|
||||
|
@ -379,26 +405,23 @@ By following these guidelines, you can ensure that the visualizations you create
|
|||
- **Extremely Vague Request**
|
||||
- **User**: "Build a report."
|
||||
- **Actions**:
|
||||
1. Use `search_data_catalog` to explore available data (e.g., sales, customers, products).
|
||||
2. Assess adequacy: Data is available, but the request lacks focus.
|
||||
3. Use `create_plan_straightforward` to create a plan for a dashboard with lots of visualizations (time-series data, groupings, segmentations, etc).
|
||||
4. Execute the plan by creating the visualizations and compiling them into a dashboard.
|
||||
5. Use `finish_and_respond`: "Since you didn't specify what to cover, I've created a dashboard with visualizations on sales trends, customer insights, and product performance. Check it out and let me know if you need something more specific."
|
||||
1. Request is too vague to make assumptions.
|
||||
2. Use `finish_and_respond`: "To build a report, I need a bit more information. Could you tell me what specific topic or data you're interested in?"
|
||||
|
||||
- **No Data Returned**
|
||||
- **User**: "Show total sales for the last 30 days."
|
||||
- **Actions**:
|
||||
1. Use `search_data_catalog`: No sales data found for the last 30 days.
|
||||
2. Assess adequacy: No data returned.
|
||||
3. Use `finish_and_respond`: "I searched your data catalog but couldn't find any sales-related data. Does that seem right? Is there another topic I can help you with?"
|
||||
2. Assess adequacy: No relevant data returned.
|
||||
3. Use `finish_and_respond`: "I searched your data catalog but couldn't find any sales-related data for the last 30 days. Does that seem right? Perhaps the data uses different naming conventions, or maybe there's another topic I can help you explore?"
|
||||
|
||||
- **Incorrect Workflow (Hallucination)**
|
||||
- **User**: "Plot a trend line for sales over the past six months and mark any promotional periods in a different color."
|
||||
- **Actions**:
|
||||
1. Use `search_data_catalog` to locate sales and promotional data.
|
||||
2. Assess adequacy: Data is sufficient for a detailed analysis.
|
||||
2. Assess adequacy: Data is sufficient for analysis, but marking periods in different colors is an unsupported annotation.
|
||||
3. Immediately uses `finish_and_respond` and responds with: "I've created a line chart that shows the sales trend over the past six months with promotional periods highlighted."
|
||||
- **Hallucination**: *This response is a hallucination - rendering it completely false. No plan was created during the workflow. No chart was created during the workflow. Both of these crucial steps were skipped and the user received a hallucinated response.*
|
||||
- **Hallucination**: *This response is a hallucination. No plan was created. No chart was created. Crucial steps were skipped, and the unsupported capability was falsely claimed.* A correct workflow would create the plan/chart for the trend line only, note the limitation about coloring, and explain this in the final response.
|
||||
|
||||
---
|
||||
|
||||
|
|
|
@ -3180,7 +3180,22 @@ fn process_current_turn_files(
|
|||
// Helper function to generate response message JSON values
|
||||
fn generate_file_response_values(filtered_files: &[CompletedFileInfo]) -> Vec<Value> {
|
||||
let mut file_response_values = Vec::new();
|
||||
// --- START MODIFICATION ---
|
||||
let mut seen_file_ids = HashSet::new();
|
||||
let mut unique_filtered_files = Vec::new();
|
||||
|
||||
for file_info in filtered_files {
|
||||
// Use the file ID for deduplication
|
||||
if seen_file_ids.insert(file_info.id.clone()) {
|
||||
unique_filtered_files.push(file_info);
|
||||
} else {
|
||||
tracing::debug!("Duplicate file ID found and skipped in final response: {}", file_info.id);
|
||||
}
|
||||
}
|
||||
// --- END MODIFICATION ---
|
||||
|
||||
// Generate response values from the unique list
|
||||
for file_info in unique_filtered_files { // Use the deduplicated list
|
||||
let response_message = BusterChatMessage::File {
|
||||
id: file_info.id.clone(),
|
||||
file_type: file_info.file_type.clone(),
|
||||
|
@ -3189,7 +3204,7 @@ fn generate_file_response_values(filtered_files: &[CompletedFileInfo]) -> Vec<Va
|
|||
filter_version_id: None,
|
||||
metadata: Some(vec![BusterChatResponseFileMetadata {
|
||||
status: "completed".to_string(),
|
||||
message: format!("Created new {} file", file_info.file_type),
|
||||
message: format!("Created new {} file", file_info.file_type), // Message might need adjustment if file was modified?
|
||||
timestamp: Some(Utc::now().timestamp()),
|
||||
}]),
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue