pub struct Output {
pub choices: Option<Vec<Choices>>,
pub text: Option<String>,
pub finish_reason: Option<String>,
pub search_info: Option<SearchInfo>,
}
Fields§
§choices: Option<Vec<Choices>>
模型的输出信息。当result_format为message时返回choices参数。
text: Option<String>
模型生成的回复。当设置输入参数result_format为text时将回复内容返回到该字段。
finish_reason: Option<String>
当设置输入参数result_format为text时该参数不为空。 有四种情况:
- 正在生成时为null;
- 因模型输出自然结束,或触发输入参数中的stop条件而结束时为stop;
- 因生成长度过长而结束为length;
- 因发生工具调用为tool_calls。
search_info: Option<SearchInfo>
联网搜索到的信息,在设置search_options参数后会返回该参数。
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Output
impl<'de> Deserialize<'de> for Output
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 Output
impl RefUnwindSafe for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnwindSafe for Output
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