1#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct SubmitMessageFeedbackRequest {
4 #[prost(string, tag = "1")]
5 pub conversation_rid: ::prost::alloc::string::String,
6 #[prost(string, tag = "2")]
7 pub message_id: ::prost::alloc::string::String,
8 #[prost(enumeration = "FeedbackVote", tag = "3")]
9 pub vote: i32,
10 #[prost(string, optional, tag = "4")]
11 pub comment: ::core::option::Option<::prost::alloc::string::String>,
12}
13#[derive(Clone, Copy, PartialEq, ::prost::Message)]
14pub struct SubmitMessageFeedbackResponse {}
15#[derive(Clone, PartialEq, ::prost::Message)]
16pub struct GetSnapshotRidByUserMessageIdRequest {
17 #[prost(string, tag = "1")]
18 pub conversation_rid: ::prost::alloc::string::String,
19 #[prost(string, tag = "2")]
20 pub message_id: ::prost::alloc::string::String,
21}
22#[derive(Clone, PartialEq, ::prost::Message)]
23pub struct GetSnapshotRidByUserMessageIdResponse {
24 #[prost(
25 oneof = "get_snapshot_rid_by_user_message_id_response::RestorePoint",
26 tags = "1, 2"
27 )]
28 pub restore_point: ::core::option::Option<
29 get_snapshot_rid_by_user_message_id_response::RestorePoint,
30 >,
31}
32pub mod get_snapshot_rid_by_user_message_id_response {
34 #[derive(Clone, PartialEq, ::prost::Oneof)]
35 pub enum RestorePoint {
36 #[prost(string, tag = "1")]
37 SnapshotRid(::prost::alloc::string::String),
38 #[prost(string, tag = "2")]
39 CommitId(::prost::alloc::string::String),
40 }
41}
42#[derive(Clone, Copy, PartialEq, ::prost::Message)]
43pub struct ReadOnlyMode {}
44#[derive(Clone, Copy, PartialEq, ::prost::Message)]
45pub struct EditMode {
46 #[prost(bool, optional, tag = "1")]
47 pub auto_accept: ::core::option::Option<bool>,
48}
49#[derive(Clone, Copy, PartialEq, ::prost::Message)]
50pub struct ConversationMode {
51 #[prost(oneof = "conversation_mode::Mode", tags = "1, 2")]
52 pub mode: ::core::option::Option<conversation_mode::Mode>,
53}
54pub mod conversation_mode {
56 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
57 pub enum Mode {
58 #[prost(message, tag = "1")]
59 ReadOnly(super::ReadOnlyMode),
60 #[prost(message, tag = "2")]
61 Edit(super::EditMode),
62 }
63}
64#[derive(Clone, PartialEq, ::prost::Message)]
65pub struct ToolApprovalResult {
66 #[prost(string, tag = "1")]
67 pub tool_call_id: ::prost::alloc::string::String,
68 #[prost(oneof = "tool_approval_result::Response", tags = "2, 3")]
69 pub response: ::core::option::Option<tool_approval_result::Response>,
70}
71pub mod tool_approval_result {
73 #[derive(Clone, PartialEq, ::prost::Oneof)]
74 pub enum Response {
75 #[prost(message, tag = "2")]
76 Approved(super::ToolApprovedResponse),
77 #[prost(message, tag = "3")]
78 Denied(super::ToolDeniedResponse),
79 }
80}
81#[derive(Clone, PartialEq, ::prost::Message)]
82pub struct ToolApprovedResponse {
83 #[prost(string, optional, tag = "1")]
84 pub override_args: ::core::option::Option<::prost::alloc::string::String>,
85}
86#[derive(Clone, PartialEq, ::prost::Message)]
87pub struct ToolDeniedResponse {
88 #[prost(string, tag = "2")]
89 pub denial_reason: ::prost::alloc::string::String,
90}
91#[derive(Clone, Copy, PartialEq, ::prost::Message)]
92pub struct RetryRequest {}
93#[derive(Clone, PartialEq, ::prost::Message)]
94pub struct UserPromptRequest {
95 #[prost(message, optional, tag = "1")]
96 pub message: ::core::option::Option<UserModelMessage>,
97 #[prost(message, repeated, tag = "2")]
98 pub images: ::prost::alloc::vec::Vec<ImagePart>,
99}
100#[derive(Clone, PartialEq, ::prost::Message)]
101pub struct ToolApprovalRequest {
102 #[prost(message, repeated, tag = "1")]
103 pub tool_approvals: ::prost::alloc::vec::Vec<ToolApprovalResult>,
104}
105#[derive(Clone, PartialEq, ::prost::Message)]
106pub struct StreamChatRequest {
107 #[prost(string, tag = "1")]
108 pub conversation_rid: ::prost::alloc::string::String,
109 #[deprecated]
110 #[prost(message, optional, tag = "2")]
111 pub message: ::core::option::Option<UserModelMessage>,
112 #[deprecated]
113 #[prost(message, repeated, tag = "3")]
114 pub images: ::prost::alloc::vec::Vec<ImagePart>,
115 #[deprecated]
116 #[prost(message, repeated, tag = "6")]
117 pub tool_approvals: ::prost::alloc::vec::Vec<ToolApprovalResult>,
118 #[prost(oneof = "stream_chat_request::RequestType", tags = "7, 8, 9")]
119 pub request_type: ::core::option::Option<stream_chat_request::RequestType>,
120 #[prost(oneof = "stream_chat_request::Context", tags = "4, 5, 10, 11")]
121 pub context: ::core::option::Option<stream_chat_request::Context>,
122}
123pub mod stream_chat_request {
125 #[derive(Clone, PartialEq, ::prost::Oneof)]
126 pub enum RequestType {
127 #[prost(message, tag = "7")]
128 Retry(super::RetryRequest),
129 #[prost(message, tag = "8")]
130 UserPrompt(super::UserPromptRequest),
131 #[prost(message, tag = "9")]
132 ToolApproval(super::ToolApprovalRequest),
133 }
134 #[derive(Clone, PartialEq, ::prost::Oneof)]
135 pub enum Context {
136 #[prost(message, tag = "4")]
137 Workbook(super::WorkbookContext),
138 #[prost(message, tag = "5")]
139 Global(super::GlobalContext),
140 #[prost(message, tag = "10")]
141 Checklist(super::ChecklistContext),
142 #[prost(message, tag = "11")]
143 Template(super::TemplateContext),
144 }
145}
146#[derive(Clone, PartialEq, ::prost::Message)]
147pub struct WorkbookContext {
148 #[prost(string, tag = "1")]
149 pub workbook_rid: ::prost::alloc::string::String,
150 #[deprecated]
151 #[prost(message, optional, tag = "2")]
152 pub user_presence: ::core::option::Option<WorkbookUserPresence>,
153 #[prost(string, optional, tag = "3")]
154 pub active_tab_id: ::core::option::Option<::prost::alloc::string::String>,
155}
156#[derive(Clone, PartialEq, ::prost::Message)]
157pub struct ChecklistContext {
158 #[prost(string, tag = "1")]
159 pub checklist_rid: ::prost::alloc::string::String,
160 #[prost(string, tag = "2")]
161 pub branch_name: ::prost::alloc::string::String,
162 #[prost(oneof = "checklist_context::ReferenceRid", tags = "3, 4")]
163 pub reference_rid: ::core::option::Option<checklist_context::ReferenceRid>,
164}
165pub mod checklist_context {
167 #[derive(Clone, PartialEq, ::prost::Oneof)]
168 pub enum ReferenceRid {
169 #[prost(string, tag = "3")]
170 Asset(::prost::alloc::string::String),
171 #[prost(string, tag = "4")]
172 Run(::prost::alloc::string::String),
173 }
174}
175#[derive(Clone, PartialEq, ::prost::Message)]
176pub struct TemplateContext {
177 #[prost(string, tag = "1")]
178 pub template_rid: ::prost::alloc::string::String,
179 #[prost(string, tag = "2")]
180 pub branch_name: ::prost::alloc::string::String,
181 #[prost(oneof = "template_context::ReferenceRid", tags = "3, 4")]
182 pub reference_rid: ::core::option::Option<template_context::ReferenceRid>,
183}
184pub mod template_context {
186 #[derive(Clone, PartialEq, ::prost::Oneof)]
187 pub enum ReferenceRid {
188 #[prost(string, tag = "3")]
189 Asset(::prost::alloc::string::String),
190 #[prost(string, tag = "4")]
191 Run(::prost::alloc::string::String),
192 }
193}
194#[derive(Clone, Copy, PartialEq, ::prost::Message)]
195pub struct GlobalContext {}
196#[derive(Clone, Copy, PartialEq, ::prost::Message)]
197pub struct WorkbookUserPresence {
198 #[prost(int32, tag = "1")]
199 pub tab_index: i32,
200 #[prost(message, optional, tag = "2")]
201 pub range: ::core::option::Option<TimeRange>,
202}
203#[derive(Clone, PartialEq, ::prost::Message)]
204pub struct CreateConversationRequest {
205 #[prost(string, tag = "1")]
206 pub title: ::prost::alloc::string::String,
207 #[prost(string, tag = "2")]
208 pub workspace_rid: ::prost::alloc::string::String,
209 #[prost(string, optional, tag = "3")]
210 pub old_conversation_rid: ::core::option::Option<::prost::alloc::string::String>,
211 #[prost(string, optional, tag = "4")]
212 pub previous_message_id: ::core::option::Option<::prost::alloc::string::String>,
213 #[prost(message, optional, tag = "5")]
214 pub conversation_mode: ::core::option::Option<ConversationMode>,
215 #[prost(string, optional, tag = "6")]
216 pub backing_workbook_rid: ::core::option::Option<::prost::alloc::string::String>,
217}
218#[derive(Clone, PartialEq, ::prost::Message)]
219pub struct CreateConversationResponse {
220 #[prost(string, tag = "1")]
221 pub new_conversation_rid: ::prost::alloc::string::String,
222}
223#[derive(Clone, PartialEq, ::prost::Message)]
224pub struct UpdateConversationMetadataRequest {
225 #[prost(string, optional, tag = "1")]
226 pub title: ::core::option::Option<::prost::alloc::string::String>,
227 #[prost(string, tag = "2")]
228 pub conversation_rid: ::prost::alloc::string::String,
229 #[prost(message, optional, tag = "3")]
230 pub conversation_mode: ::core::option::Option<ConversationMode>,
231}
232#[derive(Clone, Copy, PartialEq, ::prost::Message)]
233pub struct UpdateConversationMetadataResponse {}
234#[derive(Clone, PartialEq, ::prost::Message)]
235pub struct DeleteConversationRequest {
236 #[prost(string, tag = "1")]
237 pub conversation_rid: ::prost::alloc::string::String,
238}
239#[derive(Clone, Copy, PartialEq, ::prost::Message)]
240pub struct DeleteConversationResponse {}
241#[derive(Clone, PartialEq, ::prost::Message)]
242pub struct GetConversationRequest {
243 #[prost(string, tag = "1")]
244 pub conversation_rid: ::prost::alloc::string::String,
245 #[prost(string, optional, tag = "2")]
246 pub page_start_message_id: ::core::option::Option<::prost::alloc::string::String>,
247 #[prost(int32, optional, tag = "3")]
248 pub max_message_count: ::core::option::Option<i32>,
249}
250#[derive(Clone, PartialEq, ::prost::Message)]
251pub struct CompactConversationRequest {
252 #[prost(string, tag = "1")]
253 pub conversation_rid: ::prost::alloc::string::String,
254}
255#[derive(Clone, Copy, PartialEq, ::prost::Message)]
256pub struct CompactConversationResponse {
257 #[prost(message, optional, tag = "1")]
258 pub context: ::core::option::Option<ContextStatus>,
259}
260#[derive(Clone, PartialEq, ::prost::Message)]
261pub struct ModelMessageWithId {
262 #[prost(string, tag = "3")]
263 pub message_id: ::prost::alloc::string::String,
264 #[prost(message, repeated, tag = "5")]
265 pub tool_approval_requests: ::prost::alloc::vec::Vec<ToolCallDescription>,
266 #[prost(oneof = "model_message_with_id::Content", tags = "1, 2, 6")]
267 pub content: ::core::option::Option<model_message_with_id::Content>,
268 #[prost(oneof = "model_message_with_id::RestorePoint", tags = "4, 7")]
269 pub restore_point: ::core::option::Option<model_message_with_id::RestorePoint>,
270}
271pub mod model_message_with_id {
273 #[derive(Clone, PartialEq, ::prost::Oneof)]
274 pub enum Content {
275 #[prost(message, tag = "1")]
276 Message(super::ModelMessage),
277 #[prost(message, tag = "2")]
278 ToolAction(super::ToolAction),
279 #[prost(message, tag = "6")]
280 ToolActionConfirmation(super::ToolActionConfirmation),
281 }
282 #[derive(Clone, PartialEq, ::prost::Oneof)]
283 pub enum RestorePoint {
284 #[prost(string, tag = "4")]
285 SnapshotRid(::prost::alloc::string::String),
286 #[prost(string, tag = "7")]
287 CommitId(::prost::alloc::string::String),
288 }
289}
290#[derive(Clone, PartialEq, ::prost::Message)]
291pub struct GetConversationResponse {
292 #[prost(message, repeated, tag = "1")]
293 pub ordered_messages: ::prost::alloc::vec::Vec<ModelMessageWithId>,
294 #[prost(message, optional, tag = "2")]
295 pub conversation_metadata: ::core::option::Option<ConversationMetadata>,
296}
297#[derive(Clone, PartialEq, ::prost::Message)]
298pub struct GetConversationMetadataRequest {
299 #[prost(string, tag = "1")]
300 pub conversation_rid: ::prost::alloc::string::String,
301}
302#[derive(Clone, PartialEq, ::prost::Message)]
303pub struct GetConversationMetadataResponse {
304 #[prost(message, optional, tag = "1")]
305 pub conversation_metadata: ::core::option::Option<ConversationMetadata>,
306}
307#[derive(Clone, PartialEq, ::prost::Message)]
308pub struct GetConversationMessagesRequest {
309 #[prost(string, tag = "1")]
310 pub conversation_rid: ::prost::alloc::string::String,
311 #[prost(string, optional, tag = "2")]
312 pub page_start_message_id: ::core::option::Option<::prost::alloc::string::String>,
313 #[prost(int32, optional, tag = "3")]
314 pub max_message_count: ::core::option::Option<i32>,
315}
316#[derive(Clone, PartialEq, ::prost::Message)]
317pub struct GetConversationMessagesResponse {
318 #[prost(message, repeated, tag = "1")]
319 pub ordered_messages: ::prost::alloc::vec::Vec<ModelMessageWithId>,
320 #[prost(string, optional, tag = "2")]
321 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
322}
323#[derive(Clone, PartialEq, ::prost::Message)]
324pub struct ListConversationsRequest {
325 #[prost(string, tag = "1")]
326 pub workspace_rid: ::prost::alloc::string::String,
327 #[prost(string, optional, tag = "2")]
328 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
329 #[prost(int32, optional, tag = "3")]
330 pub page_size: ::core::option::Option<i32>,
331}
332#[derive(Clone, PartialEq, ::prost::Message)]
333pub struct ConversationMetadata {
334 #[prost(string, tag = "1")]
335 pub conversation_rid: ::prost::alloc::string::String,
336 #[prost(string, tag = "2")]
337 pub title: ::prost::alloc::string::String,
338 #[prost(message, optional, tag = "3")]
339 pub created_at: ::core::option::Option<
340 super::super::super::google::protobuf::Timestamp,
341 >,
342 #[prost(message, optional, tag = "4")]
343 pub last_updated_at: ::core::option::Option<
344 super::super::super::google::protobuf::Timestamp,
345 >,
346 #[prost(message, optional, tag = "5")]
347 pub mode: ::core::option::Option<ConversationMode>,
348 #[prost(message, optional, tag = "6")]
349 pub current_context: ::core::option::Option<ContextStatus>,
350 #[prost(string, optional, tag = "7")]
351 pub backing_workbook_rid: ::core::option::Option<::prost::alloc::string::String>,
352}
353#[derive(Clone, PartialEq, ::prost::Message)]
354pub struct ListConversationsResponse {
355 #[prost(message, repeated, tag = "1")]
356 pub conversations: ::prost::alloc::vec::Vec<ConversationMetadata>,
357 #[prost(string, optional, tag = "2")]
358 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
359}
360#[derive(Clone, Copy, PartialEq, ::prost::Message)]
361pub struct TimeRange {
362 #[prost(message, optional, tag = "1")]
363 pub range_start: ::core::option::Option<Timestamp>,
364 #[prost(message, optional, tag = "2")]
365 pub range_end: ::core::option::Option<Timestamp>,
366}
367#[derive(Clone, Copy, PartialEq, ::prost::Message)]
368pub struct Timestamp {
369 #[prost(int32, tag = "1")]
370 pub seconds: i32,
371 #[prost(int32, tag = "2")]
372 pub nanoseconds: i32,
373}
374#[derive(Clone, PartialEq, ::prost::Message)]
375pub struct ModelMessage {
376 #[prost(oneof = "model_message::Kind", tags = "1, 2")]
377 pub kind: ::core::option::Option<model_message::Kind>,
378}
379pub mod model_message {
381 #[derive(Clone, PartialEq, ::prost::Oneof)]
382 pub enum Kind {
383 #[prost(message, tag = "1")]
384 User(super::UserModelMessage),
385 #[prost(message, tag = "2")]
386 Assistant(super::AssistantModelMessage),
387 }
388}
389#[derive(Clone, PartialEq, ::prost::Message)]
390pub struct UserModelMessage {
391 #[prost(message, repeated, tag = "1")]
392 pub text: ::prost::alloc::vec::Vec<UserContentPart>,
393}
394#[derive(Clone, PartialEq, ::prost::Message)]
395pub struct AssistantModelMessage {
396 #[prost(message, repeated, tag = "1")]
397 pub content_parts: ::prost::alloc::vec::Vec<AssistantContentPart>,
398}
399#[derive(Clone, PartialEq, ::prost::Message)]
400pub struct UserContentPart {
401 #[prost(oneof = "user_content_part::Part", tags = "1, 2")]
402 pub part: ::core::option::Option<user_content_part::Part>,
403}
404pub mod user_content_part {
406 #[derive(Clone, PartialEq, ::prost::Oneof)]
407 pub enum Part {
408 #[prost(message, tag = "1")]
409 Text(super::TextPart),
410 #[prost(message, tag = "2")]
411 Image(super::ImagePart),
412 }
413}
414#[derive(Clone, PartialEq, ::prost::Message)]
415pub struct AssistantContentPart {
416 #[prost(oneof = "assistant_content_part::Part", tags = "1, 2")]
417 pub part: ::core::option::Option<assistant_content_part::Part>,
418}
419pub mod assistant_content_part {
421 #[derive(Clone, PartialEq, ::prost::Oneof)]
422 pub enum Part {
423 #[prost(message, tag = "1")]
424 Text(super::TextPart),
425 #[prost(message, tag = "2")]
426 Reasoning(super::ReasoningPart),
427 }
428}
429#[derive(Clone, PartialEq, ::prost::Message)]
430pub struct TextPart {
431 #[prost(string, tag = "1")]
432 pub text: ::prost::alloc::string::String,
433}
434#[derive(Clone, PartialEq, ::prost::Message)]
435pub struct ImagePart {
436 #[prost(string, tag = "2")]
437 pub media_type: ::prost::alloc::string::String,
438 #[prost(string, tag = "4")]
439 pub attachment_rid: ::prost::alloc::string::String,
440}
441#[derive(Clone, PartialEq, ::prost::Message)]
442pub struct ReasoningPart {
443 #[prost(string, tag = "1")]
444 pub reasoning: ::prost::alloc::string::String,
445}
446#[derive(Clone, PartialEq, ::prost::Message)]
447pub struct StreamChatResponse {
448 #[prost(
449 oneof = "stream_chat_response::Response",
450 tags = "1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14"
451 )]
452 pub response: ::core::option::Option<stream_chat_response::Response>,
453}
454pub mod stream_chat_response {
456 #[derive(Clone, PartialEq, ::prost::Oneof)]
457 pub enum Response {
458 #[prost(message, tag = "1")]
459 Finish(super::Finish),
460 #[prost(message, tag = "2")]
461 Error(super::Error),
462 #[prost(message, tag = "3")]
463 TextStart(super::TextStart),
464 #[prost(message, tag = "4")]
465 TextDelta(super::TextDelta),
466 #[prost(message, tag = "5")]
467 TextEnd(super::TextEnd),
468 #[prost(message, tag = "6")]
469 ReasoningStart(super::ReasoningStart),
470 #[prost(message, tag = "7")]
471 ReasoningDelta(super::ReasoningDelta),
472 #[prost(message, tag = "8")]
473 ReasoningEnd(super::ReasoningEnd),
474 #[prost(message, tag = "10")]
475 ToolAction(super::ToolAction),
476 #[prost(message, tag = "11")]
477 ToolActionConfirmation(super::ToolActionConfirmation),
478 #[prost(message, tag = "12")]
479 StepStart(super::StepStart),
480 #[prost(message, tag = "13")]
481 StepEnd(super::StepEnd),
482 #[prost(message, tag = "14")]
483 ClientDirective(super::ClientDirective),
484 }
485}
486#[derive(Clone, Copy, PartialEq, ::prost::Message)]
487pub struct StepStart {}
488#[derive(Clone, Copy, PartialEq, ::prost::Message)]
489pub struct StepEnd {}
490#[derive(Clone, PartialEq, ::prost::Message)]
491pub struct ToolCallDescription {
492 #[prost(string, tag = "1")]
493 pub tool_call_id: ::prost::alloc::string::String,
494 #[prost(string, tag = "2")]
495 pub tool_name: ::prost::alloc::string::String,
496 #[prost(string, tag = "3")]
497 pub tool_args_json_string: ::prost::alloc::string::String,
498 #[prost(enumeration = "ToolCallStatus", tag = "4")]
499 pub status: i32,
500}
501#[derive(Clone, PartialEq, ::prost::Message)]
502pub struct Finish {
503 #[prost(string, repeated, tag = "1")]
504 pub ordered_message_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
505 #[prost(string, optional, tag = "2")]
506 pub new_title: ::core::option::Option<::prost::alloc::string::String>,
507 #[prost(message, repeated, tag = "3")]
508 pub tool_approval_requests: ::prost::alloc::vec::Vec<ToolCallDescription>,
509 #[prost(message, optional, tag = "4")]
510 pub updated_context: ::core::option::Option<ContextStatus>,
511}
512#[derive(Clone, PartialEq, ::prost::Message)]
513pub struct Error {
514 #[prost(string, tag = "1")]
515 pub message: ::prost::alloc::string::String,
516}
517#[derive(Clone, PartialEq, ::prost::Message)]
518pub struct TextStart {
519 #[prost(string, tag = "1")]
520 pub id: ::prost::alloc::string::String,
521}
522#[derive(Clone, PartialEq, ::prost::Message)]
523pub struct TextDelta {
524 #[prost(string, tag = "1")]
525 pub id: ::prost::alloc::string::String,
526 #[prost(string, tag = "2")]
527 pub delta: ::prost::alloc::string::String,
528}
529#[derive(Clone, PartialEq, ::prost::Message)]
530pub struct TextEnd {
531 #[prost(string, tag = "1")]
532 pub id: ::prost::alloc::string::String,
533}
534#[derive(Clone, PartialEq, ::prost::Message)]
535pub struct ReasoningStart {
536 #[prost(string, tag = "1")]
537 pub id: ::prost::alloc::string::String,
538}
539#[derive(Clone, PartialEq, ::prost::Message)]
540pub struct ReasoningDelta {
541 #[prost(string, tag = "1")]
542 pub id: ::prost::alloc::string::String,
543 #[prost(string, tag = "2")]
544 pub delta: ::prost::alloc::string::String,
545}
546#[derive(Clone, PartialEq, ::prost::Message)]
547pub struct ReasoningEnd {
548 #[prost(string, tag = "1")]
549 pub id: ::prost::alloc::string::String,
550}
551#[derive(Clone, PartialEq, ::prost::Message)]
552pub struct ToolAction {
553 #[prost(string, tag = "2")]
554 pub tool_action_verb: ::prost::alloc::string::String,
555 #[prost(string, optional, tag = "3")]
556 pub tool_target: ::core::option::Option<::prost::alloc::string::String>,
557 #[prost(message, optional, tag = "5")]
558 pub tool_call_description: ::core::option::Option<ToolCallDescription>,
559 #[deprecated]
560 #[prost(string, tag = "1")]
561 pub id: ::prost::alloc::string::String,
562 #[deprecated]
563 #[prost(string, tag = "4")]
564 pub tool_name: ::prost::alloc::string::String,
565}
566#[derive(Clone, PartialEq, ::prost::Message)]
567pub struct ToolActionConfirmation {
568 #[prost(string, tag = "1")]
569 pub id: ::prost::alloc::string::String,
570 #[prost(oneof = "tool_action_confirmation::Outcome", tags = "2, 3")]
571 pub outcome: ::core::option::Option<tool_action_confirmation::Outcome>,
572}
573pub mod tool_action_confirmation {
575 #[derive(Clone, PartialEq, ::prost::Oneof)]
576 pub enum Outcome {
577 #[prost(message, tag = "2")]
578 Success(super::ToolActionSuccess),
579 #[prost(message, tag = "3")]
580 Failure(super::ToolActionFailure),
581 }
582}
583#[derive(Clone, PartialEq, ::prost::Message)]
584pub struct ToolActionSuccess {
585 #[prost(string, tag = "1")]
586 pub tool_success_message: ::prost::alloc::string::String,
587}
588#[derive(Clone, PartialEq, ::prost::Message)]
589pub struct ToolActionFailure {
590 #[prost(string, tag = "1")]
591 pub tool_error_message: ::prost::alloc::string::String,
592}
593#[derive(Clone, PartialEq, ::prost::Message)]
594pub struct ClientDirective {
595 #[prost(oneof = "client_directive::Version", tags = "1")]
596 pub version: ::core::option::Option<client_directive::Version>,
597}
598pub mod client_directive {
600 #[derive(Clone, PartialEq, ::prost::Oneof)]
601 pub enum Version {
602 #[prost(message, tag = "1")]
603 V1(super::ClientDirectiveV1),
604 }
605}
606#[derive(Clone, PartialEq, ::prost::Message)]
607pub struct ClientDirectiveV1 {
608 #[prost(string, tag = "1")]
609 pub id: ::prost::alloc::string::String,
610 #[prost(oneof = "client_directive_v1::Kind", tags = "2, 3")]
611 pub kind: ::core::option::Option<client_directive_v1::Kind>,
612}
613pub mod client_directive_v1 {
615 #[derive(Clone, PartialEq, ::prost::Oneof)]
616 pub enum Kind {
617 #[prost(message, tag = "2")]
618 ResourceEdited(super::ResourceEditedDirective),
619 #[prost(message, tag = "3")]
620 SetTimeRange(super::SetTimeRangeDirective),
621 }
622}
623#[derive(Clone, PartialEq, ::prost::Message)]
624pub struct ResourceEditedDirective {
625 #[prost(oneof = "resource_edited_directive::Resource", tags = "1, 2")]
626 pub resource: ::core::option::Option<resource_edited_directive::Resource>,
627}
628pub mod resource_edited_directive {
630 #[derive(Clone, PartialEq, ::prost::Oneof)]
631 pub enum Resource {
632 #[prost(message, tag = "1")]
633 Checklist(super::ChecklistEdited),
634 #[prost(message, tag = "2")]
635 Template(super::TemplateEdited),
636 }
637}
638#[derive(Clone, PartialEq, ::prost::Message)]
639pub struct ChecklistEdited {
640 #[prost(string, tag = "1")]
641 pub checklist_rid: ::prost::alloc::string::String,
642 #[prost(string, tag = "2")]
643 pub branch_name: ::prost::alloc::string::String,
644 #[prost(string, optional, tag = "3")]
645 pub check_id: ::core::option::Option<::prost::alloc::string::String>,
646}
647#[derive(Clone, PartialEq, ::prost::Message)]
648pub struct TemplateEdited {
649 #[prost(string, tag = "1")]
650 pub template_rid: ::prost::alloc::string::String,
651 #[prost(string, tag = "2")]
652 pub branch_name: ::prost::alloc::string::String,
653}
654#[derive(Clone, PartialEq, ::prost::Message)]
655pub struct SetTimeRangeDirective {
656 #[prost(string, tag = "1")]
657 pub workbook_rid: ::prost::alloc::string::String,
658 #[prost(message, optional, tag = "2")]
659 pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
660 #[prost(message, optional, tag = "3")]
661 pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
662 #[prost(enumeration = "TimeRangeType", tag = "4")]
663 pub time_range_type: i32,
664}
665#[derive(Clone, Copy, PartialEq, ::prost::Message)]
666pub struct ContextStatus {
667 #[prost(int32, tag = "1")]
668 pub curr_token_count: i32,
669 #[prost(int32, tag = "2")]
670 pub model_context_limit: i32,
671}
672#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
673#[repr(i32)]
674pub enum FeedbackVote {
675 Unspecified = 0,
676 ThumbsUp = 1,
677 ThumbsDown = 2,
678}
679impl FeedbackVote {
680 pub fn as_str_name(&self) -> &'static str {
685 match self {
686 Self::Unspecified => "FEEDBACK_VOTE_UNSPECIFIED",
687 Self::ThumbsUp => "FEEDBACK_VOTE_THUMBS_UP",
688 Self::ThumbsDown => "FEEDBACK_VOTE_THUMBS_DOWN",
689 }
690 }
691 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
693 match value {
694 "FEEDBACK_VOTE_UNSPECIFIED" => Some(Self::Unspecified),
695 "FEEDBACK_VOTE_THUMBS_UP" => Some(Self::ThumbsUp),
696 "FEEDBACK_VOTE_THUMBS_DOWN" => Some(Self::ThumbsDown),
697 _ => None,
698 }
699 }
700}
701#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
702#[repr(i32)]
703pub enum ToolCallStatus {
704 Unspecified = 0,
705 Approved = 1,
706 Denied = 2,
707 AwaitingApproval = 3,
708}
709impl ToolCallStatus {
710 pub fn as_str_name(&self) -> &'static str {
715 match self {
716 Self::Unspecified => "TOOL_CALL_STATUS_UNSPECIFIED",
717 Self::Approved => "TOOL_CALL_STATUS_APPROVED",
718 Self::Denied => "TOOL_CALL_STATUS_DENIED",
719 Self::AwaitingApproval => "TOOL_CALL_STATUS_AWAITING_APPROVAL",
720 }
721 }
722 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
724 match value {
725 "TOOL_CALL_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
726 "TOOL_CALL_STATUS_APPROVED" => Some(Self::Approved),
727 "TOOL_CALL_STATUS_DENIED" => Some(Self::Denied),
728 "TOOL_CALL_STATUS_AWAITING_APPROVAL" => Some(Self::AwaitingApproval),
729 _ => None,
730 }
731 }
732}
733#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
734#[repr(i32)]
735pub enum TimeRangeType {
736 Unspecified = 0,
737 Absolute = 1,
738 Relative = 2,
739}
740impl TimeRangeType {
741 pub fn as_str_name(&self) -> &'static str {
746 match self {
747 Self::Unspecified => "TIME_RANGE_TYPE_UNSPECIFIED",
748 Self::Absolute => "TIME_RANGE_TYPE_ABSOLUTE",
749 Self::Relative => "TIME_RANGE_TYPE_RELATIVE",
750 }
751 }
752 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
754 match value {
755 "TIME_RANGE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
756 "TIME_RANGE_TYPE_ABSOLUTE" => Some(Self::Absolute),
757 "TIME_RANGE_TYPE_RELATIVE" => Some(Self::Relative),
758 _ => None,
759 }
760 }
761}
762pub mod ai_agent_service_client {
764 #![allow(
765 unused_variables,
766 dead_code,
767 missing_docs,
768 clippy::wildcard_imports,
769 clippy::let_unit_value,
770 )]
771 use tonic::codegen::*;
772 use tonic::codegen::http::Uri;
773 #[derive(Debug, Clone)]
774 pub struct AiAgentServiceClient<T> {
775 inner: tonic::client::Grpc<T>,
776 }
777 impl AiAgentServiceClient<tonic::transport::Channel> {
778 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
780 where
781 D: TryInto<tonic::transport::Endpoint>,
782 D::Error: Into<StdError>,
783 {
784 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
785 Ok(Self::new(conn))
786 }
787 }
788 impl<T> AiAgentServiceClient<T>
789 where
790 T: tonic::client::GrpcService<tonic::body::Body>,
791 T::Error: Into<StdError>,
792 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
793 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
794 {
795 pub fn new(inner: T) -> Self {
796 let inner = tonic::client::Grpc::new(inner);
797 Self { inner }
798 }
799 pub fn with_origin(inner: T, origin: Uri) -> Self {
800 let inner = tonic::client::Grpc::with_origin(inner, origin);
801 Self { inner }
802 }
803 pub fn with_interceptor<F>(
804 inner: T,
805 interceptor: F,
806 ) -> AiAgentServiceClient<InterceptedService<T, F>>
807 where
808 F: tonic::service::Interceptor,
809 T::ResponseBody: Default,
810 T: tonic::codegen::Service<
811 http::Request<tonic::body::Body>,
812 Response = http::Response<
813 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
814 >,
815 >,
816 <T as tonic::codegen::Service<
817 http::Request<tonic::body::Body>,
818 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
819 {
820 AiAgentServiceClient::new(InterceptedService::new(inner, interceptor))
821 }
822 #[must_use]
827 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
828 self.inner = self.inner.send_compressed(encoding);
829 self
830 }
831 #[must_use]
833 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
834 self.inner = self.inner.accept_compressed(encoding);
835 self
836 }
837 #[must_use]
841 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
842 self.inner = self.inner.max_decoding_message_size(limit);
843 self
844 }
845 #[must_use]
849 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
850 self.inner = self.inner.max_encoding_message_size(limit);
851 self
852 }
853 pub async fn stream_chat(
854 &mut self,
855 request: impl tonic::IntoRequest<super::StreamChatRequest>,
856 ) -> std::result::Result<
857 tonic::Response<tonic::codec::Streaming<super::StreamChatResponse>>,
858 tonic::Status,
859 > {
860 self.inner
861 .ready()
862 .await
863 .map_err(|e| {
864 tonic::Status::unknown(
865 format!("Service was not ready: {}", e.into()),
866 )
867 })?;
868 let codec = tonic::codec::ProstCodec::default();
869 let path = http::uri::PathAndQuery::from_static(
870 "/nominal.ai.v1.AIAgentService/StreamChat",
871 );
872 let mut req = request.into_request();
873 req.extensions_mut()
874 .insert(GrpcMethod::new("nominal.ai.v1.AIAgentService", "StreamChat"));
875 self.inner.server_streaming(req, path, codec).await
876 }
877 #[deprecated]
878 pub async fn get_conversation(
879 &mut self,
880 request: impl tonic::IntoRequest<super::GetConversationRequest>,
881 ) -> std::result::Result<
882 tonic::Response<super::GetConversationResponse>,
883 tonic::Status,
884 > {
885 self.inner
886 .ready()
887 .await
888 .map_err(|e| {
889 tonic::Status::unknown(
890 format!("Service was not ready: {}", e.into()),
891 )
892 })?;
893 let codec = tonic::codec::ProstCodec::default();
894 let path = http::uri::PathAndQuery::from_static(
895 "/nominal.ai.v1.AIAgentService/GetConversation",
896 );
897 let mut req = request.into_request();
898 req.extensions_mut()
899 .insert(
900 GrpcMethod::new("nominal.ai.v1.AIAgentService", "GetConversation"),
901 );
902 self.inner.unary(req, path, codec).await
903 }
904 pub async fn get_conversation_metadata(
905 &mut self,
906 request: impl tonic::IntoRequest<super::GetConversationMetadataRequest>,
907 ) -> std::result::Result<
908 tonic::Response<super::GetConversationMetadataResponse>,
909 tonic::Status,
910 > {
911 self.inner
912 .ready()
913 .await
914 .map_err(|e| {
915 tonic::Status::unknown(
916 format!("Service was not ready: {}", e.into()),
917 )
918 })?;
919 let codec = tonic::codec::ProstCodec::default();
920 let path = http::uri::PathAndQuery::from_static(
921 "/nominal.ai.v1.AIAgentService/GetConversationMetadata",
922 );
923 let mut req = request.into_request();
924 req.extensions_mut()
925 .insert(
926 GrpcMethod::new(
927 "nominal.ai.v1.AIAgentService",
928 "GetConversationMetadata",
929 ),
930 );
931 self.inner.unary(req, path, codec).await
932 }
933 pub async fn get_conversation_messages(
934 &mut self,
935 request: impl tonic::IntoRequest<super::GetConversationMessagesRequest>,
936 ) -> std::result::Result<
937 tonic::Response<super::GetConversationMessagesResponse>,
938 tonic::Status,
939 > {
940 self.inner
941 .ready()
942 .await
943 .map_err(|e| {
944 tonic::Status::unknown(
945 format!("Service was not ready: {}", e.into()),
946 )
947 })?;
948 let codec = tonic::codec::ProstCodec::default();
949 let path = http::uri::PathAndQuery::from_static(
950 "/nominal.ai.v1.AIAgentService/GetConversationMessages",
951 );
952 let mut req = request.into_request();
953 req.extensions_mut()
954 .insert(
955 GrpcMethod::new(
956 "nominal.ai.v1.AIAgentService",
957 "GetConversationMessages",
958 ),
959 );
960 self.inner.unary(req, path, codec).await
961 }
962 pub async fn list_conversations(
963 &mut self,
964 request: impl tonic::IntoRequest<super::ListConversationsRequest>,
965 ) -> std::result::Result<
966 tonic::Response<super::ListConversationsResponse>,
967 tonic::Status,
968 > {
969 self.inner
970 .ready()
971 .await
972 .map_err(|e| {
973 tonic::Status::unknown(
974 format!("Service was not ready: {}", e.into()),
975 )
976 })?;
977 let codec = tonic::codec::ProstCodec::default();
978 let path = http::uri::PathAndQuery::from_static(
979 "/nominal.ai.v1.AIAgentService/ListConversations",
980 );
981 let mut req = request.into_request();
982 req.extensions_mut()
983 .insert(
984 GrpcMethod::new("nominal.ai.v1.AIAgentService", "ListConversations"),
985 );
986 self.inner.unary(req, path, codec).await
987 }
988 pub async fn create_conversation(
989 &mut self,
990 request: impl tonic::IntoRequest<super::CreateConversationRequest>,
991 ) -> std::result::Result<
992 tonic::Response<super::CreateConversationResponse>,
993 tonic::Status,
994 > {
995 self.inner
996 .ready()
997 .await
998 .map_err(|e| {
999 tonic::Status::unknown(
1000 format!("Service was not ready: {}", e.into()),
1001 )
1002 })?;
1003 let codec = tonic::codec::ProstCodec::default();
1004 let path = http::uri::PathAndQuery::from_static(
1005 "/nominal.ai.v1.AIAgentService/CreateConversation",
1006 );
1007 let mut req = request.into_request();
1008 req.extensions_mut()
1009 .insert(
1010 GrpcMethod::new("nominal.ai.v1.AIAgentService", "CreateConversation"),
1011 );
1012 self.inner.unary(req, path, codec).await
1013 }
1014 pub async fn update_conversation_metadata(
1015 &mut self,
1016 request: impl tonic::IntoRequest<super::UpdateConversationMetadataRequest>,
1017 ) -> std::result::Result<
1018 tonic::Response<super::UpdateConversationMetadataResponse>,
1019 tonic::Status,
1020 > {
1021 self.inner
1022 .ready()
1023 .await
1024 .map_err(|e| {
1025 tonic::Status::unknown(
1026 format!("Service was not ready: {}", e.into()),
1027 )
1028 })?;
1029 let codec = tonic::codec::ProstCodec::default();
1030 let path = http::uri::PathAndQuery::from_static(
1031 "/nominal.ai.v1.AIAgentService/UpdateConversationMetadata",
1032 );
1033 let mut req = request.into_request();
1034 req.extensions_mut()
1035 .insert(
1036 GrpcMethod::new(
1037 "nominal.ai.v1.AIAgentService",
1038 "UpdateConversationMetadata",
1039 ),
1040 );
1041 self.inner.unary(req, path, codec).await
1042 }
1043 pub async fn delete_conversation(
1044 &mut self,
1045 request: impl tonic::IntoRequest<super::DeleteConversationRequest>,
1046 ) -> std::result::Result<
1047 tonic::Response<super::DeleteConversationResponse>,
1048 tonic::Status,
1049 > {
1050 self.inner
1051 .ready()
1052 .await
1053 .map_err(|e| {
1054 tonic::Status::unknown(
1055 format!("Service was not ready: {}", e.into()),
1056 )
1057 })?;
1058 let codec = tonic::codec::ProstCodec::default();
1059 let path = http::uri::PathAndQuery::from_static(
1060 "/nominal.ai.v1.AIAgentService/DeleteConversation",
1061 );
1062 let mut req = request.into_request();
1063 req.extensions_mut()
1064 .insert(
1065 GrpcMethod::new("nominal.ai.v1.AIAgentService", "DeleteConversation"),
1066 );
1067 self.inner.unary(req, path, codec).await
1068 }
1069 pub async fn get_snapshot_rid_by_user_message_id(
1070 &mut self,
1071 request: impl tonic::IntoRequest<super::GetSnapshotRidByUserMessageIdRequest>,
1072 ) -> std::result::Result<
1073 tonic::Response<super::GetSnapshotRidByUserMessageIdResponse>,
1074 tonic::Status,
1075 > {
1076 self.inner
1077 .ready()
1078 .await
1079 .map_err(|e| {
1080 tonic::Status::unknown(
1081 format!("Service was not ready: {}", e.into()),
1082 )
1083 })?;
1084 let codec = tonic::codec::ProstCodec::default();
1085 let path = http::uri::PathAndQuery::from_static(
1086 "/nominal.ai.v1.AIAgentService/GetSnapshotRidByUserMessageId",
1087 );
1088 let mut req = request.into_request();
1089 req.extensions_mut()
1090 .insert(
1091 GrpcMethod::new(
1092 "nominal.ai.v1.AIAgentService",
1093 "GetSnapshotRidByUserMessageId",
1094 ),
1095 );
1096 self.inner.unary(req, path, codec).await
1097 }
1098 pub async fn compact_conversation(
1099 &mut self,
1100 request: impl tonic::IntoRequest<super::CompactConversationRequest>,
1101 ) -> std::result::Result<
1102 tonic::Response<super::CompactConversationResponse>,
1103 tonic::Status,
1104 > {
1105 self.inner
1106 .ready()
1107 .await
1108 .map_err(|e| {
1109 tonic::Status::unknown(
1110 format!("Service was not ready: {}", e.into()),
1111 )
1112 })?;
1113 let codec = tonic::codec::ProstCodec::default();
1114 let path = http::uri::PathAndQuery::from_static(
1115 "/nominal.ai.v1.AIAgentService/CompactConversation",
1116 );
1117 let mut req = request.into_request();
1118 req.extensions_mut()
1119 .insert(
1120 GrpcMethod::new(
1121 "nominal.ai.v1.AIAgentService",
1122 "CompactConversation",
1123 ),
1124 );
1125 self.inner.unary(req, path, codec).await
1126 }
1127 pub async fn submit_message_feedback(
1128 &mut self,
1129 request: impl tonic::IntoRequest<super::SubmitMessageFeedbackRequest>,
1130 ) -> std::result::Result<
1131 tonic::Response<super::SubmitMessageFeedbackResponse>,
1132 tonic::Status,
1133 > {
1134 self.inner
1135 .ready()
1136 .await
1137 .map_err(|e| {
1138 tonic::Status::unknown(
1139 format!("Service was not ready: {}", e.into()),
1140 )
1141 })?;
1142 let codec = tonic::codec::ProstCodec::default();
1143 let path = http::uri::PathAndQuery::from_static(
1144 "/nominal.ai.v1.AIAgentService/SubmitMessageFeedback",
1145 );
1146 let mut req = request.into_request();
1147 req.extensions_mut()
1148 .insert(
1149 GrpcMethod::new(
1150 "nominal.ai.v1.AIAgentService",
1151 "SubmitMessageFeedback",
1152 ),
1153 );
1154 self.inner.unary(req, path, codec).await
1155 }
1156 }
1157}
1158#[derive(Clone, PartialEq, ::prost::Message)]
1159pub struct ClassifyErrorRequest {
1160 #[prost(string, tag = "1")]
1161 pub error_message: ::prost::alloc::string::String,
1162}
1163#[derive(Clone, PartialEq, ::prost::Message)]
1164pub struct ClassifyErrorResponse {
1165 #[prost(enumeration = "ErrorClassification", tag = "1")]
1166 pub classification: i32,
1167 #[prost(string, tag = "2")]
1168 pub reason: ::prost::alloc::string::String,
1169}
1170#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1171#[repr(i32)]
1172pub enum ErrorClassification {
1173 Unspecified = 0,
1174 Client = 1,
1175 Server = 2,
1176}
1177impl ErrorClassification {
1178 pub fn as_str_name(&self) -> &'static str {
1183 match self {
1184 Self::Unspecified => "ERROR_CLASSIFICATION_UNSPECIFIED",
1185 Self::Client => "ERROR_CLASSIFICATION_CLIENT",
1186 Self::Server => "ERROR_CLASSIFICATION_SERVER",
1187 }
1188 }
1189 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1191 match value {
1192 "ERROR_CLASSIFICATION_UNSPECIFIED" => Some(Self::Unspecified),
1193 "ERROR_CLASSIFICATION_CLIENT" => Some(Self::Client),
1194 "ERROR_CLASSIFICATION_SERVER" => Some(Self::Server),
1195 _ => None,
1196 }
1197 }
1198}
1199pub mod data_ingestion_error_classifier_service_client {
1201 #![allow(
1202 unused_variables,
1203 dead_code,
1204 missing_docs,
1205 clippy::wildcard_imports,
1206 clippy::let_unit_value,
1207 )]
1208 use tonic::codegen::*;
1209 use tonic::codegen::http::Uri;
1210 #[derive(Debug, Clone)]
1211 pub struct DataIngestionErrorClassifierServiceClient<T> {
1212 inner: tonic::client::Grpc<T>,
1213 }
1214 impl DataIngestionErrorClassifierServiceClient<tonic::transport::Channel> {
1215 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1217 where
1218 D: TryInto<tonic::transport::Endpoint>,
1219 D::Error: Into<StdError>,
1220 {
1221 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1222 Ok(Self::new(conn))
1223 }
1224 }
1225 impl<T> DataIngestionErrorClassifierServiceClient<T>
1226 where
1227 T: tonic::client::GrpcService<tonic::body::Body>,
1228 T::Error: Into<StdError>,
1229 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1230 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1231 {
1232 pub fn new(inner: T) -> Self {
1233 let inner = tonic::client::Grpc::new(inner);
1234 Self { inner }
1235 }
1236 pub fn with_origin(inner: T, origin: Uri) -> Self {
1237 let inner = tonic::client::Grpc::with_origin(inner, origin);
1238 Self { inner }
1239 }
1240 pub fn with_interceptor<F>(
1241 inner: T,
1242 interceptor: F,
1243 ) -> DataIngestionErrorClassifierServiceClient<InterceptedService<T, F>>
1244 where
1245 F: tonic::service::Interceptor,
1246 T::ResponseBody: Default,
1247 T: tonic::codegen::Service<
1248 http::Request<tonic::body::Body>,
1249 Response = http::Response<
1250 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1251 >,
1252 >,
1253 <T as tonic::codegen::Service<
1254 http::Request<tonic::body::Body>,
1255 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1256 {
1257 DataIngestionErrorClassifierServiceClient::new(
1258 InterceptedService::new(inner, interceptor),
1259 )
1260 }
1261 #[must_use]
1266 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1267 self.inner = self.inner.send_compressed(encoding);
1268 self
1269 }
1270 #[must_use]
1272 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1273 self.inner = self.inner.accept_compressed(encoding);
1274 self
1275 }
1276 #[must_use]
1280 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1281 self.inner = self.inner.max_decoding_message_size(limit);
1282 self
1283 }
1284 #[must_use]
1288 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1289 self.inner = self.inner.max_encoding_message_size(limit);
1290 self
1291 }
1292 pub async fn classify_error(
1293 &mut self,
1294 request: impl tonic::IntoRequest<super::ClassifyErrorRequest>,
1295 ) -> std::result::Result<
1296 tonic::Response<super::ClassifyErrorResponse>,
1297 tonic::Status,
1298 > {
1299 self.inner
1300 .ready()
1301 .await
1302 .map_err(|e| {
1303 tonic::Status::unknown(
1304 format!("Service was not ready: {}", e.into()),
1305 )
1306 })?;
1307 let codec = tonic::codec::ProstCodec::default();
1308 let path = http::uri::PathAndQuery::from_static(
1309 "/nominal.ai.v1.DataIngestionErrorClassifierService/ClassifyError",
1310 );
1311 let mut req = request.into_request();
1312 req.extensions_mut()
1313 .insert(
1314 GrpcMethod::new(
1315 "nominal.ai.v1.DataIngestionErrorClassifierService",
1316 "ClassifyError",
1317 ),
1318 );
1319 self.inner.unary(req, path, codec).await
1320 }
1321 }
1322}
1323#[derive(Clone, PartialEq, ::prost::Message)]
1324pub struct CreateOrUpdateKnowledgeBaseRequest {
1325 #[prost(string, tag = "1")]
1326 pub attachment_rid: ::prost::alloc::string::String,
1327 #[prost(string, tag = "2")]
1328 pub summary_description: ::prost::alloc::string::String,
1329 #[prost(enumeration = "KnowledgeBaseType", optional, tag = "3")]
1330 pub r#type: ::core::option::Option<i32>,
1331}
1332#[derive(Clone, PartialEq, ::prost::Message)]
1333pub struct CreateOrUpdateKnowledgeBaseResponse {
1334 #[prost(string, tag = "1")]
1335 pub knowledge_base_rid: ::prost::alloc::string::String,
1336}
1337#[derive(Clone, PartialEq, ::prost::Message)]
1338pub struct KnowledgeBase {
1339 #[prost(string, tag = "1")]
1340 pub knowledge_base_rid: ::prost::alloc::string::String,
1341 #[prost(string, tag = "2")]
1342 pub attachment_rid: ::prost::alloc::string::String,
1343 #[prost(string, tag = "3")]
1344 pub workspace_rid: ::prost::alloc::string::String,
1345 #[prost(string, tag = "4")]
1346 pub summary_description: ::prost::alloc::string::String,
1347 #[prost(enumeration = "KnowledgeBaseType", tag = "5")]
1348 pub r#type: i32,
1349 #[prost(int32, tag = "6")]
1350 pub version: i32,
1351}
1352#[derive(Clone, PartialEq, ::prost::Message)]
1353pub struct ListRequest {
1354 #[prost(string, tag = "1")]
1355 pub workspace_rid: ::prost::alloc::string::String,
1356}
1357#[derive(Clone, PartialEq, ::prost::Message)]
1358pub struct ListResponse {
1359 #[prost(message, repeated, tag = "1")]
1360 pub knowledge_bases: ::prost::alloc::vec::Vec<KnowledgeBase>,
1361}
1362#[derive(Clone, PartialEq, ::prost::Message)]
1363pub struct DeleteRequest {
1364 #[prost(string, tag = "1")]
1365 pub knowledge_base_rid: ::prost::alloc::string::String,
1366}
1367#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1368pub struct DeleteResponse {
1369 #[prost(bool, tag = "1")]
1370 pub success: bool,
1371}
1372#[derive(Clone, PartialEq, ::prost::Message)]
1373pub struct GetBatchRequest {
1374 #[prost(string, repeated, tag = "1")]
1375 pub knowledge_base_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1376}
1377#[derive(Clone, PartialEq, ::prost::Message)]
1378pub struct GetBatchResponse {
1379 #[prost(message, repeated, tag = "1")]
1380 pub knowledge_bases: ::prost::alloc::vec::Vec<KnowledgeBase>,
1381}
1382#[derive(Clone, PartialEq, ::prost::Message)]
1383pub struct GenerateSummaryDescriptionRequest {
1384 #[prost(string, tag = "1")]
1385 pub attachment_rid: ::prost::alloc::string::String,
1386}
1387#[derive(Clone, PartialEq, ::prost::Message)]
1388pub struct GenerateSummaryDescriptionResponse {
1389 #[prost(string, tag = "1")]
1390 pub summary_description: ::prost::alloc::string::String,
1391}
1392#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1393#[repr(i32)]
1394pub enum KnowledgeBaseType {
1395 Unspecified = 0,
1396 Prompt = 1,
1397 Embedding = 2,
1398}
1399impl KnowledgeBaseType {
1400 pub fn as_str_name(&self) -> &'static str {
1405 match self {
1406 Self::Unspecified => "KNOWLEDGE_BASE_TYPE_UNSPECIFIED",
1407 Self::Prompt => "KNOWLEDGE_BASE_TYPE_PROMPT",
1408 Self::Embedding => "KNOWLEDGE_BASE_TYPE_EMBEDDING",
1409 }
1410 }
1411 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1413 match value {
1414 "KNOWLEDGE_BASE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1415 "KNOWLEDGE_BASE_TYPE_PROMPT" => Some(Self::Prompt),
1416 "KNOWLEDGE_BASE_TYPE_EMBEDDING" => Some(Self::Embedding),
1417 _ => None,
1418 }
1419 }
1420}
1421pub mod knowledge_base_service_client {
1423 #![allow(
1424 unused_variables,
1425 dead_code,
1426 missing_docs,
1427 clippy::wildcard_imports,
1428 clippy::let_unit_value,
1429 )]
1430 use tonic::codegen::*;
1431 use tonic::codegen::http::Uri;
1432 #[derive(Debug, Clone)]
1433 pub struct KnowledgeBaseServiceClient<T> {
1434 inner: tonic::client::Grpc<T>,
1435 }
1436 impl KnowledgeBaseServiceClient<tonic::transport::Channel> {
1437 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1439 where
1440 D: TryInto<tonic::transport::Endpoint>,
1441 D::Error: Into<StdError>,
1442 {
1443 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1444 Ok(Self::new(conn))
1445 }
1446 }
1447 impl<T> KnowledgeBaseServiceClient<T>
1448 where
1449 T: tonic::client::GrpcService<tonic::body::Body>,
1450 T::Error: Into<StdError>,
1451 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1452 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1453 {
1454 pub fn new(inner: T) -> Self {
1455 let inner = tonic::client::Grpc::new(inner);
1456 Self { inner }
1457 }
1458 pub fn with_origin(inner: T, origin: Uri) -> Self {
1459 let inner = tonic::client::Grpc::with_origin(inner, origin);
1460 Self { inner }
1461 }
1462 pub fn with_interceptor<F>(
1463 inner: T,
1464 interceptor: F,
1465 ) -> KnowledgeBaseServiceClient<InterceptedService<T, F>>
1466 where
1467 F: tonic::service::Interceptor,
1468 T::ResponseBody: Default,
1469 T: tonic::codegen::Service<
1470 http::Request<tonic::body::Body>,
1471 Response = http::Response<
1472 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1473 >,
1474 >,
1475 <T as tonic::codegen::Service<
1476 http::Request<tonic::body::Body>,
1477 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1478 {
1479 KnowledgeBaseServiceClient::new(InterceptedService::new(inner, interceptor))
1480 }
1481 #[must_use]
1486 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1487 self.inner = self.inner.send_compressed(encoding);
1488 self
1489 }
1490 #[must_use]
1492 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1493 self.inner = self.inner.accept_compressed(encoding);
1494 self
1495 }
1496 #[must_use]
1500 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1501 self.inner = self.inner.max_decoding_message_size(limit);
1502 self
1503 }
1504 #[must_use]
1508 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1509 self.inner = self.inner.max_encoding_message_size(limit);
1510 self
1511 }
1512 pub async fn create_or_update_knowledge_base(
1513 &mut self,
1514 request: impl tonic::IntoRequest<super::CreateOrUpdateKnowledgeBaseRequest>,
1515 ) -> std::result::Result<
1516 tonic::Response<super::CreateOrUpdateKnowledgeBaseResponse>,
1517 tonic::Status,
1518 > {
1519 self.inner
1520 .ready()
1521 .await
1522 .map_err(|e| {
1523 tonic::Status::unknown(
1524 format!("Service was not ready: {}", e.into()),
1525 )
1526 })?;
1527 let codec = tonic::codec::ProstCodec::default();
1528 let path = http::uri::PathAndQuery::from_static(
1529 "/nominal.ai.v1.KnowledgeBaseService/CreateOrUpdateKnowledgeBase",
1530 );
1531 let mut req = request.into_request();
1532 req.extensions_mut()
1533 .insert(
1534 GrpcMethod::new(
1535 "nominal.ai.v1.KnowledgeBaseService",
1536 "CreateOrUpdateKnowledgeBase",
1537 ),
1538 );
1539 self.inner.unary(req, path, codec).await
1540 }
1541 pub async fn list(
1542 &mut self,
1543 request: impl tonic::IntoRequest<super::ListRequest>,
1544 ) -> std::result::Result<tonic::Response<super::ListResponse>, tonic::Status> {
1545 self.inner
1546 .ready()
1547 .await
1548 .map_err(|e| {
1549 tonic::Status::unknown(
1550 format!("Service was not ready: {}", e.into()),
1551 )
1552 })?;
1553 let codec = tonic::codec::ProstCodec::default();
1554 let path = http::uri::PathAndQuery::from_static(
1555 "/nominal.ai.v1.KnowledgeBaseService/List",
1556 );
1557 let mut req = request.into_request();
1558 req.extensions_mut()
1559 .insert(GrpcMethod::new("nominal.ai.v1.KnowledgeBaseService", "List"));
1560 self.inner.unary(req, path, codec).await
1561 }
1562 pub async fn delete(
1563 &mut self,
1564 request: impl tonic::IntoRequest<super::DeleteRequest>,
1565 ) -> std::result::Result<tonic::Response<super::DeleteResponse>, tonic::Status> {
1566 self.inner
1567 .ready()
1568 .await
1569 .map_err(|e| {
1570 tonic::Status::unknown(
1571 format!("Service was not ready: {}", e.into()),
1572 )
1573 })?;
1574 let codec = tonic::codec::ProstCodec::default();
1575 let path = http::uri::PathAndQuery::from_static(
1576 "/nominal.ai.v1.KnowledgeBaseService/Delete",
1577 );
1578 let mut req = request.into_request();
1579 req.extensions_mut()
1580 .insert(GrpcMethod::new("nominal.ai.v1.KnowledgeBaseService", "Delete"));
1581 self.inner.unary(req, path, codec).await
1582 }
1583 pub async fn get_batch(
1584 &mut self,
1585 request: impl tonic::IntoRequest<super::GetBatchRequest>,
1586 ) -> std::result::Result<
1587 tonic::Response<super::GetBatchResponse>,
1588 tonic::Status,
1589 > {
1590 self.inner
1591 .ready()
1592 .await
1593 .map_err(|e| {
1594 tonic::Status::unknown(
1595 format!("Service was not ready: {}", e.into()),
1596 )
1597 })?;
1598 let codec = tonic::codec::ProstCodec::default();
1599 let path = http::uri::PathAndQuery::from_static(
1600 "/nominal.ai.v1.KnowledgeBaseService/GetBatch",
1601 );
1602 let mut req = request.into_request();
1603 req.extensions_mut()
1604 .insert(
1605 GrpcMethod::new("nominal.ai.v1.KnowledgeBaseService", "GetBatch"),
1606 );
1607 self.inner.unary(req, path, codec).await
1608 }
1609 pub async fn generate_summary_description(
1610 &mut self,
1611 request: impl tonic::IntoRequest<super::GenerateSummaryDescriptionRequest>,
1612 ) -> std::result::Result<
1613 tonic::Response<super::GenerateSummaryDescriptionResponse>,
1614 tonic::Status,
1615 > {
1616 self.inner
1617 .ready()
1618 .await
1619 .map_err(|e| {
1620 tonic::Status::unknown(
1621 format!("Service was not ready: {}", e.into()),
1622 )
1623 })?;
1624 let codec = tonic::codec::ProstCodec::default();
1625 let path = http::uri::PathAndQuery::from_static(
1626 "/nominal.ai.v1.KnowledgeBaseService/GenerateSummaryDescription",
1627 );
1628 let mut req = request.into_request();
1629 req.extensions_mut()
1630 .insert(
1631 GrpcMethod::new(
1632 "nominal.ai.v1.KnowledgeBaseService",
1633 "GenerateSummaryDescription",
1634 ),
1635 );
1636 self.inner.unary(req, path, codec).await
1637 }
1638 }
1639}
1640#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1641pub struct GetProviderStatusRequest {}
1642#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1643pub struct GetProviderStatusResponse {
1644 #[prost(message, optional, tag = "1")]
1645 pub timestamp: ::core::option::Option<
1646 super::super::super::google::protobuf::Timestamp,
1647 >,
1648 #[prost(message, optional, tag = "2")]
1649 pub last_status: ::core::option::Option<ProviderStatus>,
1650 #[deprecated]
1651 #[prost(message, optional, tag = "3")]
1652 pub aggregated_status_over_last_30m: ::core::option::Option<ProviderStatus>,
1653 #[prost(message, optional, tag = "4")]
1654 pub aggregated_status: ::core::option::Option<ProviderStatus>,
1655}
1656#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1657pub struct ProviderStatus {
1658 #[prost(oneof = "provider_status::Status", tags = "1, 2")]
1659 pub status: ::core::option::Option<provider_status::Status>,
1660}
1661pub mod provider_status {
1663 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1664 pub enum Status {
1665 #[prost(message, tag = "1")]
1666 Healthy(super::Healthy),
1667 #[prost(message, tag = "2")]
1668 Degraded(super::Degraded),
1669 }
1670}
1671#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1672pub struct Healthy {}
1673#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1674pub struct Degraded {
1675 #[prost(enumeration = "DegradationReason", tag = "1")]
1676 pub reason: i32,
1677}
1678#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1679pub struct ProviderMetrics {
1680 #[prost(int32, tag = "1")]
1681 pub time_to_first_token_ms: i32,
1682 #[prost(int32, tag = "2")]
1683 pub total_time_ms: i32,
1684}
1685#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1686#[repr(i32)]
1687pub enum DegradationReason {
1688 Unspecified = 0,
1689 HighLatency = 1,
1690 Failures = 2,
1691 HighLatencyAndFailures = 3,
1692 Unavailable = 4,
1693}
1694impl DegradationReason {
1695 pub fn as_str_name(&self) -> &'static str {
1700 match self {
1701 Self::Unspecified => "DEGRADATION_REASON_UNSPECIFIED",
1702 Self::HighLatency => "DEGRADATION_REASON_HIGH_LATENCY",
1703 Self::Failures => "DEGRADATION_REASON_FAILURES",
1704 Self::HighLatencyAndFailures => {
1705 "DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES"
1706 }
1707 Self::Unavailable => "DEGRADATION_REASON_UNAVAILABLE",
1708 }
1709 }
1710 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1712 match value {
1713 "DEGRADATION_REASON_UNSPECIFIED" => Some(Self::Unspecified),
1714 "DEGRADATION_REASON_HIGH_LATENCY" => Some(Self::HighLatency),
1715 "DEGRADATION_REASON_FAILURES" => Some(Self::Failures),
1716 "DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES" => {
1717 Some(Self::HighLatencyAndFailures)
1718 }
1719 "DEGRADATION_REASON_UNAVAILABLE" => Some(Self::Unavailable),
1720 _ => None,
1721 }
1722 }
1723}
1724pub mod model_provider_health_service_client {
1726 #![allow(
1727 unused_variables,
1728 dead_code,
1729 missing_docs,
1730 clippy::wildcard_imports,
1731 clippy::let_unit_value,
1732 )]
1733 use tonic::codegen::*;
1734 use tonic::codegen::http::Uri;
1735 #[derive(Debug, Clone)]
1736 pub struct ModelProviderHealthServiceClient<T> {
1737 inner: tonic::client::Grpc<T>,
1738 }
1739 impl ModelProviderHealthServiceClient<tonic::transport::Channel> {
1740 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1742 where
1743 D: TryInto<tonic::transport::Endpoint>,
1744 D::Error: Into<StdError>,
1745 {
1746 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1747 Ok(Self::new(conn))
1748 }
1749 }
1750 impl<T> ModelProviderHealthServiceClient<T>
1751 where
1752 T: tonic::client::GrpcService<tonic::body::Body>,
1753 T::Error: Into<StdError>,
1754 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1755 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1756 {
1757 pub fn new(inner: T) -> Self {
1758 let inner = tonic::client::Grpc::new(inner);
1759 Self { inner }
1760 }
1761 pub fn with_origin(inner: T, origin: Uri) -> Self {
1762 let inner = tonic::client::Grpc::with_origin(inner, origin);
1763 Self { inner }
1764 }
1765 pub fn with_interceptor<F>(
1766 inner: T,
1767 interceptor: F,
1768 ) -> ModelProviderHealthServiceClient<InterceptedService<T, F>>
1769 where
1770 F: tonic::service::Interceptor,
1771 T::ResponseBody: Default,
1772 T: tonic::codegen::Service<
1773 http::Request<tonic::body::Body>,
1774 Response = http::Response<
1775 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1776 >,
1777 >,
1778 <T as tonic::codegen::Service<
1779 http::Request<tonic::body::Body>,
1780 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1781 {
1782 ModelProviderHealthServiceClient::new(
1783 InterceptedService::new(inner, interceptor),
1784 )
1785 }
1786 #[must_use]
1791 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1792 self.inner = self.inner.send_compressed(encoding);
1793 self
1794 }
1795 #[must_use]
1797 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1798 self.inner = self.inner.accept_compressed(encoding);
1799 self
1800 }
1801 #[must_use]
1805 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1806 self.inner = self.inner.max_decoding_message_size(limit);
1807 self
1808 }
1809 #[must_use]
1813 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1814 self.inner = self.inner.max_encoding_message_size(limit);
1815 self
1816 }
1817 pub async fn get_provider_status(
1818 &mut self,
1819 request: impl tonic::IntoRequest<super::GetProviderStatusRequest>,
1820 ) -> std::result::Result<
1821 tonic::Response<super::GetProviderStatusResponse>,
1822 tonic::Status,
1823 > {
1824 self.inner
1825 .ready()
1826 .await
1827 .map_err(|e| {
1828 tonic::Status::unknown(
1829 format!("Service was not ready: {}", e.into()),
1830 )
1831 })?;
1832 let codec = tonic::codec::ProstCodec::default();
1833 let path = http::uri::PathAndQuery::from_static(
1834 "/nominal.ai.v1.ModelProviderHealthService/GetProviderStatus",
1835 );
1836 let mut req = request.into_request();
1837 req.extensions_mut()
1838 .insert(
1839 GrpcMethod::new(
1840 "nominal.ai.v1.ModelProviderHealthService",
1841 "GetProviderStatus",
1842 ),
1843 );
1844 self.inner.unary(req, path, codec).await
1845 }
1846 }
1847}