feat: add chat completion without streaming
This commit is contained in:
15
src/v1/error.rs
Normal file
15
src/v1/error.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
use std::error::Error;
|
||||
use std::fmt;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct APIError {
|
||||
pub message: String,
|
||||
}
|
||||
|
||||
impl fmt::Display for APIError {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "APIError: {}", self.message)
|
||||
}
|
||||
}
|
||||
|
||||
impl Error for APIError {}
|
||||
Reference in New Issue
Block a user