Enum chat_prompts::chat::ChatPrompt

source ·
pub enum ChatPrompt {
Show 35 variants Llama2ChatPrompt(Llama2ChatPrompt), Llama3ChatPrompt(Llama3ChatPrompt), Llama3ToolPrompt(Llama3ToolPrompt), MistralInstructPrompt(MistralInstructPrompt), MistralToolPrompt(MistralToolPrompt), MistralLitePrompt(MistralLitePrompt), OpenChatPrompt(OpenChatPrompt), CodeLlamaInstructPrompt(CodeLlamaInstructPrompt), CodeLlamaSuperInstructPrompt(CodeLlamaSuperInstructPrompt), HumanAssistantChatPrompt(HumanAssistantChatPrompt), VicunaChatPrompt(VicunaChatPrompt), Vicuna11ChatPrompt(Vicuna11ChatPrompt), VicunaLlavaPrompt(VicunaLlavaPrompt), ChatMLPrompt(ChatMLPrompt), ChatMLToolPrompt(ChatMLToolPrompt), InternLM2ToolPrompt(InternLM2ToolPrompt), Baichuan2ChatPrompt(Baichuan2ChatPrompt), WizardCoderPrompt(WizardCoderPrompt), ZephyrChatPrompt(ZephyrChatPrompt), StableLMZephyrChatPrompt(StableLMZephyrChatPrompt), NeuralChatPrompt(NeuralChatPrompt), DeepseekChatPrompt(DeepseekChatPrompt), DeepseekCoderPrompt(DeepseekCoderPrompt), DeepseekChat2Prompt(DeepseekChat2Prompt), DeepseekChat25Prompt(DeepseekChat25Prompt), SolarInstructPrompt(SolarInstructPrompt), Phi2ChatPrompt(Phi2ChatPrompt), Phi2InstructPrompt(Phi2InstructPrompt), Phi3ChatPrompt(Phi3ChatPrompt), Phi3InstructPrompt(Phi3InstructPrompt), GemmaInstructPrompt(GemmaInstructPrompt), OctopusPrompt(OctopusPrompt), Glm4ChatPrompt(Glm4ChatPrompt), GroqLlama3ToolPrompt(GroqLlama3ToolPrompt), BreezeInstructPrompt(BreezeInstructPrompt),
}

Variants§

§

Llama2ChatPrompt(Llama2ChatPrompt)

§

Llama3ChatPrompt(Llama3ChatPrompt)

§

Llama3ToolPrompt(Llama3ToolPrompt)

§

MistralInstructPrompt(MistralInstructPrompt)

§

MistralToolPrompt(MistralToolPrompt)

§

MistralLitePrompt(MistralLitePrompt)

§

OpenChatPrompt(OpenChatPrompt)

§

CodeLlamaInstructPrompt(CodeLlamaInstructPrompt)

§

CodeLlamaSuperInstructPrompt(CodeLlamaSuperInstructPrompt)

§

HumanAssistantChatPrompt(HumanAssistantChatPrompt)

§

VicunaChatPrompt(VicunaChatPrompt)

Vicuna 1.0

§

Vicuna11ChatPrompt(Vicuna11ChatPrompt)

Vicuna 1.1

§

VicunaLlavaPrompt(VicunaLlavaPrompt)

§

ChatMLPrompt(ChatMLPrompt)

§

ChatMLToolPrompt(ChatMLToolPrompt)

§

InternLM2ToolPrompt(InternLM2ToolPrompt)

§

Baichuan2ChatPrompt(Baichuan2ChatPrompt)

§

WizardCoderPrompt(WizardCoderPrompt)

§

ZephyrChatPrompt(ZephyrChatPrompt)

§

StableLMZephyrChatPrompt(StableLMZephyrChatPrompt)

§

NeuralChatPrompt(NeuralChatPrompt)

§

DeepseekChatPrompt(DeepseekChatPrompt)

§

DeepseekCoderPrompt(DeepseekCoderPrompt)

§

DeepseekChat2Prompt(DeepseekChat2Prompt)

§

DeepseekChat25Prompt(DeepseekChat25Prompt)

§

SolarInstructPrompt(SolarInstructPrompt)

§

Phi2ChatPrompt(Phi2ChatPrompt)

§

Phi2InstructPrompt(Phi2InstructPrompt)

§

Phi3ChatPrompt(Phi3ChatPrompt)

§

Phi3InstructPrompt(Phi3InstructPrompt)

§

GemmaInstructPrompt(GemmaInstructPrompt)

§

OctopusPrompt(OctopusPrompt)

§

Glm4ChatPrompt(Glm4ChatPrompt)

§

GroqLlama3ToolPrompt(GroqLlama3ToolPrompt)

§

BreezeInstructPrompt(BreezeInstructPrompt)

Trait Implementations§

source§

impl BuildChatPrompt for ChatPrompt

source§

fn build( &self, __enum_dispatch_arg_0: &mut Vec<ChatCompletionRequestMessage>, ) -> Result<String>

source§

fn build_with_tools( &self, __enum_dispatch_arg_0: &mut Vec<ChatCompletionRequestMessage>, __enum_dispatch_arg_1: Option<&[Tool]>, ) -> Result<String>

source§

impl From<Baichuan2ChatPrompt> for ChatPrompt

source§

fn from(v: Baichuan2ChatPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<BreezeInstructPrompt> for ChatPrompt

source§

fn from(v: BreezeInstructPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<ChatMLPrompt> for ChatPrompt

source§

fn from(v: ChatMLPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<ChatMLToolPrompt> for ChatPrompt

source§

fn from(v: ChatMLToolPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<CodeLlamaInstructPrompt> for ChatPrompt

source§

fn from(v: CodeLlamaInstructPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<CodeLlamaSuperInstructPrompt> for ChatPrompt

source§

fn from(v: CodeLlamaSuperInstructPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<DeepseekChat25Prompt> for ChatPrompt

source§

fn from(v: DeepseekChat25Prompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<DeepseekChat2Prompt> for ChatPrompt

source§

fn from(v: DeepseekChat2Prompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<DeepseekChatPrompt> for ChatPrompt

source§

fn from(v: DeepseekChatPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<DeepseekCoderPrompt> for ChatPrompt

source§

fn from(v: DeepseekCoderPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<GemmaInstructPrompt> for ChatPrompt

source§

fn from(v: GemmaInstructPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<Glm4ChatPrompt> for ChatPrompt

source§

fn from(v: Glm4ChatPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<GroqLlama3ToolPrompt> for ChatPrompt

source§

fn from(v: GroqLlama3ToolPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<HumanAssistantChatPrompt> for ChatPrompt

source§

fn from(v: HumanAssistantChatPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<InternLM2ToolPrompt> for ChatPrompt

source§

fn from(v: InternLM2ToolPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<Llama2ChatPrompt> for ChatPrompt

source§

fn from(v: Llama2ChatPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<Llama3ChatPrompt> for ChatPrompt

source§

fn from(v: Llama3ChatPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<Llama3ToolPrompt> for ChatPrompt

source§

fn from(v: Llama3ToolPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<MistralInstructPrompt> for ChatPrompt

source§

fn from(v: MistralInstructPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<MistralLitePrompt> for ChatPrompt

source§

fn from(v: MistralLitePrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<MistralToolPrompt> for ChatPrompt

source§

fn from(v: MistralToolPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<NeuralChatPrompt> for ChatPrompt

source§

fn from(v: NeuralChatPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<OctopusPrompt> for ChatPrompt

source§

fn from(v: OctopusPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<OpenChatPrompt> for ChatPrompt

source§

fn from(v: OpenChatPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<Phi2ChatPrompt> for ChatPrompt

source§

fn from(v: Phi2ChatPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<Phi2InstructPrompt> for ChatPrompt

source§

fn from(v: Phi2InstructPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<Phi3ChatPrompt> for ChatPrompt

source§

fn from(v: Phi3ChatPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<Phi3InstructPrompt> for ChatPrompt

source§

fn from(v: Phi3InstructPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<PromptTemplateType> for ChatPrompt

source§

fn from(ty: PromptTemplateType) -> Self

Converts to this type from the input type.
source§

impl From<SolarInstructPrompt> for ChatPrompt

source§

fn from(v: SolarInstructPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<StableLMZephyrChatPrompt> for ChatPrompt

source§

fn from(v: StableLMZephyrChatPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<Vicuna11ChatPrompt> for ChatPrompt

source§

fn from(v: Vicuna11ChatPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<VicunaChatPrompt> for ChatPrompt

source§

fn from(v: VicunaChatPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<VicunaLlavaPrompt> for ChatPrompt

source§

fn from(v: VicunaLlavaPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<WizardCoderPrompt> for ChatPrompt

source§

fn from(v: WizardCoderPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl From<ZephyrChatPrompt> for ChatPrompt

source§

fn from(v: ZephyrChatPrompt) -> ChatPrompt

Converts to this type from the input type.
source§

impl TryInto<Baichuan2ChatPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<Baichuan2ChatPrompt, <Self as TryInto<Baichuan2ChatPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<BreezeInstructPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<BreezeInstructPrompt, <Self as TryInto<BreezeInstructPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<ChatMLPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<ChatMLPrompt, <Self as TryInto<ChatMLPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<ChatMLToolPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<ChatMLToolPrompt, <Self as TryInto<ChatMLToolPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<CodeLlamaInstructPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<CodeLlamaInstructPrompt, <Self as TryInto<CodeLlamaInstructPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<CodeLlamaSuperInstructPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<CodeLlamaSuperInstructPrompt, <Self as TryInto<CodeLlamaSuperInstructPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<DeepseekChat25Prompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<DeepseekChat25Prompt, <Self as TryInto<DeepseekChat25Prompt>>::Error>

Performs the conversion.
source§

impl TryInto<DeepseekChat2Prompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<DeepseekChat2Prompt, <Self as TryInto<DeepseekChat2Prompt>>::Error>

Performs the conversion.
source§

impl TryInto<DeepseekChatPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<DeepseekChatPrompt, <Self as TryInto<DeepseekChatPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<DeepseekCoderPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<DeepseekCoderPrompt, <Self as TryInto<DeepseekCoderPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<GemmaInstructPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<GemmaInstructPrompt, <Self as TryInto<GemmaInstructPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<Glm4ChatPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<Glm4ChatPrompt, <Self as TryInto<Glm4ChatPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<GroqLlama3ToolPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<GroqLlama3ToolPrompt, <Self as TryInto<GroqLlama3ToolPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<HumanAssistantChatPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<HumanAssistantChatPrompt, <Self as TryInto<HumanAssistantChatPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<InternLM2ToolPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<InternLM2ToolPrompt, <Self as TryInto<InternLM2ToolPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<Llama2ChatPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<Llama2ChatPrompt, <Self as TryInto<Llama2ChatPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<Llama3ChatPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<Llama3ChatPrompt, <Self as TryInto<Llama3ChatPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<Llama3ToolPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<Llama3ToolPrompt, <Self as TryInto<Llama3ToolPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<MistralInstructPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<MistralInstructPrompt, <Self as TryInto<MistralInstructPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<MistralLitePrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<MistralLitePrompt, <Self as TryInto<MistralLitePrompt>>::Error>

Performs the conversion.
source§

impl TryInto<MistralToolPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<MistralToolPrompt, <Self as TryInto<MistralToolPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<NeuralChatPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<NeuralChatPrompt, <Self as TryInto<NeuralChatPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<OctopusPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<OctopusPrompt, <Self as TryInto<OctopusPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<OpenChatPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<OpenChatPrompt, <Self as TryInto<OpenChatPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<Phi2ChatPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<Phi2ChatPrompt, <Self as TryInto<Phi2ChatPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<Phi2InstructPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<Phi2InstructPrompt, <Self as TryInto<Phi2InstructPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<Phi3ChatPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<Phi3ChatPrompt, <Self as TryInto<Phi3ChatPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<Phi3InstructPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<Phi3InstructPrompt, <Self as TryInto<Phi3InstructPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<SolarInstructPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<SolarInstructPrompt, <Self as TryInto<SolarInstructPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<StableLMZephyrChatPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<StableLMZephyrChatPrompt, <Self as TryInto<StableLMZephyrChatPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<Vicuna11ChatPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<Vicuna11ChatPrompt, <Self as TryInto<Vicuna11ChatPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<VicunaChatPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<VicunaChatPrompt, <Self as TryInto<VicunaChatPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<VicunaLlavaPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<VicunaLlavaPrompt, <Self as TryInto<VicunaLlavaPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<WizardCoderPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<WizardCoderPrompt, <Self as TryInto<WizardCoderPrompt>>::Error>

Performs the conversion.
source§

impl TryInto<ZephyrChatPrompt> for ChatPrompt

source§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self, ) -> Result<ZephyrChatPrompt, <Self as TryInto<ZephyrChatPrompt>>::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
source§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.