anylm 0.4.2

The universal API for all AI services that you know
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::chunk::ResponseError;
use macron::{Display, Error, From};

/// The error
#[derive(Debug, Display, Error, From)]
pub enum Error {
    #[display(fmt = "Context is overflowing, try deleting old messages.")]
    ContextOverflowing,

    #[display(fmt = "Bad request - missing a new user message.")]
    BadRequest,

    #[display(fmt = "Base64 encoded string is invalid.")]
    InvalidBase64Url,

    #[display(fmt = "AI-generation error: {0}")]
    ResponseError(ResponseError),
}