1#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct StreamChatRequest {
5 #[prost(message, repeated, tag = "1")]
6 pub messages: ::prost::alloc::vec::Vec<ModelMessage>,
7 #[prost(string, optional, tag = "2")]
9 pub notebook_as_json: ::core::option::Option<::prost::alloc::string::String>,
10 #[prost(int32, optional, tag = "3")]
12 pub selected_tab_index: ::core::option::Option<i32>,
13 #[prost(message, repeated, tag = "4")]
15 pub images: ::prost::alloc::vec::Vec<ImagePart>,
16 #[prost(message, optional, tag = "5")]
18 pub range: ::core::option::Option<TimeRange>,
19}
20#[derive(Clone, Copy, PartialEq, ::prost::Message)]
21pub struct TimeRange {
22 #[prost(message, optional, tag = "1")]
23 pub range_start: ::core::option::Option<Timestamp>,
24 #[prost(message, optional, tag = "2")]
25 pub range_end: ::core::option::Option<Timestamp>,
26}
27#[derive(Clone, Copy, PartialEq, ::prost::Message)]
28pub struct Timestamp {
29 #[prost(int32, tag = "1")]
30 pub seconds: i32,
31 #[prost(int32, tag = "2")]
32 pub nanoseconds: i32,
33}
34#[derive(Clone, PartialEq, ::prost::Message)]
37pub struct ModelMessage {
38 #[prost(oneof = "model_message::Kind", tags = "1, 2")]
39 pub kind: ::core::option::Option<model_message::Kind>,
40}
41pub mod model_message {
43 #[derive(Clone, PartialEq, ::prost::Oneof)]
44 pub enum Kind {
45 #[prost(message, tag = "1")]
46 User(super::UserModelMessage),
47 #[prost(message, tag = "2")]
48 Assistant(super::AssistantModelMessage),
49 }
50}
51#[derive(Clone, PartialEq, ::prost::Message)]
53pub struct UserModelMessage {
54 #[prost(message, repeated, tag = "1")]
55 pub text: ::prost::alloc::vec::Vec<UserContentPart>,
56}
57#[derive(Clone, PartialEq, ::prost::Message)]
59pub struct AssistantModelMessage {
60 #[prost(message, repeated, tag = "1")]
61 pub content_parts: ::prost::alloc::vec::Vec<AssistantContentPart>,
62}
63#[derive(Clone, PartialEq, ::prost::Message)]
64pub struct UserContentPart {
65 #[prost(oneof = "user_content_part::Part", tags = "1")]
66 pub part: ::core::option::Option<user_content_part::Part>,
67}
68pub mod user_content_part {
70 #[derive(Clone, PartialEq, ::prost::Oneof)]
71 pub enum Part {
72 #[prost(message, tag = "1")]
73 Text(super::TextPart),
74 }
75}
76#[derive(Clone, PartialEq, ::prost::Message)]
78pub struct AssistantContentPart {
79 #[prost(oneof = "assistant_content_part::Part", tags = "1, 2")]
80 pub part: ::core::option::Option<assistant_content_part::Part>,
81}
82pub mod assistant_content_part {
84 #[derive(Clone, PartialEq, ::prost::Oneof)]
85 pub enum Part {
86 #[prost(message, tag = "1")]
87 Text(super::TextPart),
88 #[prost(message, tag = "2")]
89 Reasoning(super::ReasoningPart),
90 }
91}
92#[derive(Clone, PartialEq, ::prost::Message)]
94pub struct TextPart {
95 #[prost(string, tag = "1")]
96 pub text: ::prost::alloc::string::String,
97}
98#[derive(Clone, PartialEq, ::prost::Message)]
100pub struct ImagePart {
101 #[prost(bytes = "vec", tag = "1")]
103 pub data: ::prost::alloc::vec::Vec<u8>,
104 #[prost(string, optional, tag = "2")]
106 pub media_type: ::core::option::Option<::prost::alloc::string::String>,
107 #[prost(string, optional, tag = "3")]
109 pub filename: ::core::option::Option<::prost::alloc::string::String>,
110}
111#[derive(Clone, PartialEq, ::prost::Message)]
113pub struct ReasoningPart {
114 #[prost(string, tag = "1")]
115 pub reasoning: ::prost::alloc::string::String,
116}
117#[derive(Clone, PartialEq, ::prost::Message)]
119pub struct StreamChatResponse {
120 #[prost(
121 oneof = "stream_chat_response::Response",
122 tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10"
123 )]
124 pub response: ::core::option::Option<stream_chat_response::Response>,
125}
126pub mod stream_chat_response {
128 #[derive(Clone, PartialEq, ::prost::Oneof)]
129 pub enum Response {
130 #[prost(message, tag = "1")]
131 Finish(super::Finish),
132 #[prost(message, tag = "2")]
133 Error(super::Error),
134 #[prost(message, tag = "3")]
135 TextStart(super::TextStart),
136 #[prost(message, tag = "4")]
137 TextDelta(super::TextDelta),
138 #[prost(message, tag = "5")]
139 TextEnd(super::TextEnd),
140 #[prost(message, tag = "6")]
141 ReasoningStart(super::ReasoningStart),
142 #[prost(message, tag = "7")]
143 ReasoningDelta(super::ReasoningDelta),
144 #[prost(message, tag = "8")]
145 ReasoningEnd(super::ReasoningEnd),
146 #[prost(message, tag = "9")]
147 WorkbookMutation(super::WorkbookMutation),
148 #[prost(message, tag = "10")]
149 ToolAction(super::ToolAction),
150 }
151}
152#[derive(Clone, Copy, PartialEq, ::prost::Message)]
154pub struct Finish {}
155#[derive(Clone, PartialEq, ::prost::Message)]
157pub struct Error {
158 #[prost(string, tag = "1")]
159 pub message: ::prost::alloc::string::String,
160}
161#[derive(Clone, PartialEq, ::prost::Message)]
163pub struct TextStart {
164 #[prost(string, tag = "1")]
167 pub id: ::prost::alloc::string::String,
168}
169#[derive(Clone, PartialEq, ::prost::Message)]
171pub struct TextDelta {
172 #[prost(string, tag = "1")]
173 pub id: ::prost::alloc::string::String,
174 #[prost(string, tag = "2")]
176 pub delta: ::prost::alloc::string::String,
177}
178#[derive(Clone, PartialEq, ::prost::Message)]
180pub struct TextEnd {
181 #[prost(string, tag = "1")]
182 pub id: ::prost::alloc::string::String,
183}
184#[derive(Clone, PartialEq, ::prost::Message)]
186pub struct ReasoningStart {
187 #[prost(string, tag = "1")]
188 pub id: ::prost::alloc::string::String,
189}
190#[derive(Clone, PartialEq, ::prost::Message)]
192pub struct ReasoningDelta {
193 #[prost(string, tag = "1")]
194 pub id: ::prost::alloc::string::String,
195 #[prost(string, tag = "2")]
197 pub delta: ::prost::alloc::string::String,
198}
199#[derive(Clone, PartialEq, ::prost::Message)]
201pub struct ReasoningEnd {
202 #[prost(string, tag = "1")]
203 pub id: ::prost::alloc::string::String,
204}
205#[derive(Clone, PartialEq, ::prost::Message)]
207pub struct AddTabMutation {
208 #[prost(string, optional, tag = "1")]
210 pub tab_name: ::core::option::Option<::prost::alloc::string::String>,
211}
212#[derive(Clone, PartialEq, ::prost::Message)]
214pub struct AddOrUpdatePanelMutation {
215 #[prost(string, tag = "1")]
217 pub panel_as_json: ::prost::alloc::string::String,
218 #[prost(string, tag = "2")]
219 pub panel_id: ::prost::alloc::string::String,
220 #[prost(int32, tag = "3")]
221 pub tab_index: i32,
222}
223#[derive(Clone, PartialEq, ::prost::Message)]
224pub struct RemovePanelsMutation {
225 #[prost(string, repeated, tag = "1")]
226 pub panel_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
227}
228#[derive(Clone, PartialEq, ::prost::Message)]
230pub struct AddOrReplaceVariableMutation {
231 #[prost(string, tag = "1")]
235 pub compute_spec_as_json: ::prost::alloc::string::String,
236 #[prost(string, optional, tag = "2")]
238 pub variable_name: ::core::option::Option<::prost::alloc::string::String>,
239 #[prost(string, optional, tag = "3")]
240 pub display_name: ::core::option::Option<::prost::alloc::string::String>,
241}
242#[derive(Clone, PartialEq, ::prost::Message)]
244pub struct DeleteVariablesMutation {
245 #[prost(string, repeated, tag = "1")]
246 pub variable_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
247}
248#[derive(Clone, PartialEq, ::prost::Message)]
250pub struct WorkbookMutation {
251 #[prost(string, tag = "1")]
252 pub id: ::prost::alloc::string::String,
253 #[prost(oneof = "workbook_mutation::Mutation", tags = "2, 3, 4, 5, 6")]
254 pub mutation: ::core::option::Option<workbook_mutation::Mutation>,
255}
256pub mod workbook_mutation {
258 #[derive(Clone, PartialEq, ::prost::Oneof)]
259 pub enum Mutation {
260 #[prost(message, tag = "2")]
261 AddTab(super::AddTabMutation),
262 #[prost(message, tag = "3")]
263 AddOrUpdatePanel(super::AddOrUpdatePanelMutation),
264 #[prost(message, tag = "4")]
265 RemovePanels(super::RemovePanelsMutation),
266 #[prost(message, tag = "5")]
267 AddOrReplaceVariable(super::AddOrReplaceVariableMutation),
268 #[prost(message, tag = "6")]
269 DeleteVariables(super::DeleteVariablesMutation),
270 }
271}
272#[derive(Clone, PartialEq, ::prost::Message)]
277pub struct ToolAction {
278 #[prost(string, tag = "1")]
279 pub id: ::prost::alloc::string::String,
280 #[prost(string, tag = "2")]
282 pub tool_action_verb: ::prost::alloc::string::String,
283 #[prost(string, optional, tag = "3")]
285 pub tool_target: ::core::option::Option<::prost::alloc::string::String>,
286}
287pub mod workbook_agent_service_client {
289 #![allow(
290 unused_variables,
291 dead_code,
292 missing_docs,
293 clippy::wildcard_imports,
294 clippy::let_unit_value,
295 )]
296 use tonic::codegen::*;
297 use tonic::codegen::http::Uri;
298 #[derive(Debug, Clone)]
300 pub struct WorkbookAgentServiceClient<T> {
301 inner: tonic::client::Grpc<T>,
302 }
303 impl WorkbookAgentServiceClient<tonic::transport::Channel> {
304 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
306 where
307 D: TryInto<tonic::transport::Endpoint>,
308 D::Error: Into<StdError>,
309 {
310 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
311 Ok(Self::new(conn))
312 }
313 }
314 impl<T> WorkbookAgentServiceClient<T>
315 where
316 T: tonic::client::GrpcService<tonic::body::Body>,
317 T::Error: Into<StdError>,
318 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
319 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
320 {
321 pub fn new(inner: T) -> Self {
322 let inner = tonic::client::Grpc::new(inner);
323 Self { inner }
324 }
325 pub fn with_origin(inner: T, origin: Uri) -> Self {
326 let inner = tonic::client::Grpc::with_origin(inner, origin);
327 Self { inner }
328 }
329 pub fn with_interceptor<F>(
330 inner: T,
331 interceptor: F,
332 ) -> WorkbookAgentServiceClient<InterceptedService<T, F>>
333 where
334 F: tonic::service::Interceptor,
335 T::ResponseBody: Default,
336 T: tonic::codegen::Service<
337 http::Request<tonic::body::Body>,
338 Response = http::Response<
339 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
340 >,
341 >,
342 <T as tonic::codegen::Service<
343 http::Request<tonic::body::Body>,
344 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
345 {
346 WorkbookAgentServiceClient::new(InterceptedService::new(inner, interceptor))
347 }
348 #[must_use]
353 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
354 self.inner = self.inner.send_compressed(encoding);
355 self
356 }
357 #[must_use]
359 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
360 self.inner = self.inner.accept_compressed(encoding);
361 self
362 }
363 #[must_use]
367 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
368 self.inner = self.inner.max_decoding_message_size(limit);
369 self
370 }
371 #[must_use]
375 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
376 self.inner = self.inner.max_encoding_message_size(limit);
377 self
378 }
379 pub async fn stream_chat(
381 &mut self,
382 request: impl tonic::IntoRequest<super::StreamChatRequest>,
383 ) -> std::result::Result<
384 tonic::Response<tonic::codec::Streaming<super::StreamChatResponse>>,
385 tonic::Status,
386 > {
387 self.inner
388 .ready()
389 .await
390 .map_err(|e| {
391 tonic::Status::unknown(
392 format!("Service was not ready: {}", e.into()),
393 )
394 })?;
395 let codec = tonic::codec::ProstCodec::default();
396 let path = http::uri::PathAndQuery::from_static(
397 "/nominal.ai.v1.WorkbookAgentService/StreamChat",
398 );
399 let mut req = request.into_request();
400 req.extensions_mut()
401 .insert(
402 GrpcMethod::new("nominal.ai.v1.WorkbookAgentService", "StreamChat"),
403 );
404 self.inner.server_streaming(req, path, codec).await
405 }
406 }
407}
408#[derive(Clone, Copy, PartialEq, ::prost::Message)]
409pub struct IsAiEnabledForUserRequest {}
410#[derive(Clone, Copy, PartialEq, ::prost::Message)]
411pub struct IsAiEnabledForUserResponse {
412 #[prost(bool, tag = "1")]
413 pub is_enabled: bool,
414}
415pub mod ai_features_service_client {
417 #![allow(
418 unused_variables,
419 dead_code,
420 missing_docs,
421 clippy::wildcard_imports,
422 clippy::let_unit_value,
423 )]
424 use tonic::codegen::*;
425 use tonic::codegen::http::Uri;
426 #[derive(Debug, Clone)]
428 pub struct AiFeaturesServiceClient<T> {
429 inner: tonic::client::Grpc<T>,
430 }
431 impl AiFeaturesServiceClient<tonic::transport::Channel> {
432 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
434 where
435 D: TryInto<tonic::transport::Endpoint>,
436 D::Error: Into<StdError>,
437 {
438 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
439 Ok(Self::new(conn))
440 }
441 }
442 impl<T> AiFeaturesServiceClient<T>
443 where
444 T: tonic::client::GrpcService<tonic::body::Body>,
445 T::Error: Into<StdError>,
446 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
447 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
448 {
449 pub fn new(inner: T) -> Self {
450 let inner = tonic::client::Grpc::new(inner);
451 Self { inner }
452 }
453 pub fn with_origin(inner: T, origin: Uri) -> Self {
454 let inner = tonic::client::Grpc::with_origin(inner, origin);
455 Self { inner }
456 }
457 pub fn with_interceptor<F>(
458 inner: T,
459 interceptor: F,
460 ) -> AiFeaturesServiceClient<InterceptedService<T, F>>
461 where
462 F: tonic::service::Interceptor,
463 T::ResponseBody: Default,
464 T: tonic::codegen::Service<
465 http::Request<tonic::body::Body>,
466 Response = http::Response<
467 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
468 >,
469 >,
470 <T as tonic::codegen::Service<
471 http::Request<tonic::body::Body>,
472 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
473 {
474 AiFeaturesServiceClient::new(InterceptedService::new(inner, interceptor))
475 }
476 #[must_use]
481 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
482 self.inner = self.inner.send_compressed(encoding);
483 self
484 }
485 #[must_use]
487 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
488 self.inner = self.inner.accept_compressed(encoding);
489 self
490 }
491 #[must_use]
495 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
496 self.inner = self.inner.max_decoding_message_size(limit);
497 self
498 }
499 #[must_use]
503 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
504 self.inner = self.inner.max_encoding_message_size(limit);
505 self
506 }
507 pub async fn is_ai_enabled_for_user(
509 &mut self,
510 request: impl tonic::IntoRequest<super::IsAiEnabledForUserRequest>,
511 ) -> std::result::Result<
512 tonic::Response<super::IsAiEnabledForUserResponse>,
513 tonic::Status,
514 > {
515 self.inner
516 .ready()
517 .await
518 .map_err(|e| {
519 tonic::Status::unknown(
520 format!("Service was not ready: {}", e.into()),
521 )
522 })?;
523 let codec = tonic::codec::ProstCodec::default();
524 let path = http::uri::PathAndQuery::from_static(
525 "/nominal.ai.v1.AIFeaturesService/IsAIEnabledForUser",
526 );
527 let mut req = request.into_request();
528 req.extensions_mut()
529 .insert(
530 GrpcMethod::new(
531 "nominal.ai.v1.AIFeaturesService",
532 "IsAIEnabledForUser",
533 ),
534 );
535 self.inner.unary(req, path, codec).await
536 }
537 }
538}
539#[derive(Clone, PartialEq, ::prost::Message)]
542pub struct CreateOrUpdateKnowledgeBaseRequest {
543 #[prost(string, tag = "1")]
544 pub attachment_rid: ::prost::alloc::string::String,
545 #[prost(string, tag = "2")]
547 pub summary_description: ::prost::alloc::string::String,
548 #[prost(enumeration = "KnowledgeBaseType", optional, tag = "3")]
549 pub r#type: ::core::option::Option<i32>,
550}
551#[derive(Clone, PartialEq, ::prost::Message)]
553pub struct CreateOrUpdateKnowledgeBaseResponse {
554 #[prost(string, tag = "1")]
555 pub knowledge_base_rid: ::prost::alloc::string::String,
556}
557#[derive(Clone, PartialEq, ::prost::Message)]
559pub struct KnowledgeBase {
560 #[prost(string, tag = "1")]
561 pub knowledge_base_rid: ::prost::alloc::string::String,
562 #[prost(string, tag = "2")]
563 pub attachment_rid: ::prost::alloc::string::String,
564 #[prost(string, tag = "3")]
565 pub workspace_rid: ::prost::alloc::string::String,
566 #[prost(string, tag = "4")]
567 pub summary_description: ::prost::alloc::string::String,
568 #[prost(enumeration = "KnowledgeBaseType", tag = "5")]
569 pub r#type: i32,
570 #[prost(int32, tag = "6")]
571 pub version: i32,
572}
573#[derive(Clone, PartialEq, ::prost::Message)]
574pub struct ListRequest {
575 #[prost(string, tag = "1")]
576 pub workspace_rid: ::prost::alloc::string::String,
577}
578#[derive(Clone, PartialEq, ::prost::Message)]
579pub struct ListResponse {
580 #[prost(message, repeated, tag = "1")]
581 pub knowledge_bases: ::prost::alloc::vec::Vec<KnowledgeBase>,
582}
583#[derive(Clone, PartialEq, ::prost::Message)]
584pub struct DeleteRequest {
585 #[prost(string, tag = "1")]
586 pub knowledge_base_rid: ::prost::alloc::string::String,
587}
588#[derive(Clone, Copy, PartialEq, ::prost::Message)]
589pub struct DeleteResponse {
590 #[prost(bool, tag = "1")]
591 pub success: bool,
592}
593#[derive(Clone, PartialEq, ::prost::Message)]
594pub struct GetBatchRequest {
595 #[prost(string, repeated, tag = "1")]
596 pub knowledge_base_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
597}
598#[derive(Clone, PartialEq, ::prost::Message)]
599pub struct GetBatchResponse {
600 #[prost(message, repeated, tag = "1")]
601 pub knowledge_bases: ::prost::alloc::vec::Vec<KnowledgeBase>,
602}
603#[derive(Clone, PartialEq, ::prost::Message)]
606pub struct GenerateSummaryDescriptionRequest {
607 #[prost(string, tag = "1")]
608 pub attachment_rid: ::prost::alloc::string::String,
609}
610#[derive(Clone, PartialEq, ::prost::Message)]
611pub struct GenerateSummaryDescriptionResponse {
612 #[prost(string, tag = "1")]
613 pub summary_description: ::prost::alloc::string::String,
614}
615#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
617#[repr(i32)]
618pub enum KnowledgeBaseType {
619 Unspecified = 0,
621 Prompt = 1,
623 Embedding = 2,
625}
626impl KnowledgeBaseType {
627 pub fn as_str_name(&self) -> &'static str {
632 match self {
633 Self::Unspecified => "KNOWLEDGE_BASE_TYPE_UNSPECIFIED",
634 Self::Prompt => "KNOWLEDGE_BASE_TYPE_PROMPT",
635 Self::Embedding => "KNOWLEDGE_BASE_TYPE_EMBEDDING",
636 }
637 }
638 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
640 match value {
641 "KNOWLEDGE_BASE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
642 "KNOWLEDGE_BASE_TYPE_PROMPT" => Some(Self::Prompt),
643 "KNOWLEDGE_BASE_TYPE_EMBEDDING" => Some(Self::Embedding),
644 _ => None,
645 }
646 }
647}
648pub mod knowledge_base_service_client {
650 #![allow(
651 unused_variables,
652 dead_code,
653 missing_docs,
654 clippy::wildcard_imports,
655 clippy::let_unit_value,
656 )]
657 use tonic::codegen::*;
658 use tonic::codegen::http::Uri;
659 #[derive(Debug, Clone)]
661 pub struct KnowledgeBaseServiceClient<T> {
662 inner: tonic::client::Grpc<T>,
663 }
664 impl KnowledgeBaseServiceClient<tonic::transport::Channel> {
665 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
667 where
668 D: TryInto<tonic::transport::Endpoint>,
669 D::Error: Into<StdError>,
670 {
671 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
672 Ok(Self::new(conn))
673 }
674 }
675 impl<T> KnowledgeBaseServiceClient<T>
676 where
677 T: tonic::client::GrpcService<tonic::body::Body>,
678 T::Error: Into<StdError>,
679 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
680 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
681 {
682 pub fn new(inner: T) -> Self {
683 let inner = tonic::client::Grpc::new(inner);
684 Self { inner }
685 }
686 pub fn with_origin(inner: T, origin: Uri) -> Self {
687 let inner = tonic::client::Grpc::with_origin(inner, origin);
688 Self { inner }
689 }
690 pub fn with_interceptor<F>(
691 inner: T,
692 interceptor: F,
693 ) -> KnowledgeBaseServiceClient<InterceptedService<T, F>>
694 where
695 F: tonic::service::Interceptor,
696 T::ResponseBody: Default,
697 T: tonic::codegen::Service<
698 http::Request<tonic::body::Body>,
699 Response = http::Response<
700 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
701 >,
702 >,
703 <T as tonic::codegen::Service<
704 http::Request<tonic::body::Body>,
705 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
706 {
707 KnowledgeBaseServiceClient::new(InterceptedService::new(inner, interceptor))
708 }
709 #[must_use]
714 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
715 self.inner = self.inner.send_compressed(encoding);
716 self
717 }
718 #[must_use]
720 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
721 self.inner = self.inner.accept_compressed(encoding);
722 self
723 }
724 #[must_use]
728 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
729 self.inner = self.inner.max_decoding_message_size(limit);
730 self
731 }
732 #[must_use]
736 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
737 self.inner = self.inner.max_encoding_message_size(limit);
738 self
739 }
740 pub async fn create_or_update_knowledge_base(
742 &mut self,
743 request: impl tonic::IntoRequest<super::CreateOrUpdateKnowledgeBaseRequest>,
744 ) -> std::result::Result<
745 tonic::Response<super::CreateOrUpdateKnowledgeBaseResponse>,
746 tonic::Status,
747 > {
748 self.inner
749 .ready()
750 .await
751 .map_err(|e| {
752 tonic::Status::unknown(
753 format!("Service was not ready: {}", e.into()),
754 )
755 })?;
756 let codec = tonic::codec::ProstCodec::default();
757 let path = http::uri::PathAndQuery::from_static(
758 "/nominal.ai.v1.KnowledgeBaseService/CreateOrUpdateKnowledgeBase",
759 );
760 let mut req = request.into_request();
761 req.extensions_mut()
762 .insert(
763 GrpcMethod::new(
764 "nominal.ai.v1.KnowledgeBaseService",
765 "CreateOrUpdateKnowledgeBase",
766 ),
767 );
768 self.inner.unary(req, path, codec).await
769 }
770 pub async fn list(
772 &mut self,
773 request: impl tonic::IntoRequest<super::ListRequest>,
774 ) -> std::result::Result<tonic::Response<super::ListResponse>, tonic::Status> {
775 self.inner
776 .ready()
777 .await
778 .map_err(|e| {
779 tonic::Status::unknown(
780 format!("Service was not ready: {}", e.into()),
781 )
782 })?;
783 let codec = tonic::codec::ProstCodec::default();
784 let path = http::uri::PathAndQuery::from_static(
785 "/nominal.ai.v1.KnowledgeBaseService/List",
786 );
787 let mut req = request.into_request();
788 req.extensions_mut()
789 .insert(GrpcMethod::new("nominal.ai.v1.KnowledgeBaseService", "List"));
790 self.inner.unary(req, path, codec).await
791 }
792 pub async fn delete(
794 &mut self,
795 request: impl tonic::IntoRequest<super::DeleteRequest>,
796 ) -> std::result::Result<tonic::Response<super::DeleteResponse>, tonic::Status> {
797 self.inner
798 .ready()
799 .await
800 .map_err(|e| {
801 tonic::Status::unknown(
802 format!("Service was not ready: {}", e.into()),
803 )
804 })?;
805 let codec = tonic::codec::ProstCodec::default();
806 let path = http::uri::PathAndQuery::from_static(
807 "/nominal.ai.v1.KnowledgeBaseService/Delete",
808 );
809 let mut req = request.into_request();
810 req.extensions_mut()
811 .insert(GrpcMethod::new("nominal.ai.v1.KnowledgeBaseService", "Delete"));
812 self.inner.unary(req, path, codec).await
813 }
814 pub async fn get_batch(
816 &mut self,
817 request: impl tonic::IntoRequest<super::GetBatchRequest>,
818 ) -> std::result::Result<
819 tonic::Response<super::GetBatchResponse>,
820 tonic::Status,
821 > {
822 self.inner
823 .ready()
824 .await
825 .map_err(|e| {
826 tonic::Status::unknown(
827 format!("Service was not ready: {}", e.into()),
828 )
829 })?;
830 let codec = tonic::codec::ProstCodec::default();
831 let path = http::uri::PathAndQuery::from_static(
832 "/nominal.ai.v1.KnowledgeBaseService/GetBatch",
833 );
834 let mut req = request.into_request();
835 req.extensions_mut()
836 .insert(
837 GrpcMethod::new("nominal.ai.v1.KnowledgeBaseService", "GetBatch"),
838 );
839 self.inner.unary(req, path, codec).await
840 }
841 pub async fn generate_summary_description(
843 &mut self,
844 request: impl tonic::IntoRequest<super::GenerateSummaryDescriptionRequest>,
845 ) -> std::result::Result<
846 tonic::Response<super::GenerateSummaryDescriptionResponse>,
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.KnowledgeBaseService/GenerateSummaryDescription",
860 );
861 let mut req = request.into_request();
862 req.extensions_mut()
863 .insert(
864 GrpcMethod::new(
865 "nominal.ai.v1.KnowledgeBaseService",
866 "GenerateSummaryDescription",
867 ),
868 );
869 self.inner.unary(req, path, codec).await
870 }
871 }
872}