mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-06-19 15:52:08 +00:00
allow converting huggingface::tokenizers error to TensorRtLlmBackendError
This commit is contained in:
parent
40fe2ec0ff
commit
42748d5960
@ -4,6 +4,8 @@ use text_generation_router::server;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum TensorRtLlmBackendError {
|
||||
#[error("Tokenizer error: {0}")]
|
||||
Tokenizer(String),
|
||||
#[error("Argument validation error: {0}")]
|
||||
ArgumentValidation(String),
|
||||
#[error("WebServer error: {0}")]
|
||||
|
@ -122,7 +122,8 @@ async fn main() -> Result<(), TensorRtLlmBackendError> {
|
||||
user_agent: HashMap::new(),
|
||||
auth_token,
|
||||
}),
|
||||
)?;
|
||||
).map_err(|e| TensorRtLlmBackendError::Tokenizer(e.to_string()))?;
|
||||
|
||||
let backend = TrtLLmBackend::new(tokenizer, model_id)?;
|
||||
server::run(
|
||||
backend,
|
||||
|
Loading…
Reference in New Issue
Block a user