refactor: move tabby/src/search.rs -> tabby/src/services/search.rs
parent
fce94f622b
commit
7695a667bb
|
|
@ -1842,6 +1842,17 @@ dependencies = [
|
||||||
"want",
|
"want",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "hyper-reverse-proxy"
|
||||||
|
version = "0.5.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "cc1af9b1b483fb9f33bd1cda26b35eacf902f0d116fcf0d56075ea5e5923b935"
|
||||||
|
dependencies = [
|
||||||
|
"hyper",
|
||||||
|
"lazy_static",
|
||||||
|
"unicase",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hyper-timeout"
|
name = "hyper-timeout"
|
||||||
version = "0.4.1"
|
version = "0.4.1"
|
||||||
|
|
@ -4076,6 +4087,7 @@ dependencies = [
|
||||||
"futures",
|
"futures",
|
||||||
"http-api-bindings",
|
"http-api-bindings",
|
||||||
"hyper",
|
"hyper",
|
||||||
|
"hyper-reverse-proxy",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"llama-cpp-bindings",
|
"llama-cpp-bindings",
|
||||||
"mime_guess",
|
"mime_guess",
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@ regex.workspace = true
|
||||||
llama-cpp-bindings = { path = "../llama-cpp-bindings" }
|
llama-cpp-bindings = { path = "../llama-cpp-bindings" }
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
async-trait.workspace = true
|
async-trait.workspace = true
|
||||||
|
hyper-reverse-proxy = "0.5.1"
|
||||||
|
|
||||||
[dependencies.uuid]
|
[dependencies.uuid]
|
||||||
version = "1.3.3"
|
version = "1.3.3"
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
mod chat;
|
mod chat;
|
||||||
mod download;
|
mod download;
|
||||||
mod search;
|
|
||||||
mod serve;
|
mod serve;
|
||||||
|
|
||||||
|
mod services;
|
||||||
|
|
||||||
use clap::{Parser, Subcommand};
|
use clap::{Parser, Subcommand};
|
||||||
use opentelemetry::{
|
use opentelemetry::{
|
||||||
global,
|
global,
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ use self::{
|
||||||
engine::{create_engine, EngineInfo},
|
engine::{create_engine, EngineInfo},
|
||||||
health::HealthState,
|
health::HealthState,
|
||||||
};
|
};
|
||||||
use crate::{chat::ChatService, fatal, search::create_code_search};
|
use crate::{chat::ChatService, fatal};
|
||||||
|
|
||||||
#[derive(OpenApi)]
|
#[derive(OpenApi)]
|
||||||
#[openapi(
|
#[openapi(
|
||||||
|
|
@ -181,7 +181,7 @@ async fn load_model(args: &ServeArgs) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn api_router(args: &ServeArgs, config: &Config) -> Router {
|
async fn api_router(args: &ServeArgs, config: &Config) -> Router {
|
||||||
let code = Arc::new(create_code_search());
|
let code = Arc::new(crate::services::create_code_search());
|
||||||
let completion_state = {
|
let completion_state = {
|
||||||
let (
|
let (
|
||||||
engine,
|
engine,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
mod search;
|
||||||
|
|
||||||
|
pub use search::*;
|
||||||
Loading…
Reference in New Issue