openai_protocol/
parser.rs1use serde::{Deserialize, Serialize};
2
3use crate::common::Tool;
4
5#[derive(Debug, Clone, Serialize, Deserialize, schemars::JsonSchema)]
7pub struct ParseFunctionCallRequest {
8 pub text: String,
10 pub tool_call_parser: String,
12 pub tools: Vec<Tool>,
14}
15
16#[derive(Debug, Clone, Serialize, Deserialize, schemars::JsonSchema)]
18pub struct ParseFunctionCallResponse {
19 pub remaining_text: String,
21 pub tool_calls: Vec<serde_json::Value>,
23 pub success: bool,
25}
26
27#[derive(Debug, Clone, Serialize, Deserialize, schemars::JsonSchema)]
29pub struct SeparateReasoningRequest {
30 pub text: String,
32 pub reasoning_parser: String,
34}
35
36#[derive(Debug, Clone, Serialize, Deserialize, schemars::JsonSchema)]
38pub struct SeparateReasoningResponse {
39 pub normal_text: String,
41 pub reasoning_text: String,
43 pub success: bool,
45}