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