nominal_api/proto/
nominal.ai.v1.rs

1// This file is @generated by prost-build.
2/// StreamChatRequest is a request to stream chat messages for workbook AI agent
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct StreamChatRequest {
5    #[prost(message, repeated, tag = "1")]
6    pub messages: ::prost::alloc::vec::Vec<ModelMessage>,
7    /// JSON-serialized representation of INotebook
8    #[prost(string, optional, tag = "2")]
9    pub notebook_as_json: ::core::option::Option<::prost::alloc::string::String>,
10    /// The current tab visible in the workbook from the user's perspective
11    #[prost(int32, optional, tag = "3")]
12    pub selected_tab_index: ::core::option::Option<i32>,
13    /// Optional: image files to provide to the agent
14    #[prost(message, repeated, tag = "4")]
15    pub images: ::prost::alloc::vec::Vec<ImagePart>,
16    /// Time range for the tab that is currently visible to the user
17    #[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/// ModelMessage is a discriminated union of system, user, assistant, and tool messages.
35/// Each message type has its own structure and content.
36#[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}
41/// Nested message and enum types in `ModelMessage`.
42pub 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/// A user message containing text
52#[derive(Clone, PartialEq, ::prost::Message)]
53pub struct UserModelMessage {
54    #[prost(message, repeated, tag = "1")]
55    pub text: ::prost::alloc::vec::Vec<UserContentPart>,
56}
57/// An assistant message containing text
58#[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}
68/// Nested message and enum types in `UserContentPart`.
69pub 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/// Content part for assistant messages: can be text, reasoning, or mutation.
77#[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}
82/// Nested message and enum types in `AssistantContentPart`.
83pub 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/// Text part for user or assistant messages.
93#[derive(Clone, PartialEq, ::prost::Message)]
94pub struct TextPart {
95    #[prost(string, tag = "1")]
96    pub text: ::prost::alloc::string::String,
97}
98/// User-supplied image part.
99#[derive(Clone, PartialEq, ::prost::Message)]
100pub struct ImagePart {
101    /// The base64-encoded image data
102    #[prost(bytes = "vec", tag = "1")]
103    pub data: ::prost::alloc::vec::Vec<u8>,
104    /// The media type of the image (e.g. "image/png", "image/jpeg")
105    #[prost(string, optional, tag = "2")]
106    pub media_type: ::core::option::Option<::prost::alloc::string::String>,
107    /// Optional: the filename of the image
108    #[prost(string, optional, tag = "3")]
109    pub filename: ::core::option::Option<::prost::alloc::string::String>,
110}
111/// Reasoning part for assistant messages.
112#[derive(Clone, PartialEq, ::prost::Message)]
113pub struct ReasoningPart {
114    #[prost(string, tag = "1")]
115    pub reasoning: ::prost::alloc::string::String,
116}
117/// StreamChatResponse is a discriminated union response to a StreamChatRequest
118#[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}
126/// Nested message and enum types in `StreamChatResponse`.
127pub 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/// Indicates the end of a chat session
153#[derive(Clone, Copy, PartialEq, ::prost::Message)]
154pub struct Finish {}
155/// An error that occurred during the chat session
156#[derive(Clone, PartialEq, ::prost::Message)]
157pub struct Error {
158    #[prost(string, tag = "1")]
159    pub message: ::prost::alloc::string::String,
160}
161/// Indicates the start of a text message from the agent
162#[derive(Clone, PartialEq, ::prost::Message)]
163pub struct TextStart {
164    /// uniquely identifies the text message (e.g. uuid) so that the client can
165    /// merge parallel message streams (if it happens).
166    #[prost(string, tag = "1")]
167    pub id: ::prost::alloc::string::String,
168}
169/// A delta (continuation) of a text message from the agent
170#[derive(Clone, PartialEq, ::prost::Message)]
171pub struct TextDelta {
172    #[prost(string, tag = "1")]
173    pub id: ::prost::alloc::string::String,
174    /// The next chunk of text
175    #[prost(string, tag = "2")]
176    pub delta: ::prost::alloc::string::String,
177}
178/// Indicates the end of a text message from the agent
179#[derive(Clone, PartialEq, ::prost::Message)]
180pub struct TextEnd {
181    #[prost(string, tag = "1")]
182    pub id: ::prost::alloc::string::String,
183}
184/// Indicates the start of a reasoning message from the agent
185#[derive(Clone, PartialEq, ::prost::Message)]
186pub struct ReasoningStart {
187    #[prost(string, tag = "1")]
188    pub id: ::prost::alloc::string::String,
189}
190/// A delta (continuation) of a reasoning message from the agent
191#[derive(Clone, PartialEq, ::prost::Message)]
192pub struct ReasoningDelta {
193    #[prost(string, tag = "1")]
194    pub id: ::prost::alloc::string::String,
195    /// The next chunk of reasoning
196    #[prost(string, tag = "2")]
197    pub delta: ::prost::alloc::string::String,
198}
199/// Indicates the end of a reasoning message from the agent
200#[derive(Clone, PartialEq, ::prost::Message)]
201pub struct ReasoningEnd {
202    #[prost(string, tag = "1")]
203    pub id: ::prost::alloc::string::String,
204}
205/// Add a new tab to the workbook
206#[derive(Clone, PartialEq, ::prost::Message)]
207pub struct AddTabMutation {
208    /// if tab_name is not provided, we'll name it "New Tab"
209    #[prost(string, optional, tag = "1")]
210    pub tab_name: ::core::option::Option<::prost::alloc::string::String>,
211}
212/// this is the "result" of the mutation
213#[derive(Clone, PartialEq, ::prost::Message)]
214pub struct AddOrUpdatePanelMutation {
215    /// JSON-serialized representation of IVizDefinition
216    #[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/// AddOrReplaceVariableMutation is a mutation to add or replace a variable in the workbook
229#[derive(Clone, PartialEq, ::prost::Message)]
230pub struct AddOrReplaceVariableMutation {
231    /// scout_compute_api_ComputeSpecWithContext (this needs to be resolved)
232    /// be careful: this uses the scout_compute_api version of ComputeSpecWithContext, which stores the spec as "seriesNode"
233    /// and is NOT the same as ComputeSpecWithContext that is stored in INotebook.
234    #[prost(string, tag = "1")]
235    pub compute_spec_as_json: ::prost::alloc::string::String,
236    /// if variable_name is not provided, we'll assume it's a new variable and auto-generate a unique name
237    #[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/// DeleteVariablesMutation is a mutation to delete variables from the workbook
243#[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/// WorkbookMutation is a mutation to the workbook
249#[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}
256/// Nested message and enum types in `WorkbookMutation`.
257pub 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/// this is a concise descirption of a tool call that the agent is making internally
273/// without revealing too much detail about the tool call, it informs the user what the agent is doing
274/// at a high level. the format is: `{tool_action_verb} {tool_target}` for example:
275/// "Search channels for My Datasource"
276#[derive(Clone, PartialEq, ::prost::Message)]
277pub struct ToolAction {
278    #[prost(string, tag = "1")]
279    pub id: ::prost::alloc::string::String,
280    /// "Thought", "Read", "Find", "Look-up", etc.
281    #[prost(string, tag = "2")]
282    pub tool_action_verb: ::prost::alloc::string::String,
283    /// "workbook", "channel", "variable", "panel", etc.
284    #[prost(string, optional, tag = "3")]
285    pub tool_target: ::core::option::Option<::prost::alloc::string::String>,
286}
287/// Generated client implementations.
288pub 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    /// WorkbookAgentService provides AI-powered assistance for workbook operations
299    #[derive(Debug, Clone)]
300    pub struct WorkbookAgentServiceClient<T> {
301        inner: tonic::client::Grpc<T>,
302    }
303    impl WorkbookAgentServiceClient<tonic::transport::Channel> {
304        /// Attempt to create a new client by connecting to a given endpoint.
305        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        /// Compress requests with the given encoding.
349        ///
350        /// This requires the server to support it otherwise it might respond with an
351        /// error.
352        #[must_use]
353        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
354            self.inner = self.inner.send_compressed(encoding);
355            self
356        }
357        /// Enable decompressing responses.
358        #[must_use]
359        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
360            self.inner = self.inner.accept_compressed(encoding);
361            self
362        }
363        /// Limits the maximum size of a decoded message.
364        ///
365        /// Default: `4MB`
366        #[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        /// Limits the maximum size of an encoded message.
372        ///
373        /// Default: `usize::MAX`
374        #[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        /// StreamChat handles bidirectional streaming chat for workbook AI agent
380        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/// CreateOrUpdateKnowledgeBaseRequest is a request to create a knowledge from an attachment in the attachment's
409/// workspace. Subsequent calls for the same attachment will overwrite the existing knowledge base.
410#[derive(Clone, PartialEq, ::prost::Message)]
411pub struct CreateOrUpdateKnowledgeBaseRequest {
412    #[prost(string, tag = "1")]
413    pub attachment_rid: ::prost::alloc::string::String,
414    /// summary of the knowledge base, will be used by the LLM to decide when to use it
415    #[prost(string, tag = "2")]
416    pub summary_description: ::prost::alloc::string::String,
417    #[prost(enumeration = "KnowledgeBaseType", tag = "3")]
418    pub r#type: i32,
419}
420/// CreateOrUpdateKnowledgeBaseResponse is the response to creating/updating a knowledge base
421#[derive(Clone, PartialEq, ::prost::Message)]
422pub struct CreateOrUpdateKnowledgeBaseResponse {
423    #[prost(string, tag = "1")]
424    pub knowledge_base_rid: ::prost::alloc::string::String,
425}
426/// KnowledgeBase represents a knowledge base entry
427#[derive(Clone, PartialEq, ::prost::Message)]
428pub struct KnowledgeBase {
429    #[prost(string, tag = "1")]
430    pub knowledge_base_rid: ::prost::alloc::string::String,
431    #[prost(string, tag = "2")]
432    pub attachment_rid: ::prost::alloc::string::String,
433    #[prost(string, tag = "3")]
434    pub workspace_rid: ::prost::alloc::string::String,
435    #[prost(string, tag = "4")]
436    pub summary_description: ::prost::alloc::string::String,
437    #[prost(enumeration = "KnowledgeBaseType", tag = "5")]
438    pub r#type: i32,
439    #[prost(int32, tag = "6")]
440    pub version: i32,
441}
442#[derive(Clone, PartialEq, ::prost::Message)]
443pub struct ListRequest {
444    #[prost(string, tag = "1")]
445    pub workspace_rid: ::prost::alloc::string::String,
446}
447#[derive(Clone, PartialEq, ::prost::Message)]
448pub struct ListResponse {
449    #[prost(message, repeated, tag = "1")]
450    pub knowledge_bases: ::prost::alloc::vec::Vec<KnowledgeBase>,
451}
452#[derive(Clone, PartialEq, ::prost::Message)]
453pub struct DeleteRequest {
454    #[prost(string, tag = "1")]
455    pub knowledge_base_rid: ::prost::alloc::string::String,
456}
457#[derive(Clone, Copy, PartialEq, ::prost::Message)]
458pub struct DeleteResponse {
459    #[prost(bool, tag = "1")]
460    pub success: bool,
461}
462#[derive(Clone, PartialEq, ::prost::Message)]
463pub struct GetBatchRequest {
464    #[prost(string, repeated, tag = "1")]
465    pub knowledge_base_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
466}
467#[derive(Clone, PartialEq, ::prost::Message)]
468pub struct GetBatchResponse {
469    #[prost(message, repeated, tag = "1")]
470    pub knowledge_bases: ::prost::alloc::vec::Vec<KnowledgeBase>,
471}
472/// generate summary description is intentionally going to return the generated description to the frontend
473/// rather than storing it in the knowledge base directly because the description needs to be accepted by the user
474#[derive(Clone, PartialEq, ::prost::Message)]
475pub struct GenerateSummaryDescriptionRequest {
476    #[prost(string, tag = "1")]
477    pub attachment_rid: ::prost::alloc::string::String,
478}
479#[derive(Clone, PartialEq, ::prost::Message)]
480pub struct GenerateSummaryDescriptionResponse {
481    #[prost(string, tag = "1")]
482    pub summary_description: ::prost::alloc::string::String,
483}
484/// KnowledgeBaseType defines the types of knowledge base
485#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
486#[repr(i32)]
487pub enum KnowledgeBaseType {
488    /// defaults to PROMPT
489    Unspecified = 0,
490    /// knowledge base gets added directly to prompt (needs to be small enough!)
491    Prompt = 1,
492    /// knowledge base gets used via vector search on embeddings
493    Embedding = 2,
494}
495impl KnowledgeBaseType {
496    /// String value of the enum field names used in the ProtoBuf definition.
497    ///
498    /// The values are not transformed in any way and thus are considered stable
499    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
500    pub fn as_str_name(&self) -> &'static str {
501        match self {
502            Self::Unspecified => "KNOWLEDGE_BASE_TYPE_UNSPECIFIED",
503            Self::Prompt => "KNOWLEDGE_BASE_TYPE_PROMPT",
504            Self::Embedding => "KNOWLEDGE_BASE_TYPE_EMBEDDING",
505        }
506    }
507    /// Creates an enum from field names used in the ProtoBuf definition.
508    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
509        match value {
510            "KNOWLEDGE_BASE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
511            "KNOWLEDGE_BASE_TYPE_PROMPT" => Some(Self::Prompt),
512            "KNOWLEDGE_BASE_TYPE_EMBEDDING" => Some(Self::Embedding),
513            _ => None,
514        }
515    }
516}
517/// Generated client implementations.
518pub mod knowledge_base_service_client {
519    #![allow(
520        unused_variables,
521        dead_code,
522        missing_docs,
523        clippy::wildcard_imports,
524        clippy::let_unit_value,
525    )]
526    use tonic::codegen::*;
527    use tonic::codegen::http::Uri;
528    /// KnowledgeBaseService provides AI-powered knowledge base management
529    #[derive(Debug, Clone)]
530    pub struct KnowledgeBaseServiceClient<T> {
531        inner: tonic::client::Grpc<T>,
532    }
533    impl KnowledgeBaseServiceClient<tonic::transport::Channel> {
534        /// Attempt to create a new client by connecting to a given endpoint.
535        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
536        where
537            D: TryInto<tonic::transport::Endpoint>,
538            D::Error: Into<StdError>,
539        {
540            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
541            Ok(Self::new(conn))
542        }
543    }
544    impl<T> KnowledgeBaseServiceClient<T>
545    where
546        T: tonic::client::GrpcService<tonic::body::Body>,
547        T::Error: Into<StdError>,
548        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
549        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
550    {
551        pub fn new(inner: T) -> Self {
552            let inner = tonic::client::Grpc::new(inner);
553            Self { inner }
554        }
555        pub fn with_origin(inner: T, origin: Uri) -> Self {
556            let inner = tonic::client::Grpc::with_origin(inner, origin);
557            Self { inner }
558        }
559        pub fn with_interceptor<F>(
560            inner: T,
561            interceptor: F,
562        ) -> KnowledgeBaseServiceClient<InterceptedService<T, F>>
563        where
564            F: tonic::service::Interceptor,
565            T::ResponseBody: Default,
566            T: tonic::codegen::Service<
567                http::Request<tonic::body::Body>,
568                Response = http::Response<
569                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
570                >,
571            >,
572            <T as tonic::codegen::Service<
573                http::Request<tonic::body::Body>,
574            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
575        {
576            KnowledgeBaseServiceClient::new(InterceptedService::new(inner, interceptor))
577        }
578        /// Compress requests with the given encoding.
579        ///
580        /// This requires the server to support it otherwise it might respond with an
581        /// error.
582        #[must_use]
583        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
584            self.inner = self.inner.send_compressed(encoding);
585            self
586        }
587        /// Enable decompressing responses.
588        #[must_use]
589        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
590            self.inner = self.inner.accept_compressed(encoding);
591            self
592        }
593        /// Limits the maximum size of a decoded message.
594        ///
595        /// Default: `4MB`
596        #[must_use]
597        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
598            self.inner = self.inner.max_decoding_message_size(limit);
599            self
600        }
601        /// Limits the maximum size of an encoded message.
602        ///
603        /// Default: `usize::MAX`
604        #[must_use]
605        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
606            self.inner = self.inner.max_encoding_message_size(limit);
607            self
608        }
609        /// CreateOrUpdateKnowledgeBase creates a knowledge base in the workspace
610        pub async fn create_or_update_knowledge_base(
611            &mut self,
612            request: impl tonic::IntoRequest<super::CreateOrUpdateKnowledgeBaseRequest>,
613        ) -> std::result::Result<
614            tonic::Response<super::CreateOrUpdateKnowledgeBaseResponse>,
615            tonic::Status,
616        > {
617            self.inner
618                .ready()
619                .await
620                .map_err(|e| {
621                    tonic::Status::unknown(
622                        format!("Service was not ready: {}", e.into()),
623                    )
624                })?;
625            let codec = tonic::codec::ProstCodec::default();
626            let path = http::uri::PathAndQuery::from_static(
627                "/nominal.ai.v1.KnowledgeBaseService/CreateOrUpdateKnowledgeBase",
628            );
629            let mut req = request.into_request();
630            req.extensions_mut()
631                .insert(
632                    GrpcMethod::new(
633                        "nominal.ai.v1.KnowledgeBaseService",
634                        "CreateOrUpdateKnowledgeBase",
635                    ),
636                );
637            self.inner.unary(req, path, codec).await
638        }
639        /// List returns all knowledge bases in the specified workspace
640        pub async fn list(
641            &mut self,
642            request: impl tonic::IntoRequest<super::ListRequest>,
643        ) -> std::result::Result<tonic::Response<super::ListResponse>, tonic::Status> {
644            self.inner
645                .ready()
646                .await
647                .map_err(|e| {
648                    tonic::Status::unknown(
649                        format!("Service was not ready: {}", e.into()),
650                    )
651                })?;
652            let codec = tonic::codec::ProstCodec::default();
653            let path = http::uri::PathAndQuery::from_static(
654                "/nominal.ai.v1.KnowledgeBaseService/List",
655            );
656            let mut req = request.into_request();
657            req.extensions_mut()
658                .insert(GrpcMethod::new("nominal.ai.v1.KnowledgeBaseService", "List"));
659            self.inner.unary(req, path, codec).await
660        }
661        /// Delete removes a knowledge base by its RID
662        pub async fn delete(
663            &mut self,
664            request: impl tonic::IntoRequest<super::DeleteRequest>,
665        ) -> std::result::Result<tonic::Response<super::DeleteResponse>, tonic::Status> {
666            self.inner
667                .ready()
668                .await
669                .map_err(|e| {
670                    tonic::Status::unknown(
671                        format!("Service was not ready: {}", e.into()),
672                    )
673                })?;
674            let codec = tonic::codec::ProstCodec::default();
675            let path = http::uri::PathAndQuery::from_static(
676                "/nominal.ai.v1.KnowledgeBaseService/Delete",
677            );
678            let mut req = request.into_request();
679            req.extensions_mut()
680                .insert(GrpcMethod::new("nominal.ai.v1.KnowledgeBaseService", "Delete"));
681            self.inner.unary(req, path, codec).await
682        }
683        /// GetBatch retrieves multiple knowledge bases by their RIDs
684        pub async fn get_batch(
685            &mut self,
686            request: impl tonic::IntoRequest<super::GetBatchRequest>,
687        ) -> std::result::Result<
688            tonic::Response<super::GetBatchResponse>,
689            tonic::Status,
690        > {
691            self.inner
692                .ready()
693                .await
694                .map_err(|e| {
695                    tonic::Status::unknown(
696                        format!("Service was not ready: {}", e.into()),
697                    )
698                })?;
699            let codec = tonic::codec::ProstCodec::default();
700            let path = http::uri::PathAndQuery::from_static(
701                "/nominal.ai.v1.KnowledgeBaseService/GetBatch",
702            );
703            let mut req = request.into_request();
704            req.extensions_mut()
705                .insert(
706                    GrpcMethod::new("nominal.ai.v1.KnowledgeBaseService", "GetBatch"),
707                );
708            self.inner.unary(req, path, codec).await
709        }
710        /// GenerateSummaryDescription generates a summary description for an attachment rid
711        pub async fn generate_summary_description(
712            &mut self,
713            request: impl tonic::IntoRequest<super::GenerateSummaryDescriptionRequest>,
714        ) -> std::result::Result<
715            tonic::Response<super::GenerateSummaryDescriptionResponse>,
716            tonic::Status,
717        > {
718            self.inner
719                .ready()
720                .await
721                .map_err(|e| {
722                    tonic::Status::unknown(
723                        format!("Service was not ready: {}", e.into()),
724                    )
725                })?;
726            let codec = tonic::codec::ProstCodec::default();
727            let path = http::uri::PathAndQuery::from_static(
728                "/nominal.ai.v1.KnowledgeBaseService/GenerateSummaryDescription",
729            );
730            let mut req = request.into_request();
731            req.extensions_mut()
732                .insert(
733                    GrpcMethod::new(
734                        "nominal.ai.v1.KnowledgeBaseService",
735                        "GenerateSummaryDescription",
736                    ),
737                );
738            self.inner.unary(req, path, codec).await
739        }
740    }
741}