pub struct OpenAiModel { /* private fields */ }Expand description
An OpenAI-compatible chat model endpoint.
Implementations§
Source§impl OpenAiModel
impl OpenAiModel
pub fn new(config: OpenAiConfig) -> Result<Self, LlmError>
Trait Implementations§
Source§impl ChatModel for OpenAiModel
impl ChatModel for OpenAiModel
Source§fn chat(
&self,
request: ChatRequest,
) -> BoxFuture<'_, Result<ChatStream, LlmError>>
fn chat( &self, request: ChatRequest, ) -> BoxFuture<'_, Result<ChatStream, LlmError>>
Start a streaming chat completion.
Source§impl Clone for OpenAiModel
impl Clone for OpenAiModel
Auto Trait Implementations§
impl !RefUnwindSafe for OpenAiModel
impl !UnwindSafe for OpenAiModel
impl Forget for OpenAiModel
impl Freeze for OpenAiModel
impl Move for OpenAiModel
impl Send for OpenAiModel
impl Sync for OpenAiModel
impl Unpin for OpenAiModel
impl UnsafeUnpin for OpenAiModel
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