pub struct ChatCompletionMessageToolCallChunk {
pub function: Option<ChatCompletionMessageToolCallChunkFunction>,
pub id: Option<String>,
pub index: i32,
pub _type: Option<String>,
}
Expand description
§on openapi.yaml
ChatCompletionMessageToolCallChunk:
type: object
properties:
index:
type: integer
id:
type: string
description: The ID of the tool call.
type:
type: string
enum:
- function
description: The type of the tool. Currently, only `function` is supported.
x-stainless-const: true
function:
type: object
properties:
name:
type: string
description: The name of the function to call.
arguments:
type: string
description:
The arguments to call the function with, as generated by the model
in JSON format. Note that the model does not always generate
valid JSON, and may hallucinate parameters not defined by your
function schema. Validate the arguments in your code before
calling your function.
required:
- index
Fields§
§function: Option<ChatCompletionMessageToolCallChunkFunction>
§id: Option<String>
The ID of the tool call.
index: i32
§_type: Option<String>
The type of the tool. Currently, only function
is supported.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ChatCompletionMessageToolCallChunk
impl<'de> Deserialize<'de> for ChatCompletionMessageToolCallChunk
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 ChatCompletionMessageToolCallChunk
impl RefUnwindSafe for ChatCompletionMessageToolCallChunk
impl Send for ChatCompletionMessageToolCallChunk
impl Sync for ChatCompletionMessageToolCallChunk
impl Unpin for ChatCompletionMessageToolCallChunk
impl UnwindSafe for ChatCompletionMessageToolCallChunk
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