refactor: move chat.rs to services/ rename search.rs -> code.rs
parent
4069fe735f
commit
8e58ff4003
|
|
@ -1,4 +1,3 @@
|
|||
mod chat;
|
||||
mod download;
|
||||
mod serve;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use axum::{
|
|||
use axum_streams::StreamBodyAs;
|
||||
use tracing::instrument;
|
||||
|
||||
use crate::chat::{ChatCompletionRequest, ChatService};
|
||||
use crate::services::chat::{ChatCompletionRequest, ChatService};
|
||||
|
||||
#[utoipa::path(
|
||||
post,
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ use self::{
|
|||
engine::{create_engine, EngineInfo},
|
||||
health::HealthState,
|
||||
};
|
||||
use crate::{chat::ChatService, fatal};
|
||||
use crate::{fatal, services::chat::ChatService};
|
||||
|
||||
#[derive(OpenApi)]
|
||||
#[openapi(
|
||||
|
|
@ -61,9 +61,9 @@ Install following IDE / Editor extensions to get started with [Tabby](https://gi
|
|||
completions::Snippet,
|
||||
completions::DebugOptions,
|
||||
completions::DebugData,
|
||||
crate::chat::ChatCompletionRequest,
|
||||
crate::chat::Message,
|
||||
crate::chat::ChatCompletionChunk,
|
||||
crate::services::chat::ChatCompletionRequest,
|
||||
crate::services::chat::Message,
|
||||
crate::services::chat::ChatCompletionChunk,
|
||||
health::HealthState,
|
||||
health::Version,
|
||||
SearchResponse,
|
||||
|
|
@ -174,7 +174,7 @@ async fn load_model(args: &ServeArgs) {
|
|||
}
|
||||
|
||||
async fn api_router(args: &ServeArgs, config: &Config) -> Router {
|
||||
let code = Arc::new(crate::services::create_code_search());
|
||||
let code = Arc::new(crate::services::code::create_code_search());
|
||||
let completion_state = {
|
||||
let (
|
||||
engine,
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
mod search;
|
||||
|
||||
pub use search::*;
|
||||
pub mod chat;
|
||||
pub mod code;
|
||||
|
|
|
|||
Loading…
Reference in New Issue