pub struct ContextLengthExceeded {
pub message: String,
}Expand description
The request’s prompt does not fit the model’s context. A ChatGenerator returns it (as the
anyhow error) so the server can answer 400 with OpenAI’s context_length_exceeded code:
OpenAI clients retry a 5xx unchanged, but treat this code as final and shorten the
conversation instead.
Fields§
§message: StringWhat the client is told: which counts did not fit.
Trait Implementations§
Source§impl Clone for ContextLengthExceeded
impl Clone for ContextLengthExceeded
Source§impl Debug for ContextLengthExceeded
impl Debug for ContextLengthExceeded
Source§impl Display for ContextLengthExceeded
impl Display for ContextLengthExceeded
impl Eq for ContextLengthExceeded
Source§impl Error for ContextLengthExceeded
impl Error for ContextLengthExceeded
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for ContextLengthExceeded
impl PartialEq for ContextLengthExceeded
impl StructuralPartialEq for ContextLengthExceeded
Auto Trait Implementations§
impl Forget for ContextLengthExceeded
impl Freeze for ContextLengthExceeded
impl Move for ContextLengthExceeded
impl RefUnwindSafe for ContextLengthExceeded
impl Send for ContextLengthExceeded
impl Sync for ContextLengthExceeded
impl Unpin for ContextLengthExceeded
impl UnsafeUnpin for ContextLengthExceeded
impl UnwindSafe for ContextLengthExceeded
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more