#[non_exhaustive]pub struct ChatKitSession {
pub id: String,
pub object: String,
pub expires_at: u64,
pub client_secret: String,
pub workflow: ChatKitWorkflow,
pub user: String,
pub rate_limits: ChatKitSessionRateLimits,
pub max_requests_per_1_minute: u64,
pub status: String,
pub chatkit_configuration: Value,
/* private fields */
}Expand description
EN: ChatKit session returned by the ChatKit beta API. 中文:ChatKit beta API 返回的 ChatKit session。
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringEN: Identifier for the ChatKit session. 中文:ChatKit session 标识符。
object: StringEN: API object type, normally chatkit.session.
中文:API 对象类型,通常为 chatkit.session。
expires_at: u64EN: Unix timestamp for when the session expires. 中文:session 过期时间的 Unix 时间戳。
client_secret: StringEN: Ephemeral client secret that authenticates session requests. 中文:用于认证 session 请求的临时 client secret。
workflow: ChatKitWorkflowEN: Workflow metadata for the session. 中文:session 的 workflow 元数据。
user: StringEN: User identifier associated with the session. 中文:与 session 关联的用户标识符。
rate_limits: ChatKitSessionRateLimitsEN: Resolved rate limit values. 中文:解析后的速率限制值。
max_requests_per_1_minute: u64EN: Convenience copy of the per-minute request limit. 中文:每分钟请求限制的便捷副本。
status: StringEN: Current lifecycle state of the session. 中文:session 当前生命周期状态。
chatkit_configuration: ValueEN: Resolved ChatKit feature configuration. 中文:解析后的 ChatKit 功能配置。
Implementations§
Source§impl ChatKitSession
impl ChatKitSession
Sourcepub fn request_id(&self) -> Option<&RequestId>
pub fn request_id(&self) -> Option<&RequestId>
EN: Returns the OpenAI request id, when present. 中文:返回 OpenAI 请求 ID,如存在。
Trait Implementations§
Source§impl Clone for ChatKitSession
impl Clone for ChatKitSession
Source§fn clone(&self) -> ChatKitSession
fn clone(&self) -> ChatKitSession
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ChatKitSession
impl Debug for ChatKitSession
Source§impl<'de> Deserialize<'de> for ChatKitSession
impl<'de> Deserialize<'de> for ChatKitSession
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ChatKitSession
impl PartialEq for ChatKitSession
Source§fn eq(&self, other: &ChatKitSession) -> bool
fn eq(&self, other: &ChatKitSession) -> bool
self and other values to be equal, and is used by ==.