#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClassifyErrorRequest {
#[prost(string, tag = "1")]
pub error_message: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClassifyErrorResponse {
#[prost(enumeration = "ErrorClassification", tag = "1")]
pub classification: i32,
#[prost(string, tag = "2")]
pub reason: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ErrorClassification {
Unspecified = 0,
Client = 1,
Server = 2,
}
impl ErrorClassification {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "ERROR_CLASSIFICATION_UNSPECIFIED",
Self::Client => "ERROR_CLASSIFICATION_CLIENT",
Self::Server => "ERROR_CLASSIFICATION_SERVER",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ERROR_CLASSIFICATION_UNSPECIFIED" => Some(Self::Unspecified),
"ERROR_CLASSIFICATION_CLIENT" => Some(Self::Client),
"ERROR_CLASSIFICATION_SERVER" => Some(Self::Server),
_ => None,
}
}
}
pub mod data_ingestion_error_classifier_service_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct DataIngestionErrorClassifierServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl DataIngestionErrorClassifierServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> DataIngestionErrorClassifierServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> DataIngestionErrorClassifierServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
DataIngestionErrorClassifierServiceClient::new(
InterceptedService::new(inner, interceptor),
)
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn classify_error(
&mut self,
request: impl tonic::IntoRequest<super::ClassifyErrorRequest>,
) -> std::result::Result<
tonic::Response<super::ClassifyErrorResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.DataIngestionErrorClassifierService/ClassifyError",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.v1.DataIngestionErrorClassifierService",
"ClassifyError",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetProviderStatusRequest {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GetProviderStatusResponse {
#[prost(message, optional, tag = "1")]
pub timestamp: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "2")]
pub last_status: ::core::option::Option<ProviderStatus>,
#[deprecated]
#[prost(message, optional, tag = "3")]
pub aggregated_status_over_last_30m: ::core::option::Option<ProviderStatus>,
#[prost(message, optional, tag = "4")]
pub aggregated_status: ::core::option::Option<ProviderStatus>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ProviderStatus {
#[prost(oneof = "provider_status::Status", tags = "1, 2")]
pub status: ::core::option::Option<provider_status::Status>,
}
pub mod provider_status {
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Status {
#[prost(message, tag = "1")]
Healthy(super::Healthy),
#[prost(message, tag = "2")]
Degraded(super::Degraded),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Healthy {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Degraded {
#[prost(enumeration = "DegradationReason", tag = "1")]
pub reason: i32,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ProviderMetrics {
#[prost(int32, tag = "1")]
pub time_to_first_token_ms: i32,
#[prost(int32, tag = "2")]
pub total_time_ms: i32,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DegradationReason {
Unspecified = 0,
HighLatency = 1,
Failures = 2,
HighLatencyAndFailures = 3,
}
impl DegradationReason {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "DEGRADATION_REASON_UNSPECIFIED",
Self::HighLatency => "DEGRADATION_REASON_HIGH_LATENCY",
Self::Failures => "DEGRADATION_REASON_FAILURES",
Self::HighLatencyAndFailures => {
"DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES"
}
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DEGRADATION_REASON_UNSPECIFIED" => Some(Self::Unspecified),
"DEGRADATION_REASON_HIGH_LATENCY" => Some(Self::HighLatency),
"DEGRADATION_REASON_FAILURES" => Some(Self::Failures),
"DEGRADATION_REASON_HIGH_LATENCY_AND_FAILURES" => {
Some(Self::HighLatencyAndFailures)
}
_ => None,
}
}
}
pub mod model_provider_health_service_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct ModelProviderHealthServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ModelProviderHealthServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> ModelProviderHealthServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ModelProviderHealthServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
ModelProviderHealthServiceClient::new(
InterceptedService::new(inner, interceptor),
)
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn get_provider_status(
&mut self,
request: impl tonic::IntoRequest<super::GetProviderStatusRequest>,
) -> std::result::Result<
tonic::Response<super::GetProviderStatusResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.ModelProviderHealthService/GetProviderStatus",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.v1.ModelProviderHealthService",
"GetProviderStatus",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateOrUpdateKnowledgeBaseRequest {
#[prost(string, tag = "1")]
pub attachment_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub summary_description: ::prost::alloc::string::String,
#[prost(enumeration = "KnowledgeBaseType", optional, tag = "3")]
pub r#type: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateOrUpdateKnowledgeBaseResponse {
#[prost(string, tag = "1")]
pub knowledge_base_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KnowledgeBase {
#[prost(string, tag = "1")]
pub knowledge_base_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub attachment_rid: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub workspace_rid: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub summary_description: ::prost::alloc::string::String,
#[prost(enumeration = "KnowledgeBaseType", tag = "5")]
pub r#type: i32,
#[prost(int32, tag = "6")]
pub version: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRequest {
#[prost(string, tag = "1")]
pub workspace_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListResponse {
#[prost(message, repeated, tag = "1")]
pub knowledge_bases: ::prost::alloc::vec::Vec<KnowledgeBase>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteRequest {
#[prost(string, tag = "1")]
pub knowledge_base_rid: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteResponse {
#[prost(bool, tag = "1")]
pub success: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBatchRequest {
#[prost(string, repeated, tag = "1")]
pub knowledge_base_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBatchResponse {
#[prost(message, repeated, tag = "1")]
pub knowledge_bases: ::prost::alloc::vec::Vec<KnowledgeBase>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateSummaryDescriptionRequest {
#[prost(string, tag = "1")]
pub attachment_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateSummaryDescriptionResponse {
#[prost(string, tag = "1")]
pub summary_description: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum KnowledgeBaseType {
Unspecified = 0,
Prompt = 1,
Embedding = 2,
}
impl KnowledgeBaseType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "KNOWLEDGE_BASE_TYPE_UNSPECIFIED",
Self::Prompt => "KNOWLEDGE_BASE_TYPE_PROMPT",
Self::Embedding => "KNOWLEDGE_BASE_TYPE_EMBEDDING",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"KNOWLEDGE_BASE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"KNOWLEDGE_BASE_TYPE_PROMPT" => Some(Self::Prompt),
"KNOWLEDGE_BASE_TYPE_EMBEDDING" => Some(Self::Embedding),
_ => None,
}
}
}
pub mod knowledge_base_service_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct KnowledgeBaseServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl KnowledgeBaseServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> KnowledgeBaseServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> KnowledgeBaseServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
KnowledgeBaseServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn create_or_update_knowledge_base(
&mut self,
request: impl tonic::IntoRequest<super::CreateOrUpdateKnowledgeBaseRequest>,
) -> std::result::Result<
tonic::Response<super::CreateOrUpdateKnowledgeBaseResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.KnowledgeBaseService/CreateOrUpdateKnowledgeBase",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.v1.KnowledgeBaseService",
"CreateOrUpdateKnowledgeBase",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListRequest>,
) -> std::result::Result<tonic::Response<super::ListResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.KnowledgeBaseService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("nominal.ai.v1.KnowledgeBaseService", "List"));
self.inner.unary(req, path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteRequest>,
) -> std::result::Result<tonic::Response<super::DeleteResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.KnowledgeBaseService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("nominal.ai.v1.KnowledgeBaseService", "Delete"));
self.inner.unary(req, path, codec).await
}
pub async fn get_batch(
&mut self,
request: impl tonic::IntoRequest<super::GetBatchRequest>,
) -> std::result::Result<
tonic::Response<super::GetBatchResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.KnowledgeBaseService/GetBatch",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("nominal.ai.v1.KnowledgeBaseService", "GetBatch"),
);
self.inner.unary(req, path, codec).await
}
pub async fn generate_summary_description(
&mut self,
request: impl tonic::IntoRequest<super::GenerateSummaryDescriptionRequest>,
) -> std::result::Result<
tonic::Response<super::GenerateSummaryDescriptionResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.KnowledgeBaseService/GenerateSummaryDescription",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.v1.KnowledgeBaseService",
"GenerateSummaryDescription",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSnapshotRidByUserMessageIdRequest {
#[prost(string, tag = "1")]
pub conversation_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub message_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSnapshotRidByUserMessageIdResponse {
#[prost(string, optional, tag = "1")]
pub snapshot_rid: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReadOnlyMode {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct EditMode {
#[prost(bool, optional, tag = "1")]
pub auto_accept: ::core::option::Option<bool>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ConversationMode {
#[prost(oneof = "conversation_mode::Mode", tags = "1, 2")]
pub mode: ::core::option::Option<conversation_mode::Mode>,
}
pub mod conversation_mode {
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Mode {
#[prost(message, tag = "1")]
ReadOnly(super::ReadOnlyMode),
#[prost(message, tag = "2")]
Edit(super::EditMode),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ToolApprovalResult {
#[prost(string, tag = "1")]
pub tool_call_id: ::prost::alloc::string::String,
#[prost(oneof = "tool_approval_result::Response", tags = "2, 3")]
pub response: ::core::option::Option<tool_approval_result::Response>,
}
pub mod tool_approval_result {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "2")]
Approved(super::ToolApprovedResponse),
#[prost(message, tag = "3")]
Denied(super::ToolDeniedResponse),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ToolApprovedResponse {
#[prost(string, optional, tag = "1")]
pub override_args: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ToolDeniedResponse {
#[prost(string, tag = "2")]
pub denial_reason: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RetryRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserPromptRequest {
#[prost(message, optional, tag = "1")]
pub message: ::core::option::Option<UserModelMessage>,
#[prost(message, repeated, tag = "2")]
pub images: ::prost::alloc::vec::Vec<ImagePart>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ToolApprovalRequest {
#[prost(message, repeated, tag = "1")]
pub tool_approvals: ::prost::alloc::vec::Vec<ToolApprovalResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamChatRequest {
#[prost(string, tag = "1")]
pub conversation_rid: ::prost::alloc::string::String,
#[deprecated]
#[prost(message, optional, tag = "2")]
pub message: ::core::option::Option<UserModelMessage>,
#[deprecated]
#[prost(message, repeated, tag = "3")]
pub images: ::prost::alloc::vec::Vec<ImagePart>,
#[deprecated]
#[prost(message, repeated, tag = "6")]
pub tool_approvals: ::prost::alloc::vec::Vec<ToolApprovalResult>,
#[prost(oneof = "stream_chat_request::RequestType", tags = "7, 8, 9")]
pub request_type: ::core::option::Option<stream_chat_request::RequestType>,
#[prost(oneof = "stream_chat_request::Context", tags = "4, 5, 10")]
pub context: ::core::option::Option<stream_chat_request::Context>,
}
pub mod stream_chat_request {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum RequestType {
#[prost(message, tag = "7")]
Retry(super::RetryRequest),
#[prost(message, tag = "8")]
UserPrompt(super::UserPromptRequest),
#[prost(message, tag = "9")]
ToolApproval(super::ToolApprovalRequest),
}
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Context {
#[prost(message, tag = "4")]
Workbook(super::WorkbookContext),
#[prost(message, tag = "5")]
Global(super::GlobalContext),
#[prost(message, tag = "10")]
Checklist(super::ChecklistContext),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkbookContext {
#[prost(string, tag = "1")]
pub workbook_rid: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub user_presence: ::core::option::Option<WorkbookUserPresence>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChecklistContext {
#[prost(string, tag = "1")]
pub checklist_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub branch_name: ::prost::alloc::string::String,
#[prost(oneof = "checklist_context::ReferenceRid", tags = "3, 4")]
pub reference_rid: ::core::option::Option<checklist_context::ReferenceRid>,
}
pub mod checklist_context {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ReferenceRid {
#[prost(string, tag = "3")]
Asset(::prost::alloc::string::String),
#[prost(string, tag = "4")]
Run(::prost::alloc::string::String),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct GlobalContext {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct WorkbookUserPresence {
#[prost(int32, tag = "1")]
pub tab_index: i32,
#[prost(message, optional, tag = "2")]
pub range: ::core::option::Option<TimeRange>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateConversationRequest {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub workspace_rid: ::prost::alloc::string::String,
#[prost(string, optional, tag = "3")]
pub old_conversation_rid: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "4")]
pub previous_message_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "5")]
pub conversation_mode: ::core::option::Option<ConversationMode>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateConversationResponse {
#[prost(string, tag = "1")]
pub new_conversation_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateConversationMetadataRequest {
#[prost(string, optional, tag = "1")]
pub title: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, tag = "2")]
pub conversation_rid: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub conversation_mode: ::core::option::Option<ConversationMode>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UpdateConversationMetadataResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteConversationRequest {
#[prost(string, tag = "1")]
pub conversation_rid: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteConversationResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConversationRequest {
#[prost(string, tag = "1")]
pub conversation_rid: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub page_start_message_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(int32, optional, tag = "3")]
pub max_message_count: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompactConversationRequest {
#[prost(string, tag = "1")]
pub conversation_rid: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CompactConversationResponse {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<ContextStatus>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelMessageWithId {
#[prost(string, tag = "3")]
pub message_id: ::prost::alloc::string::String,
#[prost(string, optional, tag = "4")]
pub snapshot_rid: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "5")]
pub tool_approval_requests: ::prost::alloc::vec::Vec<ToolCallDescription>,
#[prost(oneof = "model_message_with_id::Content", tags = "1, 2, 6")]
pub content: ::core::option::Option<model_message_with_id::Content>,
}
pub mod model_message_with_id {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Content {
#[prost(message, tag = "1")]
Message(super::ModelMessage),
#[prost(message, tag = "2")]
ToolAction(super::ToolAction),
#[prost(message, tag = "6")]
ToolActionConfirmation(super::ToolActionConfirmation),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConversationResponse {
#[prost(message, repeated, tag = "1")]
pub ordered_messages: ::prost::alloc::vec::Vec<ModelMessageWithId>,
#[prost(message, optional, tag = "2")]
pub conversation_metadata: ::core::option::Option<ConversationMetadata>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConversationMetadataRequest {
#[prost(string, tag = "1")]
pub conversation_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConversationMetadataResponse {
#[prost(message, optional, tag = "1")]
pub conversation_metadata: ::core::option::Option<ConversationMetadata>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConversationMessagesRequest {
#[prost(string, tag = "1")]
pub conversation_rid: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub page_start_message_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(int32, optional, tag = "3")]
pub max_message_count: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetConversationMessagesResponse {
#[prost(message, repeated, tag = "1")]
pub ordered_messages: ::prost::alloc::vec::Vec<ModelMessageWithId>,
#[prost(string, optional, tag = "2")]
pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListConversationsRequest {
#[prost(string, tag = "1")]
pub workspace_rid: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
#[prost(int32, optional, tag = "3")]
pub page_size: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConversationMetadata {
#[prost(string, tag = "1")]
pub conversation_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub created_at: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "4")]
pub last_updated_at: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "5")]
pub mode: ::core::option::Option<ConversationMode>,
#[prost(message, optional, tag = "6")]
pub current_context: ::core::option::Option<ContextStatus>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListConversationsResponse {
#[prost(message, repeated, tag = "1")]
pub conversations: ::prost::alloc::vec::Vec<ConversationMetadata>,
#[prost(string, optional, tag = "2")]
pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TimeRange {
#[prost(message, optional, tag = "1")]
pub range_start: ::core::option::Option<Timestamp>,
#[prost(message, optional, tag = "2")]
pub range_end: ::core::option::Option<Timestamp>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Timestamp {
#[prost(int32, tag = "1")]
pub seconds: i32,
#[prost(int32, tag = "2")]
pub nanoseconds: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelMessage {
#[prost(oneof = "model_message::Kind", tags = "1, 2")]
pub kind: ::core::option::Option<model_message::Kind>,
}
pub mod model_message {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Kind {
#[prost(message, tag = "1")]
User(super::UserModelMessage),
#[prost(message, tag = "2")]
Assistant(super::AssistantModelMessage),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserModelMessage {
#[prost(message, repeated, tag = "1")]
pub text: ::prost::alloc::vec::Vec<UserContentPart>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AssistantModelMessage {
#[prost(message, repeated, tag = "1")]
pub content_parts: ::prost::alloc::vec::Vec<AssistantContentPart>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserContentPart {
#[prost(oneof = "user_content_part::Part", tags = "1")]
pub part: ::core::option::Option<user_content_part::Part>,
}
pub mod user_content_part {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Part {
#[prost(message, tag = "1")]
Text(super::TextPart),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AssistantContentPart {
#[prost(oneof = "assistant_content_part::Part", tags = "1, 2")]
pub part: ::core::option::Option<assistant_content_part::Part>,
}
pub mod assistant_content_part {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Part {
#[prost(message, tag = "1")]
Text(super::TextPart),
#[prost(message, tag = "2")]
Reasoning(super::ReasoningPart),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TextPart {
#[prost(string, tag = "1")]
pub text: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ImagePart {
#[prost(bytes = "vec", tag = "1")]
pub data: ::prost::alloc::vec::Vec<u8>,
#[prost(string, optional, tag = "2")]
pub media_type: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "3")]
pub filename: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReasoningPart {
#[prost(string, tag = "1")]
pub reasoning: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamChatResponse {
#[prost(
oneof = "stream_chat_response::Response",
tags = "1, 2, 3, 4, 5, 6, 7, 8, 10, 11"
)]
pub response: ::core::option::Option<stream_chat_response::Response>,
}
pub mod stream_chat_response {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Response {
#[prost(message, tag = "1")]
Finish(super::Finish),
#[prost(message, tag = "2")]
Error(super::Error),
#[prost(message, tag = "3")]
TextStart(super::TextStart),
#[prost(message, tag = "4")]
TextDelta(super::TextDelta),
#[prost(message, tag = "5")]
TextEnd(super::TextEnd),
#[prost(message, tag = "6")]
ReasoningStart(super::ReasoningStart),
#[prost(message, tag = "7")]
ReasoningDelta(super::ReasoningDelta),
#[prost(message, tag = "8")]
ReasoningEnd(super::ReasoningEnd),
#[prost(message, tag = "10")]
ToolAction(super::ToolAction),
#[prost(message, tag = "11")]
ToolActionConfirmation(super::ToolActionConfirmation),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ToolCallDescription {
#[prost(string, tag = "1")]
pub tool_call_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub tool_name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub tool_args_json_string: ::prost::alloc::string::String,
#[prost(enumeration = "ToolCallStatus", tag = "4")]
pub status: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Finish {
#[prost(string, repeated, tag = "1")]
pub ordered_message_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, optional, tag = "2")]
pub new_title: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "3")]
pub tool_approval_requests: ::prost::alloc::vec::Vec<ToolCallDescription>,
#[prost(message, optional, tag = "4")]
pub updated_context: ::core::option::Option<ContextStatus>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Error {
#[prost(string, tag = "1")]
pub message: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TextStart {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TextDelta {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub delta: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TextEnd {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReasoningStart {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReasoningDelta {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub delta: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReasoningEnd {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ToolAction {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub tool_action_verb: ::prost::alloc::string::String,
#[prost(string, optional, tag = "3")]
pub tool_target: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ToolActionConfirmation {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(oneof = "tool_action_confirmation::Outcome", tags = "2, 3")]
pub outcome: ::core::option::Option<tool_action_confirmation::Outcome>,
}
pub mod tool_action_confirmation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Outcome {
#[prost(message, tag = "2")]
Success(super::ToolActionSuccess),
#[prost(message, tag = "3")]
Failure(super::ToolActionFailure),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ToolActionSuccess {
#[prost(string, tag = "1")]
pub tool_success_message: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ToolActionFailure {
#[prost(string, tag = "1")]
pub tool_error_message: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ContextStatus {
#[prost(int32, tag = "1")]
pub curr_token_count: i32,
#[prost(int32, tag = "2")]
pub model_context_limit: i32,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ToolCallStatus {
Unspecified = 0,
Approved = 1,
Denied = 2,
AwaitingApproval = 3,
}
impl ToolCallStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "TOOL_CALL_STATUS_UNSPECIFIED",
Self::Approved => "TOOL_CALL_STATUS_APPROVED",
Self::Denied => "TOOL_CALL_STATUS_DENIED",
Self::AwaitingApproval => "TOOL_CALL_STATUS_AWAITING_APPROVAL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TOOL_CALL_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"TOOL_CALL_STATUS_APPROVED" => Some(Self::Approved),
"TOOL_CALL_STATUS_DENIED" => Some(Self::Denied),
"TOOL_CALL_STATUS_AWAITING_APPROVAL" => Some(Self::AwaitingApproval),
_ => None,
}
}
}
pub mod ai_agent_service_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct AiAgentServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl AiAgentServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> AiAgentServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AiAgentServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
AiAgentServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn stream_chat(
&mut self,
request: impl tonic::IntoRequest<super::StreamChatRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::StreamChatResponse>>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/StreamChat",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("nominal.ai.v1.AIAgentService", "StreamChat"));
self.inner.server_streaming(req, path, codec).await
}
#[deprecated]
pub async fn get_conversation(
&mut self,
request: impl tonic::IntoRequest<super::GetConversationRequest>,
) -> std::result::Result<
tonic::Response<super::GetConversationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/GetConversation",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("nominal.ai.v1.AIAgentService", "GetConversation"),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_conversation_metadata(
&mut self,
request: impl tonic::IntoRequest<super::GetConversationMetadataRequest>,
) -> std::result::Result<
tonic::Response<super::GetConversationMetadataResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/GetConversationMetadata",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.v1.AIAgentService",
"GetConversationMetadata",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_conversation_messages(
&mut self,
request: impl tonic::IntoRequest<super::GetConversationMessagesRequest>,
) -> std::result::Result<
tonic::Response<super::GetConversationMessagesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/GetConversationMessages",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.v1.AIAgentService",
"GetConversationMessages",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_conversations(
&mut self,
request: impl tonic::IntoRequest<super::ListConversationsRequest>,
) -> std::result::Result<
tonic::Response<super::ListConversationsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/ListConversations",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("nominal.ai.v1.AIAgentService", "ListConversations"),
);
self.inner.unary(req, path, codec).await
}
pub async fn create_conversation(
&mut self,
request: impl tonic::IntoRequest<super::CreateConversationRequest>,
) -> std::result::Result<
tonic::Response<super::CreateConversationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/CreateConversation",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("nominal.ai.v1.AIAgentService", "CreateConversation"),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_conversation_metadata(
&mut self,
request: impl tonic::IntoRequest<super::UpdateConversationMetadataRequest>,
) -> std::result::Result<
tonic::Response<super::UpdateConversationMetadataResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/UpdateConversationMetadata",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.v1.AIAgentService",
"UpdateConversationMetadata",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_conversation(
&mut self,
request: impl tonic::IntoRequest<super::DeleteConversationRequest>,
) -> std::result::Result<
tonic::Response<super::DeleteConversationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/DeleteConversation",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("nominal.ai.v1.AIAgentService", "DeleteConversation"),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_snapshot_rid_by_user_message_id(
&mut self,
request: impl tonic::IntoRequest<super::GetSnapshotRidByUserMessageIdRequest>,
) -> std::result::Result<
tonic::Response<super::GetSnapshotRidByUserMessageIdResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/GetSnapshotRidByUserMessageId",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.v1.AIAgentService",
"GetSnapshotRidByUserMessageId",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn compact_conversation(
&mut self,
request: impl tonic::IntoRequest<super::CompactConversationRequest>,
) -> std::result::Result<
tonic::Response<super::CompactConversationResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ai.v1.AIAgentService/CompactConversation",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.v1.AIAgentService",
"CompactConversation",
),
);
self.inner.unary(req, path, codec).await
}
}
}