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