gproxy_protocol/protocol/openai/common/enums/
tools.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
4#[non_exhaustive]
5pub enum ToolSearchExecution {
6 #[serde(rename = "server")]
7 Server,
8 #[serde(rename = "client")]
9 Client,
10}
11
12strict_string_enum!(ToolChoiceMode {
13 None => "none",
14 Auto => "auto",
15 Required => "required",
16});
17
18strict_string_enum!(AllowedToolsMode {
19 Auto => "auto",
20 Required => "required",
21});
22
23strict_string_enum!(ToolCaller {
24 Direct => "direct",
25 Programmatic => "programmatic",
26});
27
28#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
29#[non_exhaustive]
30pub enum ChatToolCallType {
31 #[serde(rename = "function")]
32 Function,
33 #[serde(rename = "custom")]
34 Custom,
35}
36
37strict_string_enum!(CustomToolGrammarSyntax {
38 Lark => "lark",
39 Regex => "regex",
40});
41
42strict_string_enum!(CodeInterpreterContainerType {
43 Auto => "auto",
44});
45
46strict_string_enum!(CodeInterpreterMemoryLimit {
47 OneG => "1g",
48 FourG => "4g",
49 SixteenG => "16g",
50 SixtyFourG => "64g",
51});
52
53strict_string_enum!(ImageGenerationAction {
54 Generate => "generate",
55 Edit => "edit",
56 Auto => "auto",
57});
58
59strict_string_enum!(ToolType {
60 Function => "function",
61 Custom => "custom",
62 FileSearch => "file_search",
63 WebSearchPreview => "web_search_preview",
64 WebSearchPreview20250311 => "web_search_preview_2025_03_11",
65 WebSearch => "web_search",
66 WebSearch20250826 => "web_search_2025_08_26",
67 XSearch => "x_search",
68 CollectionsSearch => "collections_search",
69 Computer => "computer",
70 ComputerUse => "computer_use",
71 ComputerUsePreview => "computer_use_preview",
72 CodeExecution => "code_execution",
73 CodeInterpreter => "code_interpreter",
74 ImageGeneration => "image_generation",
75 Mcp => "mcp",
76 ApplyPatch => "apply_patch",
77 Shell => "shell",
78 LocalShell => "local_shell",
79 ToolSearch => "tool_search",
80 Namespace => "namespace",
81 ProgrammaticToolCalling => "programmatic_tool_calling",
82});