pub struct OpenApiToolsetBuilder { /* private fields */ }Expand description
Builder for configuring an OpenApiToolset.
Implementations§
Source§impl OpenApiToolsetBuilder
impl OpenApiToolsetBuilder
Sourcepub fn client(self, client: Client) -> Self
pub fn client(self, client: Client) -> Self
Provide a pre-configured reqwest client (e.g. with default auth headers or timeouts).
Add a hidden context parameter that will be auto-injected into tool calls. The LLM will not see this parameter in the tool schema.
Sourcepub fn bearer_token(self, token: &str) -> Self
pub fn bearer_token(self, token: &str) -> Self
Convenience: configure a bearer token Authorization header for all requests.
Sourcepub fn api_key_header(self, header_name: &str, key: &str) -> Self
pub fn api_key_header(self, header_name: &str, key: &str) -> Self
Inject an arbitrary header into every request (e.g. X-API-Key: abc).
Sourcepub fn api_key_query(self, param_name: &str, key: &str) -> Self
pub fn api_key_query(self, param_name: &str, key: &str) -> Self
Append a static query parameter to every request (e.g. ?api_key=abc).
Sourcepub fn basic_auth(self, username: &str, password: &str) -> Self
pub fn basic_auth(self, username: &str, password: &str) -> Self
Configure HTTP Basic auth applied to every request.
Sourcepub fn build(self) -> Result<OpenApiToolset>
pub fn build(self) -> Result<OpenApiToolset>
Build the toolset, parsing the spec and creating tools.
Auto Trait Implementations§
impl Freeze for OpenApiToolsetBuilder
impl !RefUnwindSafe for OpenApiToolsetBuilder
impl Send for OpenApiToolsetBuilder
impl Sync for OpenApiToolsetBuilder
impl Unpin for OpenApiToolsetBuilder
impl UnsafeUnpin for OpenApiToolsetBuilder
impl !UnwindSafe for OpenApiToolsetBuilder
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