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