remove useless code
parent
300007a288
commit
5cebca4164
|
|
@ -53,12 +53,6 @@ pub struct Segments {
|
||||||
pub suffix: Option<String>,
|
pub suffix: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize)]
|
|
||||||
struct Log<'a> {
|
|
||||||
ts: u128,
|
|
||||||
event: &'a Event<'a>,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub trait EventLogger: Send + Sync {
|
pub trait EventLogger: Send + Sync {
|
||||||
fn log(&self, e: &Event);
|
fn log(&self, e: &Event);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
mod completions_prompt;
|
mod completion_prompt;
|
||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
|
@ -162,7 +162,7 @@ pub struct DebugData {
|
||||||
pub struct CompletionService {
|
pub struct CompletionService {
|
||||||
engine: Arc<dyn TextGeneration>,
|
engine: Arc<dyn TextGeneration>,
|
||||||
logger: Arc<dyn EventLogger>,
|
logger: Arc<dyn EventLogger>,
|
||||||
prompt_builder: completions_prompt::PromptBuilder,
|
prompt_builder: completion_prompt::PromptBuilder,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CompletionService {
|
impl CompletionService {
|
||||||
|
|
@ -174,7 +174,7 @@ impl CompletionService {
|
||||||
) -> Self {
|
) -> Self {
|
||||||
Self {
|
Self {
|
||||||
engine,
|
engine,
|
||||||
prompt_builder: completions_prompt::PromptBuilder::new(prompt_template, Some(code)),
|
prompt_builder: completion_prompt::PromptBuilder::new(prompt_template, Some(code)),
|
||||||
logger,
|
logger,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue