pub struct JsonOutputParser<T> { /* private fields */ }Expand description
Extracts JSON from LLM responses and deserializes into T.
Handles common LLM quirks:
- JSON wrapped in markdown code fences
- JSON embedded in surrounding prose
- Leading/trailing whitespace
Implementations§
Source§impl<T> JsonOutputParser<T>
impl<T> JsonOutputParser<T>
Trait Implementations§
Source§impl<T> Default for JsonOutputParser<T>
impl<T> Default for JsonOutputParser<T>
Source§impl<T: DeserializeOwned + Send + Sync> OutputParser for JsonOutputParser<T>
impl<T: DeserializeOwned + Send + Sync> OutputParser for JsonOutputParser<T>
Auto Trait Implementations§
impl<T> Freeze for JsonOutputParser<T>
impl<T> RefUnwindSafe for JsonOutputParser<T>where
T: RefUnwindSafe,
impl<T> Send for JsonOutputParser<T>where
T: Send,
impl<T> Sync for JsonOutputParser<T>where
T: Sync,
impl<T> Unpin for JsonOutputParser<T>where
T: Unpin,
impl<T> UnsafeUnpin for JsonOutputParser<T>
impl<T> UnwindSafe for JsonOutputParser<T>where
T: UnwindSafe,
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