pub struct CloudflareConfig {
pub provider: Provider,
pub api_key: String,
pub model: String,
pub system_prompt: Option<String>,
pub temperature: f32,
pub max_tokens: Option<u32>,
pub stream: bool,
}Expand description
Configuration for the Cloudflare agent
Fields§
§provider: ProviderLLM provider (OpenAI, Anthropic, OpenRouter)
api_key: StringAPI key for the provider
model: StringModel identifier (e.g., “gpt-4”, “claude-3-5-sonnet-20241022”)
system_prompt: Option<String>System prompt for the agent
temperature: f32Temperature for response generation (0.0 - 2.0)
max_tokens: Option<u32>Maximum tokens in response
stream: boolWhether to use streaming responses
Implementations§
Source§impl CloudflareConfig
impl CloudflareConfig
Sourcepub fn builder() -> CloudflareConfigBuilder
pub fn builder() -> CloudflareConfigBuilder
Create a new configuration builder
Trait Implementations§
Source§impl Clone for CloudflareConfig
impl Clone for CloudflareConfig
Source§fn clone(&self) -> CloudflareConfig
fn clone(&self) -> CloudflareConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CloudflareConfig
impl Debug for CloudflareConfig
Auto Trait Implementations§
impl Freeze for CloudflareConfig
impl RefUnwindSafe for CloudflareConfig
impl Send for CloudflareConfig
impl Sync for CloudflareConfig
impl Unpin for CloudflareConfig
impl UnsafeUnpin for CloudflareConfig
impl UnwindSafe for CloudflareConfig
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