Skip to main content

outfox_openai/spec/shared/
function_call.rs

1use serde::{Deserialize, Serialize};
2
3/// The name and arguments of a function that should be called, as generated by the model.
4#[derive(Debug, Deserialize, Serialize, Clone, PartialEq, Default)]
5pub struct FunctionCall {
6    /// The name of the function to call.
7    pub name: String,
8    /// The arguments to call the function with, as generated by the model in JSON format. Note
9    /// that the model does not always generate valid JSON, and may hallucinate parameters not
10    /// defined by your function schema. Validate the arguments in your code before calling your
11    /// function.
12    pub arguments: String,
13}