pub struct CreatePipeRequest {
pub name: String,
pub description: Option<String>,
pub status: Option<PipeStatus>,
pub model: Option<String>,
pub upsert: Option<bool>,
pub stream: Option<bool>,
pub json: Option<bool>,
pub store: Option<bool>,
pub temperature: Option<f64>,
pub max_tokens: Option<u32>,
pub messages: Option<Vec<Message>>,
}Expand description
Request to create a new Langbase pipe.
Fields§
§name: StringPipe name (unique identifier).
description: Option<String>Optional description.
status: Option<PipeStatus>Visibility status.
model: Option<String>Model to use (e.g., “openai:gpt-4o-mini”).
upsert: Option<bool>Whether to update if exists.
stream: Option<bool>Whether to enable streaming.
json: Option<bool>Whether to output JSON.
store: Option<bool>Whether to store conversations.
temperature: Option<f64>Model temperature.
max_tokens: Option<u32>Maximum tokens to generate.
messages: Option<Vec<Message>>Initial messages/prompts.
Implementations§
Source§impl CreatePipeRequest
impl CreatePipeRequest
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Set description
Sourcepub fn with_status(self, status: PipeStatus) -> Self
pub fn with_status(self, status: PipeStatus) -> Self
Set status (public/private)
Sourcepub fn with_model(self, model: impl Into<String>) -> Self
pub fn with_model(self, model: impl Into<String>) -> Self
Set model (e.g., “openai:gpt-4o-mini”)
Sourcepub fn with_upsert(self, upsert: bool) -> Self
pub fn with_upsert(self, upsert: bool) -> Self
Enable upsert (update if exists)
Sourcepub fn with_json_output(self, json: bool) -> Self
pub fn with_json_output(self, json: bool) -> Self
Enable JSON output mode
Sourcepub fn with_temperature(self, temperature: f64) -> Self
pub fn with_temperature(self, temperature: f64) -> Self
Set temperature
Sourcepub fn with_max_tokens(self, max_tokens: u32) -> Self
pub fn with_max_tokens(self, max_tokens: u32) -> Self
Set max tokens
Sourcepub fn with_messages(self, messages: Vec<Message>) -> Self
pub fn with_messages(self, messages: Vec<Message>) -> Self
Set system/user messages
Trait Implementations§
Source§impl Clone for CreatePipeRequest
impl Clone for CreatePipeRequest
Source§fn clone(&self) -> CreatePipeRequest
fn clone(&self) -> CreatePipeRequest
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 CreatePipeRequest
impl Debug for CreatePipeRequest
Auto Trait Implementations§
impl Freeze for CreatePipeRequest
impl RefUnwindSafe for CreatePipeRequest
impl Send for CreatePipeRequest
impl Sync for CreatePipeRequest
impl Unpin for CreatePipeRequest
impl UnwindSafe for CreatePipeRequest
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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