pub enum InputItem {
Message {
role: Role,
content: Vec<InputContent>,
},
WebSearchCall(WebSearchCall),
FunctionCall {
call_id: String,
name: String,
arguments: String,
},
FunctionCallOutput {
call_id: String,
output: String,
},
}
Expand description
OpenAI API JSON 定義。 入力エレメント。
https://platform.openai.com/docs/api-reference/responses/create
Variants§
Message
Input Message or Output Message.
Fields
§
role: Role
Input か Output かは role で決まる。
- Input : Role = user | developer
- Output: Role = assistant
Output では id, status, type が Required になっているが多分嘘。
§
content: Vec<InputContent>
string | array image やファイルも含める場合はオブジェクト配列にする必要がある。
WebSearchCall(WebSearchCall)
The results of a web search tool call.
FunctionCall
A tool call to run a function.
Fields
FunctionCallOutput
The output of a function tool call.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for InputItem
impl RefUnwindSafe for InputItem
impl Send for InputItem
impl Sync for InputItem
impl Unpin for InputItem
impl UnwindSafe for InputItem
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
§impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
fn clone_storage(&self) -> Box<dyn CloneDebuggableStorage>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CloneableStorage for T
impl<T> CloneableStorage for T
fn clone_storage(&self) -> Box<dyn CloneableStorage>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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