pub struct GLMProvider;Expand description
GLM (Zhipu AI) provider.
GLM has some specific requirements:
- Does not support function calling tools
- Messages should be flattened to simple text format
- API path is /chat/completions (not /v1/chat/completions)
Implementations§
Source§impl GLMProvider
impl GLMProvider
Trait Implementations§
Source§impl Default for GLMProvider
impl Default for GLMProvider
Source§impl Provider for GLMProvider
impl Provider for GLMProvider
Source§fn chat_completions_path(&self) -> String
fn chat_completions_path(&self) -> String
Get the chat completions path for this provider. Read more
Source§fn transform_request(&self, request: &mut ChatRequest)
fn transform_request(&self, request: &mut ChatRequest)
Transform request before sending to provider. Read more
Source§fn transform_response(&self, response: &mut ChatResponse)
fn transform_response(&self, response: &mut ChatResponse)
Transform response after receiving from provider. Read more
Source§fn transform_stream_chunk(&self, chunk: &mut ChatStreamChunk)
fn transform_stream_chunk(&self, chunk: &mut ChatStreamChunk)
Transform streaming chunk in real-time. Read more
Source§fn display_name(&self) -> &str
fn display_name(&self) -> &str
Get the display name for logging and diagnostics. Read more
Source§fn normalize_model(&self, model: String) -> String
fn normalize_model(&self, model: String) -> String
Normalize model name from Responses API to provider’s format.
Auto Trait Implementations§
impl Freeze for GLMProvider
impl RefUnwindSafe for GLMProvider
impl Send for GLMProvider
impl Sync for GLMProvider
impl Unpin for GLMProvider
impl UnsafeUnpin for GLMProvider
impl UnwindSafe for GLMProvider
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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