pub struct FieldMapping {
pub messages_field: String,
pub model_field: String,
pub role_mapping: HashMap<String, String>,
pub response_content_path: String,
}
Expand description
字段映射配置,定义不同API格式的字段映射
Field mapping configuration defining field mappings for different API formats
Fields§
§messages_field: String
Messages array field name (OpenAI: “messages”, Gemini: “contents”)
model_field: String
Model field name
role_mapping: HashMap<String, String>
Role field mapping
response_content_path: String
Response content path (e.g. “choices.0.message.content”)
Trait Implementations§
Source§impl Clone for FieldMapping
impl Clone for FieldMapping
Source§fn clone(&self) -> FieldMapping
fn clone(&self) -> FieldMapping
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 FieldMapping
impl Debug for FieldMapping
Source§impl<'de> Deserialize<'de> for FieldMapping
impl<'de> Deserialize<'de> for FieldMapping
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FieldMapping
impl RefUnwindSafe for FieldMapping
impl Send for FieldMapping
impl Sync for FieldMapping
impl Unpin for FieldMapping
impl UnwindSafe for FieldMapping
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