import { APIResource } from "../../core/resource.mjs"; import * as FeedbackAPI from "./feedback.mjs"; import { Feedback, FeedbackSaveParams, FeedbackSaveResponse } from "./feedback.mjs"; import { APIPromise } from "../../core/api-promise.mjs"; import { type Uploadable } from "../../core/uploads.mjs"; import { RequestOptions } from "../../internal/request-options.mjs"; import { GLChatMessageChunk } from "../../resources.mjs"; export declare class MessageResource extends APIResource { feedback: FeedbackAPI.Feedback; /** * Generate a response for the user message. Default is SSE; set form field * stream=false for JSON. */ create(params: MessageCreateParams, options?: RequestOptions): Promise>; /** * Delete one or more messages by their IDs and remove associated attachments. */ delete(params: MessageDeleteParams, options?: RequestOptions): APIPromise; /** * Get a deanonymized message by message ID, conversation ID, and user ID from chat * history. */ deanonymize(messageID: string, params: MessageDeanonymizeParams, options?: RequestOptions): APIPromise; } /** * Message model. */ export interface Message { conversation_id: string; created_time: string; is_active: boolean; /** * Enum for Message Type. */ role: 'user' | 'assistant'; id?: string | null; content?: string | null; deanonymized_content?: string | null; feedback?: string | null; metadata_?: { [key: string]: unknown; } | null; parent_id?: string | null; source?: string | null; } /** * The type of search to perform. * * Attributes: NORMAL: Get answer from chatbot knowledge. SEARCH: Get answer from * various connectors. SQL_SEARCH: Get answer from SQL-based database. * AGENT_CONNECTOR: Execute a scoped glaip coordinator with per-request connector * selection. No request_connector or connector_management tooling — missing * connectors yield a plain-text response from the coordinator. WEB: Get more * relevant information from the web. (DEPRECATED) Web Search uses real-time data. * Agent selection isn't available in this mode. DEEP_RESEARCH: Get answer from * Deep Research Agent. ESSENTIALS_DEEP_RESEARCH: Get answer from Deep Research * with Essentials mode. Provides key points and core insights without noise, * optimized for speed and clarity. Ideal for quick decision-making support and * fast orientation. COMPREHENSIVE_DEEP_RESEARCH: Get answer from Deep Research * with Comprehensive mode. Delivers the full picture with depth and thoroughness, * covering all relevant angles, details, and supporting data. Suitable for * professional research tasks where precision matters more than speed. * PRIVATE_DEEP_RESEARCH: Get answer from Deep Research with private deep research * providers. INTERNAL_DEEP_RESEARCH: Retrieves answers using Deep Research with * internal data sources. (DEPRECATED) Accesses internal repositories such as * Google Drive and utilizes the same processing engine as Essentials Deep Research * mode. */ export type SearchType = 'normal' | 'search' | 'sql_search' | 'agent_connector' | 'web' | 'deep_research' | 'essentials_deep_research' | 'comprehensive_deep_research' | 'private_deep_research' | 'internal_deep_research'; export type MessageDeleteResponse = unknown; /** * Response model for getting a deanonymized message. * * Attributes: message (Message): The deanonymized message. */ export interface MessageDeanonymizeResponse { /** * Message model. */ message: Message; } export interface MessageCreateParams { /** * Body param */ chatbot_id: string; /** * Body param */ agent_ids?: string; /** * Body param */ anonymize_em?: boolean | null; /** * Body param */ anonymize_lm?: boolean | null; /** * Body param */ assistant_message_id?: string | null; /** * Body param */ chat_history?: string | null; /** * Body param */ connectors?: string; /** * Body param */ conversation_id?: string | null; /** * Body param */ digital_employee_id?: string | null; /** * Body param */ exclude_events?: Array; /** * Body param */ exclude_prefix?: boolean; /** * Body param */ files?: Array; /** * Body param */ filters?: string | null; /** * Body param */ include_pipeline_trace?: boolean; /** * Body param */ include_states?: boolean; /** * Body param */ is_edited?: boolean; /** * Body param */ is_regenerated?: boolean; /** * Body param */ is_retried?: boolean; /** * Body param */ message?: string | null; /** * Body param */ metadata?: string | null; /** * Body param */ model_name?: string | null; /** * Body param */ parent_id?: string | null; /** * Body param */ quote?: string | null; /** * Body param */ regenerated_message_id?: string | null; /** * Body param: The type of search to perform. * * Attributes: NORMAL: Get answer from chatbot knowledge. SEARCH: Get answer from * various connectors. SQL_SEARCH: Get answer from SQL-based database. * AGENT_CONNECTOR: Execute a scoped glaip coordinator with per-request connector * selection. No request_connector or connector_management tooling — missing * connectors yield a plain-text response from the coordinator. WEB: Get more * relevant information from the web. (DEPRECATED) Web Search uses real-time data. * Agent selection isn't available in this mode. DEEP_RESEARCH: Get answer from * Deep Research Agent. ESSENTIALS_DEEP_RESEARCH: Get answer from Deep Research * with Essentials mode. Provides key points and core insights without noise, * optimized for speed and clarity. Ideal for quick decision-making support and * fast orientation. COMPREHENSIVE_DEEP_RESEARCH: Get answer from Deep Research * with Comprehensive mode. Delivers the full picture with depth and thoroughness, * covering all relevant angles, details, and supporting data. Suitable for * professional research tasks where precision matters more than speed. * PRIVATE_DEEP_RESEARCH: Get answer from Deep Research with private deep research * providers. INTERNAL_DEEP_RESEARCH: Retrieves answers using Deep Research with * internal data sources. (DEPRECATED) Accesses internal repositories such as * Google Drive and utilizes the same processing engine as Essentials Deep Research * mode. */ search_type?: SearchType | null; /** * Body param */ skill_ids?: string; /** * Body param */ smart_mode?: boolean; /** * Body param */ source?: string | null; /** * Body param */ stream?: boolean; /** * Body param */ stream_id?: string | null; /** * Body param */ stream_message_only?: boolean; /** * Body param */ temporary_file_ids?: string[] | null; /** * Body param */ use_cache?: boolean | null; /** * Body param */ user_id?: string | null; /** * Body param */ user_message_id?: string | null; /** * Header param */ 'Accept-Language'?: string; /** * Header param */ 'X-API-Key'?: string; /** * Header param: Set to `structured` to receive errors in the structured envelope. * Omit it to keep the legacy error body. */ 'X-Error-Format'?: string; } export interface MessageDeleteParams { /** * Query param */ message_ids: Array; /** * Header param */ 'Accept-Language'?: string; /** * Header param: Set to `structured` to receive errors in the structured envelope. * Omit it to keep the legacy error body. */ 'X-Error-Format'?: string; } export interface MessageDeanonymizeParams { /** * Query param */ conversation_id: string; /** * Header param */ 'Accept-Language'?: string; /** * Header param: Set to `structured` to receive errors in the structured envelope. * Omit it to keep the legacy error body. */ 'X-Error-Format'?: string; } export declare namespace MessageResource { export { type Message as Message, type SearchType as SearchType, type MessageDeleteResponse as MessageDeleteResponse, type MessageDeanonymizeResponse as MessageDeanonymizeResponse, type MessageCreateParams as MessageCreateParams, type MessageDeleteParams as MessageDeleteParams, type MessageDeanonymizeParams as MessageDeanonymizeParams, }; export { Feedback as Feedback, type FeedbackSaveResponse as FeedbackSaveResponse, type FeedbackSaveParams as FeedbackSaveParams, }; } //# sourceMappingURL=message.d.mts.map