Skip to content

Commit

Permalink
revert: revert all cargo dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
densumesh authored and cdxker committed Aug 8, 2024
1 parent 0e8ef0b commit e55860a
Show file tree
Hide file tree
Showing 8 changed files with 403 additions and 480 deletions.
743 changes: 335 additions & 408 deletions server/Cargo.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,21 @@ actix-web = { version = "4.3" }
actix-cors = { version = "0.7" }


async-stripe = { version = "0.38.1", features = [
async-stripe = { version = "0.37.1", features = [
"runtime-tokio-hyper",
"checkout",
"webhook-events",
"billing",
] }
chrono = { version = "0.4.20", features = ["serde"] }
derive_more = { version = "1.0", features = ["full"] }
derive_more = { version = "0.99.7" }
diesel = { version = "2", features = [
"uuid",
"chrono",
"serde_json",
"postgres",
] }
diesel-async = { version = "0.5.0", features = ["postgres", "deadpool"] }
diesel-async = { version = "0.4.1", features = ["postgres", "deadpool"] }
log = "0.4"
once_cell = "1"
rust-argon2 = "2"
Expand Down Expand Up @@ -118,12 +118,12 @@ oauth2 = "4.4.2"
dateparser = "0.2.1"
cfg-if = "1.0.0"
lettre = "0.11.3"
scraper = "0.20.0"
scraper = "0.19.0"
sentry = { version = "0.34", features = ["tracing"] }
sentry-actix = "0.34"
regex-split = "0.1.0"
simple-server-timing-header = "0.1.1"
ndarray = "0.16.0"
ndarray = "0.15.6"
ureq = { version = "2.9.6", features = ["json"] }
tracing = "0.1.40"
tracing-subscriber = { version = "0.3.18", features = [
Expand All @@ -133,7 +133,7 @@ tracing-subscriber = { version = "0.3.18", features = [
sentry-tracing = "0.34"
tokio-postgres = "0.7.10"
postgres-openssl = "0.5.0"
openssl = "0.10.66"
openssl = "0.10.64"
utoipa-swagger-ui = { version = "7.0.1", features = ["actix-web"] }
bb8-redis = "0.15.0"
signal-hook = "0.3.17"
Expand Down
104 changes: 52 additions & 52 deletions server/src/data/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1713,37 +1713,37 @@ impl From<WorkerEvent> for WorkerEventClickhouse {
#[derive(Debug, Serialize, Deserialize, Clone, Display, ToSchema)]
#[serde(untagged)]
pub enum EventType {
#[display("file_uploaded")]
#[display(fmt = "file_uploaded")]
FileUploaded {
file_id: uuid::Uuid,
file_name: String,
},
#[display("file_upload_failed")]
#[display(fmt = "file_upload_failed")]
FileUploadFailed { file_id: uuid::Uuid, error: String },
#[display("chunks_uploaded")]
#[display(fmt = "chunks_uploaded")]
ChunksUploaded { chunk_ids: Vec<uuid::Uuid> },
#[display("chunk_action_failed")]
#[display(fmt = "chunk_action_failed")]
ChunkActionFailed { chunk_id: uuid::Uuid, error: String },
#[display("chunk_updated")]
#[display(fmt = "chunk_updated")]
ChunkUpdated { chunk_id: uuid::Uuid },
#[display("bulk_chunks_deleted")]
#[display(fmt = "bulk_chunks_deleted")]
BulkChunksDeleted { message: String },
#[display("dataset_delete_failed")]
#[display(fmt = "dataset_delete_failed")]
DatasetDeleteFailed { error: String },
#[display("qdrant_index_failed")]
#[display(fmt = "qdrant_index_failed")]
QdrantUploadFailed {
chunk_id: uuid::Uuid,
qdrant_point_id: uuid::Uuid,
error: String,
},
#[display("bulk_chunk_upload_failed")]
#[display(fmt = "bulk_chunk_upload_failed")]
BulkChunkUploadFailed {
chunk_ids: Vec<uuid::Uuid>,
error: String,
},
#[display("group_chunks_updated")]
#[display(fmt = "group_chunks_updated")]
GroupChunksUpdated { group_id: uuid::Uuid },
#[display("group_chunks_action_failed")]
#[display(fmt = "group_chunks_action_failed")]
GroupChunksActionFailed { group_id: uuid::Uuid, error: String },
}

Expand Down Expand Up @@ -1950,13 +1950,13 @@ impl DatasetAndUsage {
#[serde(rename_all = "lowercase")]
pub enum DistanceMetric {
#[serde(alias = "euclid")]
#[display("euclidean")]
#[display(fmt = "euclidean")]
Euclidean,
#[display("cosine")]
#[display(fmt = "cosine")]
Cosine,
#[display("manhattan")]
#[display(fmt = "manhattan")]
Manhattan,
#[display("dot")]
#[display(fmt = "dot")]
Dot,
}

Expand Down Expand Up @@ -4103,41 +4103,41 @@ pub struct SearchClusterMembership {
#[derive(Debug, Serialize, Deserialize, ToSchema, Display, Clone, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum SearchType {
#[display("search")]
#[display(fmt = "search")]
Search,
#[display("autocomplete")]
#[display(fmt = "autocomplete")]
Autocomplete,
#[display("search_over_groups")]
#[display(fmt = "search_over_groups")]
SearchOverGroups,
#[display("search_within_groups")]
#[display(fmt = "search_within_groups")]
SearchWithinGroups,
}

#[derive(Debug, Serialize, Deserialize, ToSchema, Display, Clone, PartialEq)]
#[serde(rename_all = "lowercase")]
pub enum SearchMethod {
#[serde(rename = "fulltext", alias = "full_text")]
#[display("fulltext")]
#[display(fmt = "fulltext")]
FullText,
#[display("semantic")]
#[display(fmt = "semantic")]
Semantic,
#[display("hybrid")]
#[display(fmt = "hybrid")]
Hybrid,
#[serde(rename = "bm25", alias = "BM25")]
#[display("BM25")]
#[display(fmt = "BM25")]
BM25,
}

#[derive(Debug, Serialize, Deserialize, ToSchema, Display, Clone, PartialEq)]
#[serde(rename_all = "lowercase")]
pub enum CountSearchMethod {
#[serde(rename = "fulltext", alias = "full_text")]
#[display("fulltext")]
#[display(fmt = "fulltext")]
FullText,
#[display("semantic")]
#[display(fmt = "semantic")]
Semantic,
#[serde(rename = "bm25", alias = "BM25")]
#[display("BM25")]
#[display(fmt = "BM25")]
BM25,
}

Expand Down Expand Up @@ -4192,9 +4192,9 @@ impl SearchAnalyticsFilter {
#[derive(Debug, Serialize, Deserialize, ToSchema, Display, Clone)]
#[serde(rename_all = "snake_case")]
pub enum RagTypes {
#[display("chosen_chunks")]
#[display(fmt = "chosen_chunks")]
ChosenChunks,
#[display("all_chunks")]
#[display(fmt = "all_chunks")]
AllChunks,
}

Expand Down Expand Up @@ -4257,9 +4257,9 @@ impl ClusterAnalyticsFilter {

#[derive(Debug, Serialize, Deserialize, ToSchema, Clone, Display)]
pub enum RecommendationType {
#[display("chunk")]
#[display(fmt = "chunk")]
Chunk,
#[display("group")]
#[display(fmt = "group")]
Group,
}

Expand Down Expand Up @@ -4447,42 +4447,42 @@ impl StripeInvoice {
#[derive(Debug, Serialize, Deserialize, ToSchema, Display, Clone)]
#[serde(rename_all = "snake_case")]
pub enum Granularity {
#[display("minute")]
#[display(fmt = "minute")]
Minute,
#[display("second")]
#[display(fmt = "second")]
Second,
#[display("hour")]
#[display(fmt = "hour")]
Hour,
#[display("day")]
#[display(fmt = "day")]
Day,
}

#[derive(Debug, Serialize, Deserialize, ToSchema, Display, Clone)]
#[serde(rename_all = "snake_case")]
pub enum SearchSortBy {
#[display("created_at")]
#[display(fmt = "created_at")]
CreatedAt,
#[display("latency")]
#[display(fmt = "latency")]
Latency,
#[display("top_score")]
#[display(fmt = "top_score")]
TopScore,
}

#[derive(Debug, Serialize, Deserialize, ToSchema, Display, Clone)]
#[serde(rename_all = "snake_case")]
pub enum RAGSortBy {
#[display("created_at")]
#[display(fmt = "created_at")]
CreatedAt,
#[display("latency")]
#[display(fmt = "latency")]
Latency,
}

#[derive(Debug, Serialize, Deserialize, ToSchema, Display, Clone, PartialEq, Eq)]
#[serde(rename_all = "lowercase")]
pub enum SortOrder {
#[display("DESC")]
#[display(fmt = "DESC")]
Desc,
#[display("ASC")]
#[display(fmt = "ASC")]
Asc,
}

Expand Down Expand Up @@ -4737,27 +4737,27 @@ pub enum RecommendType {
#[derive(Debug, Serialize, Deserialize, ToSchema, Display, Clone, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum EventTypeRequest {
#[display("file_uploaded")]
#[display(fmt = "file_uploaded")]
FileUploaded,
#[display("file_upload_failed")]
#[display(fmt = "file_upload_failed")]
FileUploadFailed,
#[display("chunks_uploaded")]
#[display(fmt = "chunks_uploaded")]
ChunksUploaded,
#[display("chunk_action_failed")]
#[display(fmt = "chunk_action_failed")]
ChunkActionFailed,
#[display("chunk_updated")]
#[display(fmt = "chunk_updated")]
ChunkUpdated,
#[display("bulk_chunks_deleted")]
#[display(fmt = "bulk_chunks_deleted")]
BulkChunksDeleted,
#[display("dataset_delete_failed")]
#[display(fmt = "dataset_delete_failed")]
DatasetDeleteFailed,
#[display("qdrant_index_failed")]
#[display(fmt = "qdrant_index_failed")]
QdrantUploadFailed,
#[display("bulk_chunk_upload_failed")]
#[display(fmt = "bulk_chunk_upload_failed")]
BulkChunkUploadFailed,
#[display("group_chunks_updated")]
#[display(fmt = "group_chunks_updated")]
GroupChunksUpdated,
#[display("group_chunks_action_failed")]
#[display(fmt = "group_chunks_action_failed")]
GroupChunksActionFailed,
}

Expand Down
16 changes: 8 additions & 8 deletions server/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,28 @@ pub struct ErrorResponseBody {

#[derive(Debug, Display, Clone)]
pub enum ServiceError {
#[display("Internal Server Error: {_0}")]
#[display(fmt = "Internal Server Error: {_0}")]
InternalServerError(String),

#[display("BadRequest: {_0}")]
#[display(fmt = "BadRequest: {_0}")]
BadRequest(String),

#[display("BadRequest: Duplicate Tracking Id Found")]
#[display(fmt = "BadRequest: Duplicate Tracking Id Found")]
DuplicateTrackingId(String),

#[display("Unauthorized")]
#[display(fmt = "Unauthorized")]
Unauthorized,

#[display("Forbidden")]
#[display(fmt = "Forbidden")]
Forbidden,

#[display("Not Found")]
#[display(fmt = "Not Found")]
NotFound(String),

#[display("Json Deserialization Error: {_0}")]
#[display(fmt = "Json Deserialization Error: {_0}")]
JsonDeserializeError(String),

#[display("Payload Too Large")]
#[display(fmt = "Payload Too Large")]
PayloadTooLarge(String),
}

Expand Down
1 change: 0 additions & 1 deletion server/src/handlers/chunk_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2343,7 +2343,6 @@ pub async fn generate_off_chunks(
};

let client = Client {
headers: None,
project: None,
api_key: llm_api_key,
http_client: reqwest::Client::new(),
Expand Down
1 change: 0 additions & 1 deletion server/src/handlers/message_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,6 @@ pub async fn get_suggested_queries(
};

let client = Client {
headers: None,
project: None,
api_key: llm_api_key,
http_client: reqwest::Client::new(),
Expand Down
4 changes: 2 additions & 2 deletions server/src/middleware/api_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ use utoipa::ToSchema;

#[derive(Clone, Debug, PartialEq, Eq, ToSchema, Serialize, Deserialize, Display)]
pub enum APIVersion {
#[display("1.0")]
#[display(fmt = "1.0")]
V1,
#[display("2.0")]
#[display(fmt = "2.0")]
V2,
}

Expand Down
2 changes: 0 additions & 2 deletions server/src/operators/message_operator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ pub async fn stream_response(
};

let client = Client {
headers: None,
project: None,
api_key: llm_api_key,
http_client: reqwest::Client::new(),
Expand Down Expand Up @@ -727,7 +726,6 @@ pub async fn get_topic_string(
};

let client = Client {
headers: None,
api_key: llm_api_key,
project: None,
http_client: reqwest::Client::new(),
Expand Down

0 comments on commit e55860a

Please sign in to comment.