pub struct AgentBridge { /* private fields */ }Expand description
Bridge connecting limit-cli REPL to limit-agent executor and limit-llm client
Implementations§
Source§impl AgentBridge
impl AgentBridge
Sourcepub fn with_tracking_db(
config: Config,
tracking_db: TrackingDb,
) -> Result<Self, CliError>
pub fn with_tracking_db( config: Config, tracking_db: TrackingDb, ) -> Result<Self, CliError>
Create a new AgentBridge with a custom tracking database
Sourcepub fn set_event_tx(&mut self, tx: UnboundedSender<AgentEvent>)
pub fn set_event_tx(&mut self, tx: UnboundedSender<AgentEvent>)
Set the event channel sender for streaming events
Sourcepub fn set_cancellation_token(
&mut self,
token: CancellationToken,
operation_id: u64,
)
pub fn set_cancellation_token( &mut self, token: CancellationToken, operation_id: u64, )
Set the cancellation token and operation ID for this operation
Sourcepub fn clear_cancellation_token(&mut self)
pub fn clear_cancellation_token(&mut self)
Clear the cancellation token
Sourcepub async fn process_message(
&mut self,
user_input: &str,
_messages: &mut Vec<Message>,
) -> Result<String, CliError>
pub async fn process_message( &mut self, user_input: &str, _messages: &mut Vec<Message>, ) -> Result<String, CliError>
Sourcepub fn get_tool_definitions(&self) -> Vec<LlmTool>
pub fn get_tool_definitions(&self) -> Vec<LlmTool>
Get tool definitions formatted for the LLM
Sourcepub fn max_tokens(&self) -> u32
pub fn max_tokens(&self) -> u32
Get the max tokens setting
Auto Trait Implementations§
impl Freeze for AgentBridge
impl !RefUnwindSafe for AgentBridge
impl Send for AgentBridge
impl Sync for AgentBridge
impl Unpin for AgentBridge
impl UnsafeUnpin for AgentBridge
impl !UnwindSafe for AgentBridge
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
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