openai_protocol/
parser.rs

1use serde::Deserialize;
2
3use crate::common::Tool;
4
5/// Request to parse function calls from model output text
6#[derive(Deserialize)]
7pub struct ParseFunctionCallRequest {
8    /// The text to parse for function calls
9    pub text: String,
10    /// The parser type/name to use for parsing (e.g., "json", "pythonic")
11    pub tool_call_parser: String,
12    /// The list of available tools that the model can call
13    pub tools: Vec<Tool>,
14}
15
16/// Request to separate reasoning from normal text in model output
17#[derive(Deserialize)]
18pub struct SeparateReasoningRequest {
19    /// The text to parse for reasoning content
20    pub text: String,
21    /// The parser type/name to use for reasoning detection (e.g., "step3", "deepseek_r1")
22    pub reasoning_parser: String,
23}