nominal_api/proto/
nominal.ai.v1.rs

1// This file is @generated by prost-build.
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct GetSnapshotRidByUserMessageIdRequest {
4    #[prost(string, tag = "1")]
5    pub conversation_rid: ::prost::alloc::string::String,
6    #[prost(string, tag = "2")]
7    pub message_id: ::prost::alloc::string::String,
8}
9/// Will return an empty response body in the case where the message id exists, but there is no associated snapshot
10/// This occurs in the instance where a message was sent in a non-workbook context
11#[derive(Clone, PartialEq, ::prost::Message)]
12pub struct GetSnapshotRidByUserMessageIdResponse {
13    #[prost(string, optional, tag = "1")]
14    pub snapshot_rid: ::core::option::Option<::prost::alloc::string::String>,
15}
16/// StreamChatRequest is a request to stream chat messages for AI agent
17#[derive(Clone, PartialEq, ::prost::Message)]
18pub struct StreamChatRequest {
19    /// The conversation ID
20    #[prost(string, tag = "1")]
21    pub conversation_rid: ::prost::alloc::string::String,
22    /// The user message to append to the conversation
23    #[prost(message, optional, tag = "2")]
24    pub message: ::core::option::Option<UserModelMessage>,
25    /// Optional: image files to provide to the agent
26    #[prost(message, repeated, tag = "3")]
27    pub images: ::prost::alloc::vec::Vec<ImagePart>,
28    /// Context-specific fields based on the oneofKind.
29    #[prost(oneof = "stream_chat_request::Context", tags = "4, 5")]
30    pub context: ::core::option::Option<stream_chat_request::Context>,
31}
32/// Nested message and enum types in `StreamChatRequest`.
33pub mod stream_chat_request {
34    /// Context-specific fields based on the oneofKind.
35    #[derive(Clone, PartialEq, ::prost::Oneof)]
36    pub enum Context {
37        #[prost(message, tag = "4")]
38        Workbook(super::WorkbookContext),
39        #[prost(message, tag = "5")]
40        Global(super::GlobalContext),
41    }
42}
43/// WorkbookContext contains workbook-specific context fields
44#[derive(Clone, PartialEq, ::prost::Message)]
45pub struct WorkbookContext {
46    /// RID of the workbook to use for context
47    #[prost(string, tag = "1")]
48    pub workbook_rid: ::prost::alloc::string::String,
49    /// Optional: the user's presence in the workbook
50    #[prost(message, optional, tag = "2")]
51    pub user_presence: ::core::option::Option<WorkbookUserPresence>,
52}
53/// DefaultContext (no context)
54#[derive(Clone, Copy, PartialEq, ::prost::Message)]
55pub struct GlobalContext {}
56/// WorkbookUserPresence contains the user's presence in the workbook
57/// which is used to describe what the user is viewing at the time of the message.
58#[derive(Clone, Copy, PartialEq, ::prost::Message)]
59pub struct WorkbookUserPresence {
60    #[prost(int32, optional, tag = "1")]
61    pub tab_index: ::core::option::Option<i32>,
62    #[prost(message, optional, tag = "2")]
63    pub range: ::core::option::Option<TimeRange>,
64}
65/// CreateConversation request will create a new conversation thread
66/// if old conversation id is not set, a brand new, clear chat is created
67/// If old conversation id is set without a previous message id, the full conversation thread will be copied
68/// if previous message id is set with a previous message id, the conversation thread up until that message will be copied
69/// the above case is useful for branching a conversation into a new thread
70#[derive(Clone, PartialEq, ::prost::Message)]
71pub struct CreateConversationRequest {
72    #[prost(string, tag = "1")]
73    pub title: ::prost::alloc::string::String,
74    #[prost(string, tag = "2")]
75    pub workspace_rid: ::prost::alloc::string::String,
76    #[prost(string, optional, tag = "3")]
77    pub old_conversation_rid: ::core::option::Option<::prost::alloc::string::String>,
78    #[prost(string, optional, tag = "4")]
79    pub previous_message_id: ::core::option::Option<::prost::alloc::string::String>,
80}
81/// CreateConversationResponse will return the conversation id for the new conversation
82#[derive(Clone, PartialEq, ::prost::Message)]
83pub struct CreateConversationResponse {
84    #[prost(string, tag = "1")]
85    pub new_conversation_rid: ::prost::alloc::string::String,
86}
87#[derive(Clone, PartialEq, ::prost::Message)]
88pub struct UpdateConversationMetadataRequest {
89    #[prost(string, tag = "1")]
90    pub title: ::prost::alloc::string::String,
91    #[prost(string, tag = "2")]
92    pub conversation_rid: ::prost::alloc::string::String,
93}
94#[derive(Clone, Copy, PartialEq, ::prost::Message)]
95pub struct UpdateConversationMetadataResponse {}
96#[derive(Clone, PartialEq, ::prost::Message)]
97pub struct DeleteConversationRequest {
98    #[prost(string, tag = "1")]
99    pub conversation_rid: ::prost::alloc::string::String,
100}
101#[derive(Clone, Copy, PartialEq, ::prost::Message)]
102pub struct DeleteConversationResponse {}
103/// a GetConversationRequest allows you to retrieve a subset of messages from a conversation thread represented
104/// by provided rid. To start from a particular message - you can also provide a message id.
105#[derive(Clone, PartialEq, ::prost::Message)]
106pub struct GetConversationRequest {
107    #[prost(string, tag = "1")]
108    pub conversation_rid: ::prost::alloc::string::String,
109    #[prost(string, optional, tag = "2")]
110    pub page_start_message_id: ::core::option::Option<::prost::alloc::string::String>,
111    #[prost(int32, optional, tag = "3")]
112    pub max_message_count: ::core::option::Option<i32>,
113}
114/// Model message with id allows you to identify the message ID of a given message
115#[derive(Clone, PartialEq, ::prost::Message)]
116pub struct ModelMessageWithId {
117    #[prost(string, tag = "3")]
118    pub message_id: ::prost::alloc::string::String,
119    /// WB agent user messages can have snapshot rids associated with them
120    #[prost(string, optional, tag = "4")]
121    pub snapshot_rid: ::core::option::Option<::prost::alloc::string::String>,
122    #[prost(oneof = "model_message_with_id::Content", tags = "1, 2")]
123    pub content: ::core::option::Option<model_message_with_id::Content>,
124}
125/// Nested message and enum types in `ModelMessageWithId`.
126pub mod model_message_with_id {
127    #[derive(Clone, PartialEq, ::prost::Oneof)]
128    pub enum Content {
129        #[prost(message, tag = "1")]
130        Message(super::ModelMessage),
131        #[prost(message, tag = "2")]
132        ToolAction(super::ToolAction),
133    }
134}
135#[derive(Clone, PartialEq, ::prost::Message)]
136pub struct GetConversationResponse {
137    #[prost(message, repeated, tag = "1")]
138    pub ordered_messages: ::prost::alloc::vec::Vec<ModelMessageWithId>,
139    #[prost(message, optional, tag = "2")]
140    pub conversation_metadata: ::core::option::Option<ConversationMetadata>,
141}
142/// Will generate all conversation threads that this user has in this workspace
143#[derive(Clone, PartialEq, ::prost::Message)]
144pub struct ListConversationsRequest {
145    #[prost(string, tag = "1")]
146    pub workspace_rid: ::prost::alloc::string::String,
147}
148#[derive(Clone, PartialEq, ::prost::Message)]
149pub struct ConversationMetadata {
150    #[prost(string, tag = "1")]
151    pub conversation_rid: ::prost::alloc::string::String,
152    #[prost(string, tag = "2")]
153    pub title: ::prost::alloc::string::String,
154    #[prost(message, optional, tag = "3")]
155    pub created_at: ::core::option::Option<
156        super::super::super::google::protobuf::Timestamp,
157    >,
158    #[prost(message, optional, tag = "4")]
159    pub last_updated_at: ::core::option::Option<
160        super::super::super::google::protobuf::Timestamp,
161    >,
162}
163/// ListConversationsResponse is a list of conversations that can be used in a call to GetConversationRequest
164/// to get a full conversation from storage. These are ordered by creation time.
165#[derive(Clone, PartialEq, ::prost::Message)]
166pub struct ListConversationsResponse {
167    #[prost(message, repeated, tag = "1")]
168    pub conversations: ::prost::alloc::vec::Vec<ConversationMetadata>,
169}
170#[derive(Clone, Copy, PartialEq, ::prost::Message)]
171pub struct TimeRange {
172    #[prost(message, optional, tag = "1")]
173    pub range_start: ::core::option::Option<Timestamp>,
174    #[prost(message, optional, tag = "2")]
175    pub range_end: ::core::option::Option<Timestamp>,
176}
177#[derive(Clone, Copy, PartialEq, ::prost::Message)]
178pub struct Timestamp {
179    #[prost(int32, tag = "1")]
180    pub seconds: i32,
181    #[prost(int32, tag = "2")]
182    pub nanoseconds: i32,
183}
184/// ModelMessage is a discriminated union of system, user, assistant, and tool messages.
185/// Each message type has its own structure and content.
186#[derive(Clone, PartialEq, ::prost::Message)]
187pub struct ModelMessage {
188    #[prost(oneof = "model_message::Kind", tags = "1, 2")]
189    pub kind: ::core::option::Option<model_message::Kind>,
190}
191/// Nested message and enum types in `ModelMessage`.
192pub mod model_message {
193    #[derive(Clone, PartialEq, ::prost::Oneof)]
194    pub enum Kind {
195        #[prost(message, tag = "1")]
196        User(super::UserModelMessage),
197        #[prost(message, tag = "2")]
198        Assistant(super::AssistantModelMessage),
199    }
200}
201/// A user message containing text
202#[derive(Clone, PartialEq, ::prost::Message)]
203pub struct UserModelMessage {
204    #[prost(message, repeated, tag = "1")]
205    pub text: ::prost::alloc::vec::Vec<UserContentPart>,
206}
207/// An assistant message containing text
208#[derive(Clone, PartialEq, ::prost::Message)]
209pub struct AssistantModelMessage {
210    #[prost(message, repeated, tag = "1")]
211    pub content_parts: ::prost::alloc::vec::Vec<AssistantContentPart>,
212}
213#[derive(Clone, PartialEq, ::prost::Message)]
214pub struct UserContentPart {
215    #[prost(oneof = "user_content_part::Part", tags = "1")]
216    pub part: ::core::option::Option<user_content_part::Part>,
217}
218/// Nested message and enum types in `UserContentPart`.
219pub mod user_content_part {
220    #[derive(Clone, PartialEq, ::prost::Oneof)]
221    pub enum Part {
222        #[prost(message, tag = "1")]
223        Text(super::TextPart),
224    }
225}
226/// Content part for assistant messages: can be text, reasoning, or mutation.
227#[derive(Clone, PartialEq, ::prost::Message)]
228pub struct AssistantContentPart {
229    #[prost(oneof = "assistant_content_part::Part", tags = "1, 2")]
230    pub part: ::core::option::Option<assistant_content_part::Part>,
231}
232/// Nested message and enum types in `AssistantContentPart`.
233pub mod assistant_content_part {
234    #[derive(Clone, PartialEq, ::prost::Oneof)]
235    pub enum Part {
236        #[prost(message, tag = "1")]
237        Text(super::TextPart),
238        #[prost(message, tag = "2")]
239        Reasoning(super::ReasoningPart),
240    }
241}
242/// Text part for user or assistant messages.
243#[derive(Clone, PartialEq, ::prost::Message)]
244pub struct TextPart {
245    #[prost(string, tag = "1")]
246    pub text: ::prost::alloc::string::String,
247}
248/// User-supplied image part.
249#[derive(Clone, PartialEq, ::prost::Message)]
250pub struct ImagePart {
251    /// The base64-encoded image data
252    #[prost(bytes = "vec", tag = "1")]
253    pub data: ::prost::alloc::vec::Vec<u8>,
254    /// The media type of the image (e.g. "image/png", "image/jpeg")
255    #[prost(string, optional, tag = "2")]
256    pub media_type: ::core::option::Option<::prost::alloc::string::String>,
257    /// Optional: the filename of the image
258    #[prost(string, optional, tag = "3")]
259    pub filename: ::core::option::Option<::prost::alloc::string::String>,
260}
261/// Reasoning part for assistant messages.
262#[derive(Clone, PartialEq, ::prost::Message)]
263pub struct ReasoningPart {
264    #[prost(string, tag = "1")]
265    pub reasoning: ::prost::alloc::string::String,
266}
267/// StreamChatResponse is a discriminated union response to a StreamChatRequest
268#[derive(Clone, PartialEq, ::prost::Message)]
269pub struct StreamChatResponse {
270    #[prost(
271        oneof = "stream_chat_response::Response",
272        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10"
273    )]
274    pub response: ::core::option::Option<stream_chat_response::Response>,
275}
276/// Nested message and enum types in `StreamChatResponse`.
277pub mod stream_chat_response {
278    #[derive(Clone, PartialEq, ::prost::Oneof)]
279    pub enum Response {
280        #[prost(message, tag = "1")]
281        Finish(super::Finish),
282        #[prost(message, tag = "2")]
283        Error(super::Error),
284        #[prost(message, tag = "3")]
285        TextStart(super::TextStart),
286        #[prost(message, tag = "4")]
287        TextDelta(super::TextDelta),
288        #[prost(message, tag = "5")]
289        TextEnd(super::TextEnd),
290        #[prost(message, tag = "6")]
291        ReasoningStart(super::ReasoningStart),
292        #[prost(message, tag = "7")]
293        ReasoningDelta(super::ReasoningDelta),
294        #[prost(message, tag = "8")]
295        ReasoningEnd(super::ReasoningEnd),
296        /// this will be deprecated in favor of MCP-based mutations
297        #[prost(message, tag = "9")]
298        WorkbookMutation(super::WorkbookMutation),
299        #[prost(message, tag = "10")]
300        ToolAction(super::ToolAction),
301    }
302}
303/// Indicates the end of a chat session
304#[derive(Clone, PartialEq, ::prost::Message)]
305pub struct Finish {
306    /// The message ids in order of all generated messages for this agent run
307    /// These ids can be used to branch a message from that specific message
308    #[prost(string, repeated, tag = "1")]
309    pub ordered_message_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
310    /// In the case that this is the first agent run in a conversation thread, we also
311    /// return the new conversation title generated
312    #[prost(string, optional, tag = "2")]
313    pub new_title: ::core::option::Option<::prost::alloc::string::String>,
314}
315/// An error that occurred during the chat session
316#[derive(Clone, PartialEq, ::prost::Message)]
317pub struct Error {
318    #[prost(string, tag = "1")]
319    pub message: ::prost::alloc::string::String,
320}
321/// Indicates the start of a text message from the agent
322#[derive(Clone, PartialEq, ::prost::Message)]
323pub struct TextStart {
324    /// uniquely identifies the text message (e.g. uuid) so that the client can
325    /// merge parallel message streams (if it happens).
326    #[prost(string, tag = "1")]
327    pub id: ::prost::alloc::string::String,
328}
329/// A delta (continuation) of a text message from the agent
330#[derive(Clone, PartialEq, ::prost::Message)]
331pub struct TextDelta {
332    #[prost(string, tag = "1")]
333    pub id: ::prost::alloc::string::String,
334    /// The next chunk of text
335    #[prost(string, tag = "2")]
336    pub delta: ::prost::alloc::string::String,
337}
338/// Indicates the end of a text message from the agent
339#[derive(Clone, PartialEq, ::prost::Message)]
340pub struct TextEnd {
341    #[prost(string, tag = "1")]
342    pub id: ::prost::alloc::string::String,
343}
344/// Indicates the start of a reasoning message from the agent
345#[derive(Clone, PartialEq, ::prost::Message)]
346pub struct ReasoningStart {
347    #[prost(string, tag = "1")]
348    pub id: ::prost::alloc::string::String,
349}
350/// A delta (continuation) of a reasoning message from the agent
351#[derive(Clone, PartialEq, ::prost::Message)]
352pub struct ReasoningDelta {
353    #[prost(string, tag = "1")]
354    pub id: ::prost::alloc::string::String,
355    /// The next chunk of reasoning
356    #[prost(string, tag = "2")]
357    pub delta: ::prost::alloc::string::String,
358}
359/// Indicates the end of a reasoning message from the agent
360#[derive(Clone, PartialEq, ::prost::Message)]
361pub struct ReasoningEnd {
362    #[prost(string, tag = "1")]
363    pub id: ::prost::alloc::string::String,
364}
365/// Add a new tab to the workbook
366#[derive(Clone, PartialEq, ::prost::Message)]
367pub struct AddTabMutation {
368    /// if tab_name is not provided, we'll name it "New Tab"
369    #[prost(string, optional, tag = "1")]
370    pub tab_name: ::core::option::Option<::prost::alloc::string::String>,
371}
372/// this is the "result" of the mutation
373#[derive(Clone, PartialEq, ::prost::Message)]
374pub struct AddOrUpdatePanelMutation {
375    /// JSON-serialized representation of IVizDefinition
376    #[prost(string, tag = "1")]
377    pub panel_as_json: ::prost::alloc::string::String,
378    #[prost(string, tag = "2")]
379    pub panel_id: ::prost::alloc::string::String,
380    #[prost(int32, tag = "3")]
381    pub tab_index: i32,
382}
383#[derive(Clone, PartialEq, ::prost::Message)]
384pub struct RemovePanelsMutation {
385    #[prost(string, repeated, tag = "1")]
386    pub panel_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
387}
388/// AddOrReplaceVariableMutation is a mutation to add or replace a variable in the workbook
389#[derive(Clone, PartialEq, ::prost::Message)]
390pub struct AddOrReplaceVariableMutation {
391    /// scout_compute_api_ComputeSpecWithContext (this needs to be resolved)
392    /// be careful: this uses the scout_compute_api version of ComputeSpecWithContext, which stores the spec as "seriesNode"
393    /// and is NOT the same as ComputeSpecWithContext that is stored in INotebook.
394    #[prost(string, tag = "1")]
395    pub compute_spec_as_json: ::prost::alloc::string::String,
396    /// if variable_name is not provided, we'll assume it's a new variable and auto-generate a unique name
397    #[prost(string, optional, tag = "2")]
398    pub variable_name: ::core::option::Option<::prost::alloc::string::String>,
399    #[prost(string, optional, tag = "3")]
400    pub display_name: ::core::option::Option<::prost::alloc::string::String>,
401}
402/// DeleteVariablesMutation is a mutation to delete variables from the workbook
403#[derive(Clone, PartialEq, ::prost::Message)]
404pub struct DeleteVariablesMutation {
405    #[prost(string, repeated, tag = "1")]
406    pub variable_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
407}
408/// WorkbookMutation is a mutation to the workbook
409#[derive(Clone, PartialEq, ::prost::Message)]
410pub struct WorkbookMutation {
411    #[prost(string, tag = "1")]
412    pub id: ::prost::alloc::string::String,
413    #[prost(oneof = "workbook_mutation::Mutation", tags = "2, 3, 4, 5, 6")]
414    pub mutation: ::core::option::Option<workbook_mutation::Mutation>,
415}
416/// Nested message and enum types in `WorkbookMutation`.
417pub mod workbook_mutation {
418    #[derive(Clone, PartialEq, ::prost::Oneof)]
419    pub enum Mutation {
420        #[prost(message, tag = "2")]
421        AddTab(super::AddTabMutation),
422        #[prost(message, tag = "3")]
423        AddOrUpdatePanel(super::AddOrUpdatePanelMutation),
424        #[prost(message, tag = "4")]
425        RemovePanels(super::RemovePanelsMutation),
426        #[prost(message, tag = "5")]
427        AddOrReplaceVariable(super::AddOrReplaceVariableMutation),
428        #[prost(message, tag = "6")]
429        DeleteVariables(super::DeleteVariablesMutation),
430    }
431}
432/// this is a concise description of a tool call that the agent is making internally
433/// without revealing too much detail about the tool call, it informs the user what the agent is doing
434/// at a high level. the format is: `{tool_action_verb} {tool_target}` for example:
435/// "Search channels for My Datasource"
436#[derive(Clone, PartialEq, ::prost::Message)]
437pub struct ToolAction {
438    #[prost(string, tag = "1")]
439    pub id: ::prost::alloc::string::String,
440    /// "Thought", "Read", "Find", "Look-up", etc.
441    #[prost(string, tag = "2")]
442    pub tool_action_verb: ::prost::alloc::string::String,
443    /// "workbook", "channel", "variable", "panel", etc.
444    #[prost(string, optional, tag = "3")]
445    pub tool_target: ::core::option::Option<::prost::alloc::string::String>,
446}
447/// Generated client implementations.
448pub mod ai_agent_service_client {
449    #![allow(
450        unused_variables,
451        dead_code,
452        missing_docs,
453        clippy::wildcard_imports,
454        clippy::let_unit_value,
455    )]
456    use tonic::codegen::*;
457    use tonic::codegen::http::Uri;
458    /// AIAgentService provides AI-powered assistance for general operations
459    #[derive(Debug, Clone)]
460    pub struct AiAgentServiceClient<T> {
461        inner: tonic::client::Grpc<T>,
462    }
463    impl AiAgentServiceClient<tonic::transport::Channel> {
464        /// Attempt to create a new client by connecting to a given endpoint.
465        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
466        where
467            D: TryInto<tonic::transport::Endpoint>,
468            D::Error: Into<StdError>,
469        {
470            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
471            Ok(Self::new(conn))
472        }
473    }
474    impl<T> AiAgentServiceClient<T>
475    where
476        T: tonic::client::GrpcService<tonic::body::Body>,
477        T::Error: Into<StdError>,
478        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
479        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
480    {
481        pub fn new(inner: T) -> Self {
482            let inner = tonic::client::Grpc::new(inner);
483            Self { inner }
484        }
485        pub fn with_origin(inner: T, origin: Uri) -> Self {
486            let inner = tonic::client::Grpc::with_origin(inner, origin);
487            Self { inner }
488        }
489        pub fn with_interceptor<F>(
490            inner: T,
491            interceptor: F,
492        ) -> AiAgentServiceClient<InterceptedService<T, F>>
493        where
494            F: tonic::service::Interceptor,
495            T::ResponseBody: Default,
496            T: tonic::codegen::Service<
497                http::Request<tonic::body::Body>,
498                Response = http::Response<
499                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
500                >,
501            >,
502            <T as tonic::codegen::Service<
503                http::Request<tonic::body::Body>,
504            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
505        {
506            AiAgentServiceClient::new(InterceptedService::new(inner, interceptor))
507        }
508        /// Compress requests with the given encoding.
509        ///
510        /// This requires the server to support it otherwise it might respond with an
511        /// error.
512        #[must_use]
513        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
514            self.inner = self.inner.send_compressed(encoding);
515            self
516        }
517        /// Enable decompressing responses.
518        #[must_use]
519        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
520            self.inner = self.inner.accept_compressed(encoding);
521            self
522        }
523        /// Limits the maximum size of a decoded message.
524        ///
525        /// Default: `4MB`
526        #[must_use]
527        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
528            self.inner = self.inner.max_decoding_message_size(limit);
529            self
530        }
531        /// Limits the maximum size of an encoded message.
532        ///
533        /// Default: `usize::MAX`
534        #[must_use]
535        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
536            self.inner = self.inner.max_encoding_message_size(limit);
537            self
538        }
539        /// StreamChat handles bidirectional streaming chat for AI agent
540        pub async fn stream_chat(
541            &mut self,
542            request: impl tonic::IntoRequest<super::StreamChatRequest>,
543        ) -> std::result::Result<
544            tonic::Response<tonic::codec::Streaming<super::StreamChatResponse>>,
545            tonic::Status,
546        > {
547            self.inner
548                .ready()
549                .await
550                .map_err(|e| {
551                    tonic::Status::unknown(
552                        format!("Service was not ready: {}", e.into()),
553                    )
554                })?;
555            let codec = tonic::codec::ProstCodec::default();
556            let path = http::uri::PathAndQuery::from_static(
557                "/nominal.ai.v1.AIAgentService/StreamChat",
558            );
559            let mut req = request.into_request();
560            req.extensions_mut()
561                .insert(GrpcMethod::new("nominal.ai.v1.AIAgentService", "StreamChat"));
562            self.inner.server_streaming(req, path, codec).await
563        }
564        /// GetConversation handles getting a complete conversation list, with an optional limit on number of messages returned
565        pub async fn get_conversation(
566            &mut self,
567            request: impl tonic::IntoRequest<super::GetConversationRequest>,
568        ) -> std::result::Result<
569            tonic::Response<super::GetConversationResponse>,
570            tonic::Status,
571        > {
572            self.inner
573                .ready()
574                .await
575                .map_err(|e| {
576                    tonic::Status::unknown(
577                        format!("Service was not ready: {}", e.into()),
578                    )
579                })?;
580            let codec = tonic::codec::ProstCodec::default();
581            let path = http::uri::PathAndQuery::from_static(
582                "/nominal.ai.v1.AIAgentService/GetConversation",
583            );
584            let mut req = request.into_request();
585            req.extensions_mut()
586                .insert(
587                    GrpcMethod::new("nominal.ai.v1.AIAgentService", "GetConversation"),
588                );
589            self.inner.unary(req, path, codec).await
590        }
591        /// ListConversations handles getting the list of conversation ids ordered by most recently updated
592        pub async fn list_conversations(
593            &mut self,
594            request: impl tonic::IntoRequest<super::ListConversationsRequest>,
595        ) -> std::result::Result<
596            tonic::Response<super::ListConversationsResponse>,
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.AIAgentService/ListConversations",
610            );
611            let mut req = request.into_request();
612            req.extensions_mut()
613                .insert(
614                    GrpcMethod::new("nominal.ai.v1.AIAgentService", "ListConversations"),
615                );
616            self.inner.unary(req, path, codec).await
617        }
618        /// CreateConversation handles creating a conversation and assigning it a conversation rid
619        pub async fn create_conversation(
620            &mut self,
621            request: impl tonic::IntoRequest<super::CreateConversationRequest>,
622        ) -> std::result::Result<
623            tonic::Response<super::CreateConversationResponse>,
624            tonic::Status,
625        > {
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.AIAgentService/CreateConversation",
637            );
638            let mut req = request.into_request();
639            req.extensions_mut()
640                .insert(
641                    GrpcMethod::new("nominal.ai.v1.AIAgentService", "CreateConversation"),
642                );
643            self.inner.unary(req, path, codec).await
644        }
645        /// UpdateConversationMetadata handles updating any metadata associated with a conversation
646        pub async fn update_conversation_metadata(
647            &mut self,
648            request: impl tonic::IntoRequest<super::UpdateConversationMetadataRequest>,
649        ) -> std::result::Result<
650            tonic::Response<super::UpdateConversationMetadataResponse>,
651            tonic::Status,
652        > {
653            self.inner
654                .ready()
655                .await
656                .map_err(|e| {
657                    tonic::Status::unknown(
658                        format!("Service was not ready: {}", e.into()),
659                    )
660                })?;
661            let codec = tonic::codec::ProstCodec::default();
662            let path = http::uri::PathAndQuery::from_static(
663                "/nominal.ai.v1.AIAgentService/UpdateConversationMetadata",
664            );
665            let mut req = request.into_request();
666            req.extensions_mut()
667                .insert(
668                    GrpcMethod::new(
669                        "nominal.ai.v1.AIAgentService",
670                        "UpdateConversationMetadata",
671                    ),
672                );
673            self.inner.unary(req, path, codec).await
674        }
675        /// DeleteConversation handles deleting a specific conversation by conversation rid
676        pub async fn delete_conversation(
677            &mut self,
678            request: impl tonic::IntoRequest<super::DeleteConversationRequest>,
679        ) -> std::result::Result<
680            tonic::Response<super::DeleteConversationResponse>,
681            tonic::Status,
682        > {
683            self.inner
684                .ready()
685                .await
686                .map_err(|e| {
687                    tonic::Status::unknown(
688                        format!("Service was not ready: {}", e.into()),
689                    )
690                })?;
691            let codec = tonic::codec::ProstCodec::default();
692            let path = http::uri::PathAndQuery::from_static(
693                "/nominal.ai.v1.AIAgentService/DeleteConversation",
694            );
695            let mut req = request.into_request();
696            req.extensions_mut()
697                .insert(
698                    GrpcMethod::new("nominal.ai.v1.AIAgentService", "DeleteConversation"),
699                );
700            self.inner.unary(req, path, codec).await
701        }
702        /// GetSnapshotRidByUserMessageId handles resolving the snapshot rid of the workbook at the time the message is sent
703        pub async fn get_snapshot_rid_by_user_message_id(
704            &mut self,
705            request: impl tonic::IntoRequest<super::GetSnapshotRidByUserMessageIdRequest>,
706        ) -> std::result::Result<
707            tonic::Response<super::GetSnapshotRidByUserMessageIdResponse>,
708            tonic::Status,
709        > {
710            self.inner
711                .ready()
712                .await
713                .map_err(|e| {
714                    tonic::Status::unknown(
715                        format!("Service was not ready: {}", e.into()),
716                    )
717                })?;
718            let codec = tonic::codec::ProstCodec::default();
719            let path = http::uri::PathAndQuery::from_static(
720                "/nominal.ai.v1.AIAgentService/GetSnapshotRidByUserMessageId",
721            );
722            let mut req = request.into_request();
723            req.extensions_mut()
724                .insert(
725                    GrpcMethod::new(
726                        "nominal.ai.v1.AIAgentService",
727                        "GetSnapshotRidByUserMessageId",
728                    ),
729                );
730            self.inner.unary(req, path, codec).await
731        }
732    }
733}
734#[derive(Clone, Copy, PartialEq, ::prost::Message)]
735pub struct GetProviderStatusRequest {}
736#[derive(Clone, Copy, PartialEq, ::prost::Message)]
737pub struct GetProviderStatusResponse {
738    /// Timestamp when the last status was determined
739    #[prost(message, optional, tag = "1")]
740    pub timestamp: ::core::option::Option<
741        super::super::super::google::protobuf::Timestamp,
742    >,
743    /// Status of the most recent health check probe
744    #[prost(message, optional, tag = "2")]
745    pub last_status: ::core::option::Option<ProviderStatus>,
746    /// Aggregated status over the last 30 minutes (DEGRADED if any check failed or exceeded thresholds)
747    /// Deprecated: Use aggregated_status instead. This field is kept for backward compatibility.
748    #[deprecated]
749    #[prost(message, optional, tag = "3")]
750    pub aggregated_status_over_last_30m: ::core::option::Option<ProviderStatus>,
751    /// Aggregated status over the last iterations, configurable in the BE (DEGRADED if any check failed or exceeded thresholds)
752    #[prost(message, optional, tag = "4")]
753    pub aggregated_status: ::core::option::Option<ProviderStatus>,
754}
755#[derive(Clone, Copy, PartialEq, ::prost::Message)]
756pub struct ProviderStatus {
757    #[prost(oneof = "provider_status::Status", tags = "1, 2")]
758    pub status: ::core::option::Option<provider_status::Status>,
759}
760/// Nested message and enum types in `ProviderStatus`.
761pub mod provider_status {
762    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
763    pub enum Status {
764        #[prost(message, tag = "1")]
765        Healthy(super::Healthy),
766        #[prost(message, tag = "2")]
767        Degraded(super::Degraded),
768    }
769}
770#[derive(Clone, Copy, PartialEq, ::prost::Message)]
771pub struct Healthy {}
772#[derive(Clone, Copy, PartialEq, ::prost::Message)]
773pub struct Degraded {
774    #[prost(enumeration = "DegradationReason", tag = "1")]
775    pub reason: i32,
776}
777#[derive(Clone, Copy, PartialEq, ::prost::Message)]
778pub struct ProviderMetrics {
779    #[prost(int32, tag = "1")]
780    pub time_to_first_token_ms: i32,
781    #[prost(int32, tag = "2")]
782    pub total_time_ms: i32,
783}
784#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
785#[repr(i32)]
786pub enum DegradationReason {
787    Unspecified = 0,
788    HighLatency = 1,
789    Failures = 2,
790    HighLatencyAndFailures = 3,
791}
792impl DegradationReason {
793    /// String value of the enum field names used in the ProtoBuf definition.
794    ///
795    /// The values are not transformed in any way and thus are considered stable
796    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
797    pub fn as_str_name(&self) -> &'static str {
798        match self {
799            Self::Unspecified => "DEGRADATION_REASON_UNSPECIFIED",
800            Self::HighLatency => "DEGRADATION_REASON_HIGH_LATENCY",
801            Self::Failures => "DEGRADATION_REASON_FAILURES",
802            Self::HighLatencyAndFailures => {
803                "DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES"
804            }
805        }
806    }
807    /// Creates an enum from field names used in the ProtoBuf definition.
808    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
809        match value {
810            "DEGRADATION_REASON_UNSPECIFIED" => Some(Self::Unspecified),
811            "DEGRADATION_REASON_HIGH_LATENCY" => Some(Self::HighLatency),
812            "DEGRADATION_REASON_FAILURES" => Some(Self::Failures),
813            "DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES" => {
814                Some(Self::HighLatencyAndFailures)
815            }
816            _ => None,
817        }
818    }
819}
820/// Generated client implementations.
821pub mod model_provider_health_service_client {
822    #![allow(
823        unused_variables,
824        dead_code,
825        missing_docs,
826        clippy::wildcard_imports,
827        clippy::let_unit_value,
828    )]
829    use tonic::codegen::*;
830    use tonic::codegen::http::Uri;
831    /// ModelProviderHealthService monitors the health and performance of the backing LLM model provider.
832    /// It runs lightweight health checks every 5 minutes to measure provider responsiveness and reliability,
833    /// independent of the complexity of user prompts.
834    #[derive(Debug, Clone)]
835    pub struct ModelProviderHealthServiceClient<T> {
836        inner: tonic::client::Grpc<T>,
837    }
838    impl ModelProviderHealthServiceClient<tonic::transport::Channel> {
839        /// Attempt to create a new client by connecting to a given endpoint.
840        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
841        where
842            D: TryInto<tonic::transport::Endpoint>,
843            D::Error: Into<StdError>,
844        {
845            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
846            Ok(Self::new(conn))
847        }
848    }
849    impl<T> ModelProviderHealthServiceClient<T>
850    where
851        T: tonic::client::GrpcService<tonic::body::Body>,
852        T::Error: Into<StdError>,
853        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
854        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
855    {
856        pub fn new(inner: T) -> Self {
857            let inner = tonic::client::Grpc::new(inner);
858            Self { inner }
859        }
860        pub fn with_origin(inner: T, origin: Uri) -> Self {
861            let inner = tonic::client::Grpc::with_origin(inner, origin);
862            Self { inner }
863        }
864        pub fn with_interceptor<F>(
865            inner: T,
866            interceptor: F,
867        ) -> ModelProviderHealthServiceClient<InterceptedService<T, F>>
868        where
869            F: tonic::service::Interceptor,
870            T::ResponseBody: Default,
871            T: tonic::codegen::Service<
872                http::Request<tonic::body::Body>,
873                Response = http::Response<
874                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
875                >,
876            >,
877            <T as tonic::codegen::Service<
878                http::Request<tonic::body::Body>,
879            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
880        {
881            ModelProviderHealthServiceClient::new(
882                InterceptedService::new(inner, interceptor),
883            )
884        }
885        /// Compress requests with the given encoding.
886        ///
887        /// This requires the server to support it otherwise it might respond with an
888        /// error.
889        #[must_use]
890        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
891            self.inner = self.inner.send_compressed(encoding);
892            self
893        }
894        /// Enable decompressing responses.
895        #[must_use]
896        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
897            self.inner = self.inner.accept_compressed(encoding);
898            self
899        }
900        /// Limits the maximum size of a decoded message.
901        ///
902        /// Default: `4MB`
903        #[must_use]
904        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
905            self.inner = self.inner.max_decoding_message_size(limit);
906            self
907        }
908        /// Limits the maximum size of an encoded message.
909        ///
910        /// Default: `usize::MAX`
911        #[must_use]
912        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
913            self.inner = self.inner.max_encoding_message_size(limit);
914            self
915        }
916        /// GetProviderStatus returns the current health status of the model provider based on recent health checks.
917        /// The status is HEALTHY if all checks in the last 30 minutes passed latency thresholds,
918        /// or DEGRADED if any checks exceeded latency thresholds or failed entirely.
919        pub async fn get_provider_status(
920            &mut self,
921            request: impl tonic::IntoRequest<super::GetProviderStatusRequest>,
922        ) -> std::result::Result<
923            tonic::Response<super::GetProviderStatusResponse>,
924            tonic::Status,
925        > {
926            self.inner
927                .ready()
928                .await
929                .map_err(|e| {
930                    tonic::Status::unknown(
931                        format!("Service was not ready: {}", e.into()),
932                    )
933                })?;
934            let codec = tonic::codec::ProstCodec::default();
935            let path = http::uri::PathAndQuery::from_static(
936                "/nominal.ai.v1.ModelProviderHealthService/GetProviderStatus",
937            );
938            let mut req = request.into_request();
939            req.extensions_mut()
940                .insert(
941                    GrpcMethod::new(
942                        "nominal.ai.v1.ModelProviderHealthService",
943                        "GetProviderStatus",
944                    ),
945                );
946            self.inner.unary(req, path, codec).await
947        }
948    }
949}
950/// CreateOrUpdateKnowledgeBaseRequest is a request to create a knowledge from an attachment in the attachment's
951/// workspace. Subsequent calls for the same attachment will overwrite the existing knowledge base.
952#[derive(Clone, PartialEq, ::prost::Message)]
953pub struct CreateOrUpdateKnowledgeBaseRequest {
954    #[prost(string, tag = "1")]
955    pub attachment_rid: ::prost::alloc::string::String,
956    /// summary of the knowledge base, will be used by the LLM to decide when to use it
957    #[prost(string, tag = "2")]
958    pub summary_description: ::prost::alloc::string::String,
959    #[prost(enumeration = "KnowledgeBaseType", optional, tag = "3")]
960    pub r#type: ::core::option::Option<i32>,
961}
962/// CreateOrUpdateKnowledgeBaseResponse is the response to creating/updating a knowledge base
963#[derive(Clone, PartialEq, ::prost::Message)]
964pub struct CreateOrUpdateKnowledgeBaseResponse {
965    #[prost(string, tag = "1")]
966    pub knowledge_base_rid: ::prost::alloc::string::String,
967}
968/// KnowledgeBase represents a knowledge base entry
969#[derive(Clone, PartialEq, ::prost::Message)]
970pub struct KnowledgeBase {
971    #[prost(string, tag = "1")]
972    pub knowledge_base_rid: ::prost::alloc::string::String,
973    #[prost(string, tag = "2")]
974    pub attachment_rid: ::prost::alloc::string::String,
975    #[prost(string, tag = "3")]
976    pub workspace_rid: ::prost::alloc::string::String,
977    #[prost(string, tag = "4")]
978    pub summary_description: ::prost::alloc::string::String,
979    #[prost(enumeration = "KnowledgeBaseType", tag = "5")]
980    pub r#type: i32,
981    #[prost(int32, tag = "6")]
982    pub version: i32,
983}
984#[derive(Clone, PartialEq, ::prost::Message)]
985pub struct ListRequest {
986    #[prost(string, tag = "1")]
987    pub workspace_rid: ::prost::alloc::string::String,
988}
989#[derive(Clone, PartialEq, ::prost::Message)]
990pub struct ListResponse {
991    #[prost(message, repeated, tag = "1")]
992    pub knowledge_bases: ::prost::alloc::vec::Vec<KnowledgeBase>,
993}
994#[derive(Clone, PartialEq, ::prost::Message)]
995pub struct DeleteRequest {
996    #[prost(string, tag = "1")]
997    pub knowledge_base_rid: ::prost::alloc::string::String,
998}
999#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1000pub struct DeleteResponse {
1001    #[prost(bool, tag = "1")]
1002    pub success: bool,
1003}
1004#[derive(Clone, PartialEq, ::prost::Message)]
1005pub struct GetBatchRequest {
1006    #[prost(string, repeated, tag = "1")]
1007    pub knowledge_base_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1008}
1009#[derive(Clone, PartialEq, ::prost::Message)]
1010pub struct GetBatchResponse {
1011    #[prost(message, repeated, tag = "1")]
1012    pub knowledge_bases: ::prost::alloc::vec::Vec<KnowledgeBase>,
1013}
1014/// generate summary description is intentionally going to return the generated description to the frontend
1015/// rather than storing it in the knowledge base directly because the description needs to be accepted by the user
1016#[derive(Clone, PartialEq, ::prost::Message)]
1017pub struct GenerateSummaryDescriptionRequest {
1018    #[prost(string, tag = "1")]
1019    pub attachment_rid: ::prost::alloc::string::String,
1020}
1021#[derive(Clone, PartialEq, ::prost::Message)]
1022pub struct GenerateSummaryDescriptionResponse {
1023    #[prost(string, tag = "1")]
1024    pub summary_description: ::prost::alloc::string::String,
1025}
1026/// KnowledgeBaseType defines the types of knowledge base
1027#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1028#[repr(i32)]
1029pub enum KnowledgeBaseType {
1030    /// defaults to PROMPT
1031    Unspecified = 0,
1032    /// knowledge base gets added directly to prompt (needs to be small enough!)
1033    Prompt = 1,
1034    /// knowledge base gets used via vector search on embeddings
1035    Embedding = 2,
1036}
1037impl KnowledgeBaseType {
1038    /// String value of the enum field names used in the ProtoBuf definition.
1039    ///
1040    /// The values are not transformed in any way and thus are considered stable
1041    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1042    pub fn as_str_name(&self) -> &'static str {
1043        match self {
1044            Self::Unspecified => "KNOWLEDGE_BASE_TYPE_UNSPECIFIED",
1045            Self::Prompt => "KNOWLEDGE_BASE_TYPE_PROMPT",
1046            Self::Embedding => "KNOWLEDGE_BASE_TYPE_EMBEDDING",
1047        }
1048    }
1049    /// Creates an enum from field names used in the ProtoBuf definition.
1050    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1051        match value {
1052            "KNOWLEDGE_BASE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
1053            "KNOWLEDGE_BASE_TYPE_PROMPT" => Some(Self::Prompt),
1054            "KNOWLEDGE_BASE_TYPE_EMBEDDING" => Some(Self::Embedding),
1055            _ => None,
1056        }
1057    }
1058}
1059/// Generated client implementations.
1060pub mod knowledge_base_service_client {
1061    #![allow(
1062        unused_variables,
1063        dead_code,
1064        missing_docs,
1065        clippy::wildcard_imports,
1066        clippy::let_unit_value,
1067    )]
1068    use tonic::codegen::*;
1069    use tonic::codegen::http::Uri;
1070    /// KnowledgeBaseService provides AI-powered knowledge base management
1071    #[derive(Debug, Clone)]
1072    pub struct KnowledgeBaseServiceClient<T> {
1073        inner: tonic::client::Grpc<T>,
1074    }
1075    impl KnowledgeBaseServiceClient<tonic::transport::Channel> {
1076        /// Attempt to create a new client by connecting to a given endpoint.
1077        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1078        where
1079            D: TryInto<tonic::transport::Endpoint>,
1080            D::Error: Into<StdError>,
1081        {
1082            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1083            Ok(Self::new(conn))
1084        }
1085    }
1086    impl<T> KnowledgeBaseServiceClient<T>
1087    where
1088        T: tonic::client::GrpcService<tonic::body::Body>,
1089        T::Error: Into<StdError>,
1090        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1091        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1092    {
1093        pub fn new(inner: T) -> Self {
1094            let inner = tonic::client::Grpc::new(inner);
1095            Self { inner }
1096        }
1097        pub fn with_origin(inner: T, origin: Uri) -> Self {
1098            let inner = tonic::client::Grpc::with_origin(inner, origin);
1099            Self { inner }
1100        }
1101        pub fn with_interceptor<F>(
1102            inner: T,
1103            interceptor: F,
1104        ) -> KnowledgeBaseServiceClient<InterceptedService<T, F>>
1105        where
1106            F: tonic::service::Interceptor,
1107            T::ResponseBody: Default,
1108            T: tonic::codegen::Service<
1109                http::Request<tonic::body::Body>,
1110                Response = http::Response<
1111                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1112                >,
1113            >,
1114            <T as tonic::codegen::Service<
1115                http::Request<tonic::body::Body>,
1116            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1117        {
1118            KnowledgeBaseServiceClient::new(InterceptedService::new(inner, interceptor))
1119        }
1120        /// Compress requests with the given encoding.
1121        ///
1122        /// This requires the server to support it otherwise it might respond with an
1123        /// error.
1124        #[must_use]
1125        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1126            self.inner = self.inner.send_compressed(encoding);
1127            self
1128        }
1129        /// Enable decompressing responses.
1130        #[must_use]
1131        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1132            self.inner = self.inner.accept_compressed(encoding);
1133            self
1134        }
1135        /// Limits the maximum size of a decoded message.
1136        ///
1137        /// Default: `4MB`
1138        #[must_use]
1139        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1140            self.inner = self.inner.max_decoding_message_size(limit);
1141            self
1142        }
1143        /// Limits the maximum size of an encoded message.
1144        ///
1145        /// Default: `usize::MAX`
1146        #[must_use]
1147        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1148            self.inner = self.inner.max_encoding_message_size(limit);
1149            self
1150        }
1151        /// CreateOrUpdateKnowledgeBase creates a knowledge base in the workspace
1152        pub async fn create_or_update_knowledge_base(
1153            &mut self,
1154            request: impl tonic::IntoRequest<super::CreateOrUpdateKnowledgeBaseRequest>,
1155        ) -> std::result::Result<
1156            tonic::Response<super::CreateOrUpdateKnowledgeBaseResponse>,
1157            tonic::Status,
1158        > {
1159            self.inner
1160                .ready()
1161                .await
1162                .map_err(|e| {
1163                    tonic::Status::unknown(
1164                        format!("Service was not ready: {}", e.into()),
1165                    )
1166                })?;
1167            let codec = tonic::codec::ProstCodec::default();
1168            let path = http::uri::PathAndQuery::from_static(
1169                "/nominal.ai.v1.KnowledgeBaseService/CreateOrUpdateKnowledgeBase",
1170            );
1171            let mut req = request.into_request();
1172            req.extensions_mut()
1173                .insert(
1174                    GrpcMethod::new(
1175                        "nominal.ai.v1.KnowledgeBaseService",
1176                        "CreateOrUpdateKnowledgeBase",
1177                    ),
1178                );
1179            self.inner.unary(req, path, codec).await
1180        }
1181        /// List returns all knowledge bases in the specified workspace
1182        pub async fn list(
1183            &mut self,
1184            request: impl tonic::IntoRequest<super::ListRequest>,
1185        ) -> std::result::Result<tonic::Response<super::ListResponse>, tonic::Status> {
1186            self.inner
1187                .ready()
1188                .await
1189                .map_err(|e| {
1190                    tonic::Status::unknown(
1191                        format!("Service was not ready: {}", e.into()),
1192                    )
1193                })?;
1194            let codec = tonic::codec::ProstCodec::default();
1195            let path = http::uri::PathAndQuery::from_static(
1196                "/nominal.ai.v1.KnowledgeBaseService/List",
1197            );
1198            let mut req = request.into_request();
1199            req.extensions_mut()
1200                .insert(GrpcMethod::new("nominal.ai.v1.KnowledgeBaseService", "List"));
1201            self.inner.unary(req, path, codec).await
1202        }
1203        /// Delete removes a knowledge base by its RID
1204        pub async fn delete(
1205            &mut self,
1206            request: impl tonic::IntoRequest<super::DeleteRequest>,
1207        ) -> std::result::Result<tonic::Response<super::DeleteResponse>, tonic::Status> {
1208            self.inner
1209                .ready()
1210                .await
1211                .map_err(|e| {
1212                    tonic::Status::unknown(
1213                        format!("Service was not ready: {}", e.into()),
1214                    )
1215                })?;
1216            let codec = tonic::codec::ProstCodec::default();
1217            let path = http::uri::PathAndQuery::from_static(
1218                "/nominal.ai.v1.KnowledgeBaseService/Delete",
1219            );
1220            let mut req = request.into_request();
1221            req.extensions_mut()
1222                .insert(GrpcMethod::new("nominal.ai.v1.KnowledgeBaseService", "Delete"));
1223            self.inner.unary(req, path, codec).await
1224        }
1225        /// GetBatch retrieves multiple knowledge bases by their RIDs
1226        pub async fn get_batch(
1227            &mut self,
1228            request: impl tonic::IntoRequest<super::GetBatchRequest>,
1229        ) -> std::result::Result<
1230            tonic::Response<super::GetBatchResponse>,
1231            tonic::Status,
1232        > {
1233            self.inner
1234                .ready()
1235                .await
1236                .map_err(|e| {
1237                    tonic::Status::unknown(
1238                        format!("Service was not ready: {}", e.into()),
1239                    )
1240                })?;
1241            let codec = tonic::codec::ProstCodec::default();
1242            let path = http::uri::PathAndQuery::from_static(
1243                "/nominal.ai.v1.KnowledgeBaseService/GetBatch",
1244            );
1245            let mut req = request.into_request();
1246            req.extensions_mut()
1247                .insert(
1248                    GrpcMethod::new("nominal.ai.v1.KnowledgeBaseService", "GetBatch"),
1249                );
1250            self.inner.unary(req, path, codec).await
1251        }
1252        /// GenerateSummaryDescription generates a summary description for an attachment rid
1253        pub async fn generate_summary_description(
1254            &mut self,
1255            request: impl tonic::IntoRequest<super::GenerateSummaryDescriptionRequest>,
1256        ) -> std::result::Result<
1257            tonic::Response<super::GenerateSummaryDescriptionResponse>,
1258            tonic::Status,
1259        > {
1260            self.inner
1261                .ready()
1262                .await
1263                .map_err(|e| {
1264                    tonic::Status::unknown(
1265                        format!("Service was not ready: {}", e.into()),
1266                    )
1267                })?;
1268            let codec = tonic::codec::ProstCodec::default();
1269            let path = http::uri::PathAndQuery::from_static(
1270                "/nominal.ai.v1.KnowledgeBaseService/GenerateSummaryDescription",
1271            );
1272            let mut req = request.into_request();
1273            req.extensions_mut()
1274                .insert(
1275                    GrpcMethod::new(
1276                        "nominal.ai.v1.KnowledgeBaseService",
1277                        "GenerateSummaryDescription",
1278                    ),
1279                );
1280            self.inner.unary(req, path, codec).await
1281        }
1282    }
1283}