mirror of https://github.com/buster-so/buster.git
libs cargo warning fix
This commit is contained in:
parent
f0f3bedfb5
commit
9cbd5e91a9
|
@ -2,7 +2,7 @@ use agents::{Agent, AgentMessage};
|
|||
use anyhow::{anyhow, Result};
|
||||
use async_trait::async_trait;
|
||||
use database::{
|
||||
models::{Dataset, User},
|
||||
models::Dataset,
|
||||
pool::get_pg_pool,
|
||||
schema::{datasets, metric_files},
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use anyhow::Result;
|
||||
use chrono::Utc;
|
||||
use database::models::{Chat, User};
|
||||
use database::models::Chat;
|
||||
use database::pool::get_pg_pool;
|
||||
use diesel::prelude::*;
|
||||
use diesel_async::RunQueryDsl;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use anyhow::{anyhow, Result};
|
||||
use anyhow::Result;
|
||||
use chrono::{DateTime, Utc};
|
||||
use database::pool::get_pg_pool;
|
||||
use diesel::prelude::*;
|
||||
|
|
|
@ -13,10 +13,10 @@ use agents::{
|
|||
use anyhow::{anyhow, Result};
|
||||
use chrono::Utc;
|
||||
use database::{
|
||||
enums::{AssetPermissionRole, AssetType, IdentityType, Verification},
|
||||
models::{AssetPermission, Chat, DashboardFile, Message, MessageToFile, MetricFile, User},
|
||||
enums::{AssetPermissionRole, AssetType, IdentityType},
|
||||
models::{AssetPermission, Chat, Message, MessageToFile},
|
||||
pool::get_pg_pool,
|
||||
schema::{asset_permissions, chats, dashboard_files, messages, messages_to_files, metric_files},
|
||||
schema::{asset_permissions, chats, messages, messages_to_files},
|
||||
};
|
||||
use diesel::insert_into;
|
||||
use diesel_async::RunQueryDsl;
|
||||
|
@ -25,7 +25,7 @@ use litellm::{
|
|||
Metadata, ToolCall,
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::{json, Value};
|
||||
use serde_json::Value;
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::chats::{
|
||||
|
@ -198,7 +198,7 @@ pub async fn post_chat_handler(
|
|||
|
||||
// Initialize raw_llm_messages with initial_messages
|
||||
let mut raw_llm_messages = initial_messages.clone();
|
||||
let mut raw_response_message = String::new();
|
||||
let raw_response_message = String::new();
|
||||
|
||||
// Initialize the agent thread
|
||||
let mut chat = AgentThread::new(Some(chat_id), user.id, initial_messages);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use anyhow::{anyhow, Result};
|
||||
use database::{
|
||||
enums::{AssetPermissionRole, AssetType, IdentityType},
|
||||
enums::{AssetType, IdentityType},
|
||||
pool::get_pg_pool,
|
||||
schema::chats,
|
||||
};
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
use anyhow::{anyhow, Result};
|
||||
use chrono::{DateTime, Utc};
|
||||
use database::{
|
||||
enums::{AssetPermissionRole, AssetType, IdentityType},
|
||||
pool::get_pg_pool,
|
||||
schema::chats::dsl,
|
||||
};
|
||||
use diesel::{ExpressionMethods, QueryDsl, RunQueryDsl};
|
||||
use diesel_async::RunQueryDsl as AsyncRunQueryDsl;
|
||||
use database::enums::{AssetPermissionRole, AssetType, IdentityType};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use sharing::{create_share_by_email, has_permission};
|
||||
use tracing::info;
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
use agents::tools::categories::file_tools::common::generate_deterministic_uuid;
|
||||
use anyhow::Result;
|
||||
use serde_json::Value;
|
||||
use sha2::{Digest, Sha256};
|
||||
use uuid::Uuid;
|
||||
use sha2::Digest;
|
||||
|
||||
use super::post_chat_handler::{
|
||||
BusterFile, BusterFileContent, BusterReasoningFile, BusterReasoningMessage,
|
||||
BusterReasoningPill, BusterReasoningText, BusterThoughtPill, BusterThoughtPillContainer,
|
||||
BusterFile, BusterFileContent, BusterReasoningFile, BusterReasoningMessage, BusterReasoningText,
|
||||
};
|
||||
|
||||
pub struct StreamingParser {
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
use anyhow::{anyhow, Result};
|
||||
use anyhow::Result;
|
||||
use chrono::Utc;
|
||||
use database::models::{Chat, User};
|
||||
use database::models::Chat;
|
||||
use database::pool::get_pg_pool;
|
||||
use diesel::prelude::*;
|
||||
use diesel::pg::expression::dsl::any;
|
||||
use diesel_async::RunQueryDsl;
|
||||
use futures::future::try_join_all;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::collections::HashSet;
|
||||
use uuid::Uuid;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
use anyhow::{anyhow, Result};
|
||||
use chrono::Utc;
|
||||
use database::{
|
||||
enums::AssetPermissionRole,
|
||||
pool::get_pg_pool,
|
||||
schema::collections,
|
||||
};
|
||||
|
|
|
@ -5,7 +5,7 @@ use database::{
|
|||
enums::{AssetPermissionRole, AssetType, IdentityType},
|
||||
pool::get_pg_pool,
|
||||
schema::{
|
||||
asset_permissions, collections, collections_to_assets, dashboard_files, metric_files, users,
|
||||
asset_permissions, collections_to_assets, dashboard_files, metric_files, users,
|
||||
},
|
||||
};
|
||||
use diesel::{ExpressionMethods, JoinOnDsl, NullableExpressionMethods, QueryDsl, Queryable};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use anyhow::{anyhow, Result};
|
||||
use anyhow::Result;
|
||||
use chrono::Utc;
|
||||
use database::pool::get_pg_pool;
|
||||
use database::schema::dashboard_files;
|
||||
|
|
|
@ -6,7 +6,6 @@ use diesel::{ExpressionMethods, QueryDsl};
|
|||
use diesel_async::RunQueryDsl;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use uuid::Uuid;
|
||||
use futures::future::try_join_all;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct DeleteDashboardsRequest {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
use std::collections::HashMap;
|
||||
|
||||
use anyhow::{anyhow, Result};
|
||||
use diesel::{ExpressionMethods, JoinOnDsl, QueryDsl, Queryable, Selectable, SelectableHelper};
|
||||
use diesel::{ExpressionMethods, JoinOnDsl, QueryDsl, Queryable, Selectable};
|
||||
use diesel_async::RunQueryDsl;
|
||||
use serde_json::{json, Value};
|
||||
use serde_json::Value;
|
||||
use uuid::Uuid;
|
||||
use futures::future::{try_join_all, join_all};
|
||||
use futures::future::join_all;
|
||||
use chrono::{DateTime, Utc};
|
||||
use serde_yaml;
|
||||
|
||||
|
@ -16,7 +16,7 @@ use database::pool::get_pg_pool;
|
|||
use database::schema::{asset_permissions, dashboard_files, users};
|
||||
use database::types::VersionHistory;
|
||||
|
||||
use super::{BusterDashboard, BusterDashboardResponse, DashboardCollection, DashboardConfig, DashboardRow, DashboardRowItem};
|
||||
use super::{BusterDashboard, BusterDashboardResponse, DashboardConfig, DashboardRow, DashboardRowItem};
|
||||
|
||||
#[derive(Queryable, Selectable)]
|
||||
#[diesel(table_name = dashboard_files)]
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
use std::collections::HashMap;
|
||||
|
||||
use anyhow::{anyhow, Result};
|
||||
use diesel::{
|
||||
BoolExpressionMethods, ExpressionMethods, JoinOnDsl, NullableExpressionMethods, QueryDsl,
|
||||
ExpressionMethods, QueryDsl,
|
||||
Queryable, Selectable,
|
||||
};
|
||||
use diesel_async::RunQueryDsl;
|
||||
|
@ -11,9 +10,9 @@ use uuid::Uuid;
|
|||
use chrono::{DateTime, Utc};
|
||||
|
||||
use database::{
|
||||
enums::{AssetPermissionRole, AssetType, IdentityType, Verification},
|
||||
enums::Verification,
|
||||
pool::get_pg_pool,
|
||||
schema::{asset_permissions, dashboard_files, users},
|
||||
schema::dashboard_files,
|
||||
};
|
||||
|
||||
use super::{BusterDashboardListItem, DashboardMember};
|
||||
|
@ -53,7 +52,7 @@ pub async fn list_dashboard_handler(
|
|||
let offset = request.page_token * request.page_size;
|
||||
|
||||
// Build the base query
|
||||
let mut dashboard_statement = dashboard_files::table
|
||||
let dashboard_statement = dashboard_files::table
|
||||
.select((
|
||||
dashboard_files::id,
|
||||
dashboard_files::name,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use anyhow::{anyhow, Result};
|
||||
use database::{
|
||||
enums::{AssetPermissionRole, AssetType, IdentityType},
|
||||
enums::{AssetType, IdentityType},
|
||||
pool::get_pg_pool,
|
||||
schema::dashboard_files,
|
||||
};
|
||||
|
|
|
@ -6,7 +6,7 @@ use database::types::dashboard_yml::{DashboardYml, RowItem, Row};
|
|||
use database::types::VersionHistory;
|
||||
use database::enums::{AssetPermissionRole, AssetType, IdentityType, Verification};
|
||||
use database::models::MetricFileToDashboardFile;
|
||||
use diesel::{ExpressionMethods, QueryDsl, BoolExpressionMethods};
|
||||
use diesel::{ExpressionMethods, QueryDsl};
|
||||
use diesel_async::RunQueryDsl;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use uuid::Uuid;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use anyhow::{anyhow, Result};
|
||||
use chrono::Utc;
|
||||
use database::{models::{Message, User}, pool::get_pg_pool, schema::messages};
|
||||
use database::{models::Message, pool::get_pg_pool, schema::messages};
|
||||
use diesel::prelude::*;
|
||||
use diesel_async::RunQueryDsl;
|
||||
use tracing::info;
|
||||
|
|
|
@ -4,7 +4,6 @@ use database::{pool::get_pg_pool, schema::messages};
|
|||
use diesel::prelude::*;
|
||||
use diesel_async::RunQueryDsl;
|
||||
use middleware::AuthenticatedUser;
|
||||
use serde_json::{json, Value};
|
||||
use std::str::FromStr;
|
||||
use uuid::Uuid;
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ use database::types::MetricYml;
|
|||
use indexmap::IndexMap;
|
||||
use middleware::AuthenticatedUser;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::Value;
|
||||
use std::collections::HashSet;
|
||||
use uuid::Uuid;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use anyhow::{anyhow, Result};
|
||||
use database::types::VersionHistory;
|
||||
use diesel::{ExpressionMethods, JoinOnDsl, QueryDsl, Queryable, Selectable, SelectableHelper};
|
||||
use diesel::{ExpressionMethods, JoinOnDsl, QueryDsl, Queryable, Selectable};
|
||||
use diesel_async::RunQueryDsl;
|
||||
use serde_json::Value;
|
||||
use serde_yaml;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
use chrono::{DateTime, Utc};
|
||||
use database::{enums::{AssetPermissionRole, Verification}, types::{ChartConfig, VersionHistory}};
|
||||
use database::{enums::{AssetPermissionRole, Verification}, types::ChartConfig};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::Value;
|
||||
use uuid::Uuid;
|
||||
use std::collections::HashMap;
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
use anyhow::{anyhow, Result};
|
||||
use diesel::{BoolExpressionMethods, ExpressionMethods, JoinOnDsl, QueryDsl};
|
||||
use diesel::{ExpressionMethods, QueryDsl};
|
||||
use diesel_async::RunQueryDsl;
|
||||
use uuid::Uuid;
|
||||
|
||||
use database::{
|
||||
pool::get_pg_pool,
|
||||
schema::{organizations, users_to_organizations},
|
||||
schema::users_to_organizations,
|
||||
};
|
||||
|
||||
pub async fn get_user_organization_id(user_id: &Uuid) -> Result<Uuid> {
|
||||
|
|
Loading…
Reference in New Issue