pub struct OllamaProvider {
model: String,
endpoint: Url,
client: Client,
}Fields§
§model: String§endpoint: Url§client: ClientImplementations§
Source§impl OllamaProvider
impl OllamaProvider
pub fn from_definition(definition: &ModelDefinition) -> Result<Self>
fn body(&self, request: &ModelRequest) -> ModelResult<Vec<u8>>
fn decode( &self, body: Value, request: &ModelRequest, ) -> ModelResult<ModelResponse>
Trait Implementations§
Source§impl ModelProvider for OllamaProvider
impl ModelProvider for OllamaProvider
fn generate<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ModelRequest,
) -> Pin<Box<dyn Future<Output = ModelResult<ModelResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for OllamaProvider
impl !UnwindSafe for OllamaProvider
impl Freeze for OllamaProvider
impl Send for OllamaProvider
impl Sync for OllamaProvider
impl Unpin for OllamaProvider
impl UnsafeUnpin for OllamaProvider
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<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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