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 #[prost(string, optional, tag = "4")]
647 pub commit_id: ::core::option::Option<::prost::alloc::string::String>,
648 #[prost(message, optional, tag = "5")]
649 pub committed_at: ::core::option::Option<
650 super::super::super::google::protobuf::Timestamp,
651 >,
652}
653#[derive(Clone, PartialEq, ::prost::Message)]
654pub struct TemplateEdited {
655 #[prost(string, tag = "1")]
656 pub template_rid: ::prost::alloc::string::String,
657 #[prost(string, tag = "2")]
658 pub branch_name: ::prost::alloc::string::String,
659 #[prost(string, optional, tag = "3")]
660 pub commit_id: ::core::option::Option<::prost::alloc::string::String>,
661 #[prost(message, optional, tag = "4")]
662 pub committed_at: ::core::option::Option<
663 super::super::super::google::protobuf::Timestamp,
664 >,
665}
666#[derive(Clone, PartialEq, ::prost::Message)]
667pub struct SetTimeRangeDirective {
668 #[prost(string, tag = "1")]
669 pub workbook_rid: ::prost::alloc::string::String,
670 #[prost(message, optional, tag = "2")]
671 pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
672 #[prost(message, optional, tag = "3")]
673 pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
674 #[prost(enumeration = "TimeRangeType", tag = "4")]
675 pub time_range_type: i32,
676}
677#[derive(Clone, Copy, PartialEq, ::prost::Message)]
678pub struct ContextStatus {
679 #[prost(int32, tag = "1")]
680 pub curr_token_count: i32,
681 #[prost(int32, tag = "2")]
682 pub model_context_limit: i32,
683}
684#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
685#[repr(i32)]
686pub enum FeedbackVote {
687 Unspecified = 0,
688 ThumbsUp = 1,
689 ThumbsDown = 2,
690}
691impl FeedbackVote {
692 pub fn as_str_name(&self) -> &'static str {
697 match self {
698 Self::Unspecified => "FEEDBACK_VOTE_UNSPECIFIED",
699 Self::ThumbsUp => "FEEDBACK_VOTE_THUMBS_UP",
700 Self::ThumbsDown => "FEEDBACK_VOTE_THUMBS_DOWN",
701 }
702 }
703 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
705 match value {
706 "FEEDBACK_VOTE_UNSPECIFIED" => Some(Self::Unspecified),
707 "FEEDBACK_VOTE_THUMBS_UP" => Some(Self::ThumbsUp),
708 "FEEDBACK_VOTE_THUMBS_DOWN" => Some(Self::ThumbsDown),
709 _ => None,
710 }
711 }
712}
713#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
714#[repr(i32)]
715pub enum ToolCallStatus {
716 Unspecified = 0,
717 Approved = 1,
718 Denied = 2,
719 AwaitingApproval = 3,
720}
721impl ToolCallStatus {
722 pub fn as_str_name(&self) -> &'static str {
727 match self {
728 Self::Unspecified => "TOOL_CALL_STATUS_UNSPECIFIED",
729 Self::Approved => "TOOL_CALL_STATUS_APPROVED",
730 Self::Denied => "TOOL_CALL_STATUS_DENIED",
731 Self::AwaitingApproval => "TOOL_CALL_STATUS_AWAITING_APPROVAL",
732 }
733 }
734 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
736 match value {
737 "TOOL_CALL_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
738 "TOOL_CALL_STATUS_APPROVED" => Some(Self::Approved),
739 "TOOL_CALL_STATUS_DENIED" => Some(Self::Denied),
740 "TOOL_CALL_STATUS_AWAITING_APPROVAL" => Some(Self::AwaitingApproval),
741 _ => None,
742 }
743 }
744}
745#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
746#[repr(i32)]
747pub enum TimeRangeType {
748 Unspecified = 0,
749 Absolute = 1,
750 Relative = 2,
751}
752impl TimeRangeType {
753 pub fn as_str_name(&self) -> &'static str {
758 match self {
759 Self::Unspecified => "TIME_RANGE_TYPE_UNSPECIFIED",
760 Self::Absolute => "TIME_RANGE_TYPE_ABSOLUTE",
761 Self::Relative => "TIME_RANGE_TYPE_RELATIVE",
762 }
763 }
764 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
766 match value {
767 "TIME_RANGE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
768 "TIME_RANGE_TYPE_ABSOLUTE" => Some(Self::Absolute),
769 "TIME_RANGE_TYPE_RELATIVE" => Some(Self::Relative),
770 _ => None,
771 }
772 }
773}
774pub mod ai_agent_service_client {
776 #![allow(
777 unused_variables,
778 dead_code,
779 missing_docs,
780 clippy::wildcard_imports,
781 clippy::let_unit_value,
782 )]
783 use tonic::codegen::*;
784 use tonic::codegen::http::Uri;
785 #[derive(Debug, Clone)]
786 pub struct AiAgentServiceClient<T> {
787 inner: tonic::client::Grpc<T>,
788 }
789 impl AiAgentServiceClient<tonic::transport::Channel> {
790 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
792 where
793 D: TryInto<tonic::transport::Endpoint>,
794 D::Error: Into<StdError>,
795 {
796 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
797 Ok(Self::new(conn))
798 }
799 }
800 impl<T> AiAgentServiceClient<T>
801 where
802 T: tonic::client::GrpcService<tonic::body::Body>,
803 T::Error: Into<StdError>,
804 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
805 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
806 {
807 pub fn new(inner: T) -> Self {
808 let inner = tonic::client::Grpc::new(inner);
809 Self { inner }
810 }
811 pub fn with_origin(inner: T, origin: Uri) -> Self {
812 let inner = tonic::client::Grpc::with_origin(inner, origin);
813 Self { inner }
814 }
815 pub fn with_interceptor<F>(
816 inner: T,
817 interceptor: F,
818 ) -> AiAgentServiceClient<InterceptedService<T, F>>
819 where
820 F: tonic::service::Interceptor,
821 T::ResponseBody: Default,
822 T: tonic::codegen::Service<
823 http::Request<tonic::body::Body>,
824 Response = http::Response<
825 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
826 >,
827 >,
828 <T as tonic::codegen::Service<
829 http::Request<tonic::body::Body>,
830 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
831 {
832 AiAgentServiceClient::new(InterceptedService::new(inner, interceptor))
833 }
834 #[must_use]
839 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
840 self.inner = self.inner.send_compressed(encoding);
841 self
842 }
843 #[must_use]
845 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
846 self.inner = self.inner.accept_compressed(encoding);
847 self
848 }
849 #[must_use]
853 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
854 self.inner = self.inner.max_decoding_message_size(limit);
855 self
856 }
857 #[must_use]
861 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
862 self.inner = self.inner.max_encoding_message_size(limit);
863 self
864 }
865 pub async fn stream_chat(
866 &mut self,
867 request: impl tonic::IntoRequest<super::StreamChatRequest>,
868 ) -> std::result::Result<
869 tonic::Response<tonic::codec::Streaming<super::StreamChatResponse>>,
870 tonic::Status,
871 > {
872 self.inner
873 .ready()
874 .await
875 .map_err(|e| {
876 tonic::Status::unknown(
877 format!("Service was not ready: {}", e.into()),
878 )
879 })?;
880 let codec = tonic::codec::ProstCodec::default();
881 let path = http::uri::PathAndQuery::from_static(
882 "/nominal.ai.v1.AIAgentService/StreamChat",
883 );
884 let mut req = request.into_request();
885 req.extensions_mut()
886 .insert(GrpcMethod::new("nominal.ai.v1.AIAgentService", "StreamChat"));
887 self.inner.server_streaming(req, path, codec).await
888 }
889 #[deprecated]
890 pub async fn get_conversation(
891 &mut self,
892 request: impl tonic::IntoRequest<super::GetConversationRequest>,
893 ) -> std::result::Result<
894 tonic::Response<super::GetConversationResponse>,
895 tonic::Status,
896 > {
897 self.inner
898 .ready()
899 .await
900 .map_err(|e| {
901 tonic::Status::unknown(
902 format!("Service was not ready: {}", e.into()),
903 )
904 })?;
905 let codec = tonic::codec::ProstCodec::default();
906 let path = http::uri::PathAndQuery::from_static(
907 "/nominal.ai.v1.AIAgentService/GetConversation",
908 );
909 let mut req = request.into_request();
910 req.extensions_mut()
911 .insert(
912 GrpcMethod::new("nominal.ai.v1.AIAgentService", "GetConversation"),
913 );
914 self.inner.unary(req, path, codec).await
915 }
916 pub async fn get_conversation_metadata(
917 &mut self,
918 request: impl tonic::IntoRequest<super::GetConversationMetadataRequest>,
919 ) -> std::result::Result<
920 tonic::Response<super::GetConversationMetadataResponse>,
921 tonic::Status,
922 > {
923 self.inner
924 .ready()
925 .await
926 .map_err(|e| {
927 tonic::Status::unknown(
928 format!("Service was not ready: {}", e.into()),
929 )
930 })?;
931 let codec = tonic::codec::ProstCodec::default();
932 let path = http::uri::PathAndQuery::from_static(
933 "/nominal.ai.v1.AIAgentService/GetConversationMetadata",
934 );
935 let mut req = request.into_request();
936 req.extensions_mut()
937 .insert(
938 GrpcMethod::new(
939 "nominal.ai.v1.AIAgentService",
940 "GetConversationMetadata",
941 ),
942 );
943 self.inner.unary(req, path, codec).await
944 }
945 pub async fn get_conversation_messages(
946 &mut self,
947 request: impl tonic::IntoRequest<super::GetConversationMessagesRequest>,
948 ) -> std::result::Result<
949 tonic::Response<super::GetConversationMessagesResponse>,
950 tonic::Status,
951 > {
952 self.inner
953 .ready()
954 .await
955 .map_err(|e| {
956 tonic::Status::unknown(
957 format!("Service was not ready: {}", e.into()),
958 )
959 })?;
960 let codec = tonic::codec::ProstCodec::default();
961 let path = http::uri::PathAndQuery::from_static(
962 "/nominal.ai.v1.AIAgentService/GetConversationMessages",
963 );
964 let mut req = request.into_request();
965 req.extensions_mut()
966 .insert(
967 GrpcMethod::new(
968 "nominal.ai.v1.AIAgentService",
969 "GetConversationMessages",
970 ),
971 );
972 self.inner.unary(req, path, codec).await
973 }
974 pub async fn list_conversations(
975 &mut self,
976 request: impl tonic::IntoRequest<super::ListConversationsRequest>,
977 ) -> std::result::Result<
978 tonic::Response<super::ListConversationsResponse>,
979 tonic::Status,
980 > {
981 self.inner
982 .ready()
983 .await
984 .map_err(|e| {
985 tonic::Status::unknown(
986 format!("Service was not ready: {}", e.into()),
987 )
988 })?;
989 let codec = tonic::codec::ProstCodec::default();
990 let path = http::uri::PathAndQuery::from_static(
991 "/nominal.ai.v1.AIAgentService/ListConversations",
992 );
993 let mut req = request.into_request();
994 req.extensions_mut()
995 .insert(
996 GrpcMethod::new("nominal.ai.v1.AIAgentService", "ListConversations"),
997 );
998 self.inner.unary(req, path, codec).await
999 }
1000 pub async fn create_conversation(
1001 &mut self,
1002 request: impl tonic::IntoRequest<super::CreateConversationRequest>,
1003 ) -> std::result::Result<
1004 tonic::Response<super::CreateConversationResponse>,
1005 tonic::Status,
1006 > {
1007 self.inner
1008 .ready()
1009 .await
1010 .map_err(|e| {
1011 tonic::Status::unknown(
1012 format!("Service was not ready: {}", e.into()),
1013 )
1014 })?;
1015 let codec = tonic::codec::ProstCodec::default();
1016 let path = http::uri::PathAndQuery::from_static(
1017 "/nominal.ai.v1.AIAgentService/CreateConversation",
1018 );
1019 let mut req = request.into_request();
1020 req.extensions_mut()
1021 .insert(
1022 GrpcMethod::new("nominal.ai.v1.AIAgentService", "CreateConversation"),
1023 );
1024 self.inner.unary(req, path, codec).await
1025 }
1026 pub async fn update_conversation_metadata(
1027 &mut self,
1028 request: impl tonic::IntoRequest<super::UpdateConversationMetadataRequest>,
1029 ) -> std::result::Result<
1030 tonic::Response<super::UpdateConversationMetadataResponse>,
1031 tonic::Status,
1032 > {
1033 self.inner
1034 .ready()
1035 .await
1036 .map_err(|e| {
1037 tonic::Status::unknown(
1038 format!("Service was not ready: {}", e.into()),
1039 )
1040 })?;
1041 let codec = tonic::codec::ProstCodec::default();
1042 let path = http::uri::PathAndQuery::from_static(
1043 "/nominal.ai.v1.AIAgentService/UpdateConversationMetadata",
1044 );
1045 let mut req = request.into_request();
1046 req.extensions_mut()
1047 .insert(
1048 GrpcMethod::new(
1049 "nominal.ai.v1.AIAgentService",
1050 "UpdateConversationMetadata",
1051 ),
1052 );
1053 self.inner.unary(req, path, codec).await
1054 }
1055 pub async fn delete_conversation(
1056 &mut self,
1057 request: impl tonic::IntoRequest<super::DeleteConversationRequest>,
1058 ) -> std::result::Result<
1059 tonic::Response<super::DeleteConversationResponse>,
1060 tonic::Status,
1061 > {
1062 self.inner
1063 .ready()
1064 .await
1065 .map_err(|e| {
1066 tonic::Status::unknown(
1067 format!("Service was not ready: {}", e.into()),
1068 )
1069 })?;
1070 let codec = tonic::codec::ProstCodec::default();
1071 let path = http::uri::PathAndQuery::from_static(
1072 "/nominal.ai.v1.AIAgentService/DeleteConversation",
1073 );
1074 let mut req = request.into_request();
1075 req.extensions_mut()
1076 .insert(
1077 GrpcMethod::new("nominal.ai.v1.AIAgentService", "DeleteConversation"),
1078 );
1079 self.inner.unary(req, path, codec).await
1080 }
1081 pub async fn get_snapshot_rid_by_user_message_id(
1082 &mut self,
1083 request: impl tonic::IntoRequest<super::GetSnapshotRidByUserMessageIdRequest>,
1084 ) -> std::result::Result<
1085 tonic::Response<super::GetSnapshotRidByUserMessageIdResponse>,
1086 tonic::Status,
1087 > {
1088 self.inner
1089 .ready()
1090 .await
1091 .map_err(|e| {
1092 tonic::Status::unknown(
1093 format!("Service was not ready: {}", e.into()),
1094 )
1095 })?;
1096 let codec = tonic::codec::ProstCodec::default();
1097 let path = http::uri::PathAndQuery::from_static(
1098 "/nominal.ai.v1.AIAgentService/GetSnapshotRidByUserMessageId",
1099 );
1100 let mut req = request.into_request();
1101 req.extensions_mut()
1102 .insert(
1103 GrpcMethod::new(
1104 "nominal.ai.v1.AIAgentService",
1105 "GetSnapshotRidByUserMessageId",
1106 ),
1107 );
1108 self.inner.unary(req, path, codec).await
1109 }
1110 pub async fn compact_conversation(
1111 &mut self,
1112 request: impl tonic::IntoRequest<super::CompactConversationRequest>,
1113 ) -> std::result::Result<
1114 tonic::Response<super::CompactConversationResponse>,
1115 tonic::Status,
1116 > {
1117 self.inner
1118 .ready()
1119 .await
1120 .map_err(|e| {
1121 tonic::Status::unknown(
1122 format!("Service was not ready: {}", e.into()),
1123 )
1124 })?;
1125 let codec = tonic::codec::ProstCodec::default();
1126 let path = http::uri::PathAndQuery::from_static(
1127 "/nominal.ai.v1.AIAgentService/CompactConversation",
1128 );
1129 let mut req = request.into_request();
1130 req.extensions_mut()
1131 .insert(
1132 GrpcMethod::new(
1133 "nominal.ai.v1.AIAgentService",
1134 "CompactConversation",
1135 ),
1136 );
1137 self.inner.unary(req, path, codec).await
1138 }
1139 pub async fn submit_message_feedback(
1140 &mut self,
1141 request: impl tonic::IntoRequest<super::SubmitMessageFeedbackRequest>,
1142 ) -> std::result::Result<
1143 tonic::Response<super::SubmitMessageFeedbackResponse>,
1144 tonic::Status,
1145 > {
1146 self.inner
1147 .ready()
1148 .await
1149 .map_err(|e| {
1150 tonic::Status::unknown(
1151 format!("Service was not ready: {}", e.into()),
1152 )
1153 })?;
1154 let codec = tonic::codec::ProstCodec::default();
1155 let path = http::uri::PathAndQuery::from_static(
1156 "/nominal.ai.v1.AIAgentService/SubmitMessageFeedback",
1157 );
1158 let mut req = request.into_request();
1159 req.extensions_mut()
1160 .insert(
1161 GrpcMethod::new(
1162 "nominal.ai.v1.AIAgentService",
1163 "SubmitMessageFeedback",
1164 ),
1165 );
1166 self.inner.unary(req, path, codec).await
1167 }
1168 }
1169}
1170#[derive(Clone, PartialEq, ::prost::Message)]
1171pub struct ClassifyErrorRequest {
1172 #[prost(string, tag = "1")]
1173 pub error_message: ::prost::alloc::string::String,
1174}
1175#[derive(Clone, PartialEq, ::prost::Message)]
1176pub struct ClassifyErrorResponse {
1177 #[prost(enumeration = "ErrorClassification", tag = "1")]
1178 pub classification: i32,
1179 #[prost(string, tag = "2")]
1180 pub reason: ::prost::alloc::string::String,
1181}
1182#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1183#[repr(i32)]
1184pub enum ErrorClassification {
1185 Unspecified = 0,
1186 Client = 1,
1187 Server = 2,
1188}
1189impl ErrorClassification {
1190 pub fn as_str_name(&self) -> &'static str {
1195 match self {
1196 Self::Unspecified => "ERROR_CLASSIFICATION_UNSPECIFIED",
1197 Self::Client => "ERROR_CLASSIFICATION_CLIENT",
1198 Self::Server => "ERROR_CLASSIFICATION_SERVER",
1199 }
1200 }
1201 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1203 match value {
1204 "ERROR_CLASSIFICATION_UNSPECIFIED" => Some(Self::Unspecified),
1205 "ERROR_CLASSIFICATION_CLIENT" => Some(Self::Client),
1206 "ERROR_CLASSIFICATION_SERVER" => Some(Self::Server),
1207 _ => None,
1208 }
1209 }
1210}
1211pub mod data_ingestion_error_classifier_service_client {
1213 #![allow(
1214 unused_variables,
1215 dead_code,
1216 missing_docs,
1217 clippy::wildcard_imports,
1218 clippy::let_unit_value,
1219 )]
1220 use tonic::codegen::*;
1221 use tonic::codegen::http::Uri;
1222 #[derive(Debug, Clone)]
1223 pub struct DataIngestionErrorClassifierServiceClient<T> {
1224 inner: tonic::client::Grpc<T>,
1225 }
1226 impl DataIngestionErrorClassifierServiceClient<tonic::transport::Channel> {
1227 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1229 where
1230 D: TryInto<tonic::transport::Endpoint>,
1231 D::Error: Into<StdError>,
1232 {
1233 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1234 Ok(Self::new(conn))
1235 }
1236 }
1237 impl<T> DataIngestionErrorClassifierServiceClient<T>
1238 where
1239 T: tonic::client::GrpcService<tonic::body::Body>,
1240 T::Error: Into<StdError>,
1241 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1242 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1243 {
1244 pub fn new(inner: T) -> Self {
1245 let inner = tonic::client::Grpc::new(inner);
1246 Self { inner }
1247 }
1248 pub fn with_origin(inner: T, origin: Uri) -> Self {
1249 let inner = tonic::client::Grpc::with_origin(inner, origin);
1250 Self { inner }
1251 }
1252 pub fn with_interceptor<F>(
1253 inner: T,
1254 interceptor: F,
1255 ) -> DataIngestionErrorClassifierServiceClient<InterceptedService<T, F>>
1256 where
1257 F: tonic::service::Interceptor,
1258 T::ResponseBody: Default,
1259 T: tonic::codegen::Service<
1260 http::Request<tonic::body::Body>,
1261 Response = http::Response<
1262 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1263 >,
1264 >,
1265 <T as tonic::codegen::Service<
1266 http::Request<tonic::body::Body>,
1267 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1268 {
1269 DataIngestionErrorClassifierServiceClient::new(
1270 InterceptedService::new(inner, interceptor),
1271 )
1272 }
1273 #[must_use]
1278 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1279 self.inner = self.inner.send_compressed(encoding);
1280 self
1281 }
1282 #[must_use]
1284 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1285 self.inner = self.inner.accept_compressed(encoding);
1286 self
1287 }
1288 #[must_use]
1292 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1293 self.inner = self.inner.max_decoding_message_size(limit);
1294 self
1295 }
1296 #[must_use]
1300 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1301 self.inner = self.inner.max_encoding_message_size(limit);
1302 self
1303 }
1304 pub async fn classify_error(
1305 &mut self,
1306 request: impl tonic::IntoRequest<super::ClassifyErrorRequest>,
1307 ) -> std::result::Result<
1308 tonic::Response<super::ClassifyErrorResponse>,
1309 tonic::Status,
1310 > {
1311 self.inner
1312 .ready()
1313 .await
1314 .map_err(|e| {
1315 tonic::Status::unknown(
1316 format!("Service was not ready: {}", e.into()),
1317 )
1318 })?;
1319 let codec = tonic::codec::ProstCodec::default();
1320 let path = http::uri::PathAndQuery::from_static(
1321 "/nominal.ai.v1.DataIngestionErrorClassifierService/ClassifyError",
1322 );
1323 let mut req = request.into_request();
1324 req.extensions_mut()
1325 .insert(
1326 GrpcMethod::new(
1327 "nominal.ai.v1.DataIngestionErrorClassifierService",
1328 "ClassifyError",
1329 ),
1330 );
1331 self.inner.unary(req, path, codec).await
1332 }
1333 }
1334}
1335#[derive(Clone, PartialEq, ::prost::Message)]
1336pub struct CreateOrUpdateKnowledgeBaseRequest {
1337 #[prost(string, tag = "1")]
1338 pub attachment_rid: ::prost::alloc::string::String,
1339 #[prost(string, tag = "2")]
1340 pub summary_description: ::prost::alloc::string::String,
1341 #[prost(enumeration = "KnowledgeBaseType", optional, tag = "3")]
1342 pub r#type: ::core::option::Option<i32>,
1343}
1344#[derive(Clone, PartialEq, ::prost::Message)]
1345pub struct CreateOrUpdateKnowledgeBaseResponse {
1346 #[prost(string, tag = "1")]
1347 pub knowledge_base_rid: ::prost::alloc::string::String,
1348}
1349#[derive(Clone, PartialEq, ::prost::Message)]
1350pub struct KnowledgeBase {
1351 #[prost(string, tag = "1")]
1352 pub knowledge_base_rid: ::prost::alloc::string::String,
1353 #[prost(string, tag = "2")]
1354 pub attachment_rid: ::prost::alloc::string::String,
1355 #[prost(string, tag = "3")]
1356 pub workspace_rid: ::prost::alloc::string::String,
1357 #[prost(string, tag = "4")]
1358 pub summary_description: ::prost::alloc::string::String,
1359 #[prost(enumeration = "KnowledgeBaseType", tag = "5")]
1360 pub r#type: i32,
1361 #[prost(int32, tag = "6")]
1362 pub version: i32,
1363}
1364#[derive(Clone, PartialEq, ::prost::Message)]
1365pub struct ListRequest {
1366 #[prost(string, tag = "1")]
1367 pub workspace_rid: ::prost::alloc::string::String,
1368}
1369#[derive(Clone, PartialEq, ::prost::Message)]
1370pub struct ListResponse {
1371 #[prost(message, repeated, tag = "1")]
1372 pub knowledge_bases: ::prost::alloc::vec::Vec<KnowledgeBase>,
1373}
1374#[derive(Clone, PartialEq, ::prost::Message)]
1375pub struct DeleteRequest {
1376 #[prost(string, tag = "1")]
1377 pub knowledge_base_rid: ::prost::alloc::string::String,
1378}
1379#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1380pub struct DeleteResponse {
1381 #[prost(bool, tag = "1")]
1382 pub success: bool,
1383}
1384#[derive(Clone, PartialEq, ::prost::Message)]
1385pub struct GetBatchRequest {
1386 #[prost(string, repeated, tag = "1")]
1387 pub knowledge_base_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1388}
1389#[derive(Clone, PartialEq, ::prost::Message)]
1390pub struct GetBatchResponse {
1391 #[prost(message, repeated, tag = "1")]
1392 pub knowledge_bases: ::prost::alloc::vec::Vec<KnowledgeBase>,
1393}
1394#[derive(Clone, PartialEq, ::prost::Message)]
1395pub struct GenerateSummaryDescriptionRequest {
1396 #[prost(string, tag = "1")]
1397 pub attachment_rid: ::prost::alloc::string::String,
1398}
1399#[derive(Clone, PartialEq, ::prost::Message)]
1400pub struct GenerateSummaryDescriptionResponse {
1401 #[prost(string, tag = "1")]
1402 pub summary_description: ::prost::alloc::string::String,
1403}
1404#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1405#[repr(i32)]
1406pub enum KnowledgeBaseType {
1407 Unspecified = 0,
1408 Prompt = 1,
1409 Embedding = 2,
1410}
1411impl KnowledgeBaseType {
1412 pub fn as_str_name(&self) -> &'static str {
1417 match self {
1418 Self::Unspecified => "KNOWLEDGE_BASE_TYPE_UNSPECIFIED",
1419 Self::Prompt => "KNOWLEDGE_BASE_TYPE_PROMPT",
1420 Self::Embedding => "KNOWLEDGE_BASE_TYPE_EMBEDDING",
1421 }
1422 }
1423 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1425 match value {
1426 "KNOWLEDGE_BASE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1427 "KNOWLEDGE_BASE_TYPE_PROMPT" => Some(Self::Prompt),
1428 "KNOWLEDGE_BASE_TYPE_EMBEDDING" => Some(Self::Embedding),
1429 _ => None,
1430 }
1431 }
1432}
1433pub mod knowledge_base_service_client {
1435 #![allow(
1436 unused_variables,
1437 dead_code,
1438 missing_docs,
1439 clippy::wildcard_imports,
1440 clippy::let_unit_value,
1441 )]
1442 use tonic::codegen::*;
1443 use tonic::codegen::http::Uri;
1444 #[derive(Debug, Clone)]
1445 pub struct KnowledgeBaseServiceClient<T> {
1446 inner: tonic::client::Grpc<T>,
1447 }
1448 impl KnowledgeBaseServiceClient<tonic::transport::Channel> {
1449 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1451 where
1452 D: TryInto<tonic::transport::Endpoint>,
1453 D::Error: Into<StdError>,
1454 {
1455 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1456 Ok(Self::new(conn))
1457 }
1458 }
1459 impl<T> KnowledgeBaseServiceClient<T>
1460 where
1461 T: tonic::client::GrpcService<tonic::body::Body>,
1462 T::Error: Into<StdError>,
1463 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1464 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1465 {
1466 pub fn new(inner: T) -> Self {
1467 let inner = tonic::client::Grpc::new(inner);
1468 Self { inner }
1469 }
1470 pub fn with_origin(inner: T, origin: Uri) -> Self {
1471 let inner = tonic::client::Grpc::with_origin(inner, origin);
1472 Self { inner }
1473 }
1474 pub fn with_interceptor<F>(
1475 inner: T,
1476 interceptor: F,
1477 ) -> KnowledgeBaseServiceClient<InterceptedService<T, F>>
1478 where
1479 F: tonic::service::Interceptor,
1480 T::ResponseBody: Default,
1481 T: tonic::codegen::Service<
1482 http::Request<tonic::body::Body>,
1483 Response = http::Response<
1484 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1485 >,
1486 >,
1487 <T as tonic::codegen::Service<
1488 http::Request<tonic::body::Body>,
1489 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1490 {
1491 KnowledgeBaseServiceClient::new(InterceptedService::new(inner, interceptor))
1492 }
1493 #[must_use]
1498 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1499 self.inner = self.inner.send_compressed(encoding);
1500 self
1501 }
1502 #[must_use]
1504 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1505 self.inner = self.inner.accept_compressed(encoding);
1506 self
1507 }
1508 #[must_use]
1512 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1513 self.inner = self.inner.max_decoding_message_size(limit);
1514 self
1515 }
1516 #[must_use]
1520 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1521 self.inner = self.inner.max_encoding_message_size(limit);
1522 self
1523 }
1524 pub async fn create_or_update_knowledge_base(
1525 &mut self,
1526 request: impl tonic::IntoRequest<super::CreateOrUpdateKnowledgeBaseRequest>,
1527 ) -> std::result::Result<
1528 tonic::Response<super::CreateOrUpdateKnowledgeBaseResponse>,
1529 tonic::Status,
1530 > {
1531 self.inner
1532 .ready()
1533 .await
1534 .map_err(|e| {
1535 tonic::Status::unknown(
1536 format!("Service was not ready: {}", e.into()),
1537 )
1538 })?;
1539 let codec = tonic::codec::ProstCodec::default();
1540 let path = http::uri::PathAndQuery::from_static(
1541 "/nominal.ai.v1.KnowledgeBaseService/CreateOrUpdateKnowledgeBase",
1542 );
1543 let mut req = request.into_request();
1544 req.extensions_mut()
1545 .insert(
1546 GrpcMethod::new(
1547 "nominal.ai.v1.KnowledgeBaseService",
1548 "CreateOrUpdateKnowledgeBase",
1549 ),
1550 );
1551 self.inner.unary(req, path, codec).await
1552 }
1553 pub async fn list(
1554 &mut self,
1555 request: impl tonic::IntoRequest<super::ListRequest>,
1556 ) -> std::result::Result<tonic::Response<super::ListResponse>, tonic::Status> {
1557 self.inner
1558 .ready()
1559 .await
1560 .map_err(|e| {
1561 tonic::Status::unknown(
1562 format!("Service was not ready: {}", e.into()),
1563 )
1564 })?;
1565 let codec = tonic::codec::ProstCodec::default();
1566 let path = http::uri::PathAndQuery::from_static(
1567 "/nominal.ai.v1.KnowledgeBaseService/List",
1568 );
1569 let mut req = request.into_request();
1570 req.extensions_mut()
1571 .insert(GrpcMethod::new("nominal.ai.v1.KnowledgeBaseService", "List"));
1572 self.inner.unary(req, path, codec).await
1573 }
1574 pub async fn delete(
1575 &mut self,
1576 request: impl tonic::IntoRequest<super::DeleteRequest>,
1577 ) -> std::result::Result<tonic::Response<super::DeleteResponse>, tonic::Status> {
1578 self.inner
1579 .ready()
1580 .await
1581 .map_err(|e| {
1582 tonic::Status::unknown(
1583 format!("Service was not ready: {}", e.into()),
1584 )
1585 })?;
1586 let codec = tonic::codec::ProstCodec::default();
1587 let path = http::uri::PathAndQuery::from_static(
1588 "/nominal.ai.v1.KnowledgeBaseService/Delete",
1589 );
1590 let mut req = request.into_request();
1591 req.extensions_mut()
1592 .insert(GrpcMethod::new("nominal.ai.v1.KnowledgeBaseService", "Delete"));
1593 self.inner.unary(req, path, codec).await
1594 }
1595 pub async fn get_batch(
1596 &mut self,
1597 request: impl tonic::IntoRequest<super::GetBatchRequest>,
1598 ) -> std::result::Result<
1599 tonic::Response<super::GetBatchResponse>,
1600 tonic::Status,
1601 > {
1602 self.inner
1603 .ready()
1604 .await
1605 .map_err(|e| {
1606 tonic::Status::unknown(
1607 format!("Service was not ready: {}", e.into()),
1608 )
1609 })?;
1610 let codec = tonic::codec::ProstCodec::default();
1611 let path = http::uri::PathAndQuery::from_static(
1612 "/nominal.ai.v1.KnowledgeBaseService/GetBatch",
1613 );
1614 let mut req = request.into_request();
1615 req.extensions_mut()
1616 .insert(
1617 GrpcMethod::new("nominal.ai.v1.KnowledgeBaseService", "GetBatch"),
1618 );
1619 self.inner.unary(req, path, codec).await
1620 }
1621 pub async fn generate_summary_description(
1622 &mut self,
1623 request: impl tonic::IntoRequest<super::GenerateSummaryDescriptionRequest>,
1624 ) -> std::result::Result<
1625 tonic::Response<super::GenerateSummaryDescriptionResponse>,
1626 tonic::Status,
1627 > {
1628 self.inner
1629 .ready()
1630 .await
1631 .map_err(|e| {
1632 tonic::Status::unknown(
1633 format!("Service was not ready: {}", e.into()),
1634 )
1635 })?;
1636 let codec = tonic::codec::ProstCodec::default();
1637 let path = http::uri::PathAndQuery::from_static(
1638 "/nominal.ai.v1.KnowledgeBaseService/GenerateSummaryDescription",
1639 );
1640 let mut req = request.into_request();
1641 req.extensions_mut()
1642 .insert(
1643 GrpcMethod::new(
1644 "nominal.ai.v1.KnowledgeBaseService",
1645 "GenerateSummaryDescription",
1646 ),
1647 );
1648 self.inner.unary(req, path, codec).await
1649 }
1650 }
1651}
1652#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1653pub struct GetProviderStatusRequest {}
1654#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1655pub struct GetProviderStatusResponse {
1656 #[prost(message, optional, tag = "1")]
1657 pub timestamp: ::core::option::Option<
1658 super::super::super::google::protobuf::Timestamp,
1659 >,
1660 #[prost(message, optional, tag = "2")]
1661 pub last_status: ::core::option::Option<ProviderStatus>,
1662 #[deprecated]
1663 #[prost(message, optional, tag = "3")]
1664 pub aggregated_status_over_last_30m: ::core::option::Option<ProviderStatus>,
1665 #[prost(message, optional, tag = "4")]
1666 pub aggregated_status: ::core::option::Option<ProviderStatus>,
1667}
1668#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1669pub struct ProviderStatus {
1670 #[prost(oneof = "provider_status::Status", tags = "1, 2")]
1671 pub status: ::core::option::Option<provider_status::Status>,
1672}
1673pub mod provider_status {
1675 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1676 pub enum Status {
1677 #[prost(message, tag = "1")]
1678 Healthy(super::Healthy),
1679 #[prost(message, tag = "2")]
1680 Degraded(super::Degraded),
1681 }
1682}
1683#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1684pub struct Healthy {}
1685#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1686pub struct Degraded {
1687 #[prost(enumeration = "DegradationReason", tag = "1")]
1688 pub reason: i32,
1689}
1690#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1691pub struct ProviderMetrics {
1692 #[prost(int32, tag = "1")]
1693 pub time_to_first_token_ms: i32,
1694 #[prost(int32, tag = "2")]
1695 pub total_time_ms: i32,
1696}
1697#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1698#[repr(i32)]
1699pub enum DegradationReason {
1700 Unspecified = 0,
1701 HighLatency = 1,
1702 Failures = 2,
1703 HighLatencyAndFailures = 3,
1704 Unavailable = 4,
1705}
1706impl DegradationReason {
1707 pub fn as_str_name(&self) -> &'static str {
1712 match self {
1713 Self::Unspecified => "DEGRADATION_REASON_UNSPECIFIED",
1714 Self::HighLatency => "DEGRADATION_REASON_HIGH_LATENCY",
1715 Self::Failures => "DEGRADATION_REASON_FAILURES",
1716 Self::HighLatencyAndFailures => {
1717 "DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES"
1718 }
1719 Self::Unavailable => "DEGRADATION_REASON_UNAVAILABLE",
1720 }
1721 }
1722 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1724 match value {
1725 "DEGRADATION_REASON_UNSPECIFIED" => Some(Self::Unspecified),
1726 "DEGRADATION_REASON_HIGH_LATENCY" => Some(Self::HighLatency),
1727 "DEGRADATION_REASON_FAILURES" => Some(Self::Failures),
1728 "DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES" => {
1729 Some(Self::HighLatencyAndFailures)
1730 }
1731 "DEGRADATION_REASON_UNAVAILABLE" => Some(Self::Unavailable),
1732 _ => None,
1733 }
1734 }
1735}
1736pub mod model_provider_health_service_client {
1738 #![allow(
1739 unused_variables,
1740 dead_code,
1741 missing_docs,
1742 clippy::wildcard_imports,
1743 clippy::let_unit_value,
1744 )]
1745 use tonic::codegen::*;
1746 use tonic::codegen::http::Uri;
1747 #[derive(Debug, Clone)]
1748 pub struct ModelProviderHealthServiceClient<T> {
1749 inner: tonic::client::Grpc<T>,
1750 }
1751 impl ModelProviderHealthServiceClient<tonic::transport::Channel> {
1752 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1754 where
1755 D: TryInto<tonic::transport::Endpoint>,
1756 D::Error: Into<StdError>,
1757 {
1758 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1759 Ok(Self::new(conn))
1760 }
1761 }
1762 impl<T> ModelProviderHealthServiceClient<T>
1763 where
1764 T: tonic::client::GrpcService<tonic::body::Body>,
1765 T::Error: Into<StdError>,
1766 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1767 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1768 {
1769 pub fn new(inner: T) -> Self {
1770 let inner = tonic::client::Grpc::new(inner);
1771 Self { inner }
1772 }
1773 pub fn with_origin(inner: T, origin: Uri) -> Self {
1774 let inner = tonic::client::Grpc::with_origin(inner, origin);
1775 Self { inner }
1776 }
1777 pub fn with_interceptor<F>(
1778 inner: T,
1779 interceptor: F,
1780 ) -> ModelProviderHealthServiceClient<InterceptedService<T, F>>
1781 where
1782 F: tonic::service::Interceptor,
1783 T::ResponseBody: Default,
1784 T: tonic::codegen::Service<
1785 http::Request<tonic::body::Body>,
1786 Response = http::Response<
1787 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1788 >,
1789 >,
1790 <T as tonic::codegen::Service<
1791 http::Request<tonic::body::Body>,
1792 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1793 {
1794 ModelProviderHealthServiceClient::new(
1795 InterceptedService::new(inner, interceptor),
1796 )
1797 }
1798 #[must_use]
1803 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1804 self.inner = self.inner.send_compressed(encoding);
1805 self
1806 }
1807 #[must_use]
1809 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1810 self.inner = self.inner.accept_compressed(encoding);
1811 self
1812 }
1813 #[must_use]
1817 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1818 self.inner = self.inner.max_decoding_message_size(limit);
1819 self
1820 }
1821 #[must_use]
1825 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1826 self.inner = self.inner.max_encoding_message_size(limit);
1827 self
1828 }
1829 pub async fn get_provider_status(
1830 &mut self,
1831 request: impl tonic::IntoRequest<super::GetProviderStatusRequest>,
1832 ) -> std::result::Result<
1833 tonic::Response<super::GetProviderStatusResponse>,
1834 tonic::Status,
1835 > {
1836 self.inner
1837 .ready()
1838 .await
1839 .map_err(|e| {
1840 tonic::Status::unknown(
1841 format!("Service was not ready: {}", e.into()),
1842 )
1843 })?;
1844 let codec = tonic::codec::ProstCodec::default();
1845 let path = http::uri::PathAndQuery::from_static(
1846 "/nominal.ai.v1.ModelProviderHealthService/GetProviderStatus",
1847 );
1848 let mut req = request.into_request();
1849 req.extensions_mut()
1850 .insert(
1851 GrpcMethod::new(
1852 "nominal.ai.v1.ModelProviderHealthService",
1853 "GetProviderStatus",
1854 ),
1855 );
1856 self.inner.unary(req, path, codec).await
1857 }
1858 }
1859}