import * as z from "zod/v3"; import { AgentConfig, AgentConfig$Outbound } from "./agentconfig.js"; import { ChatMessage, ChatMessage$Outbound } from "./chatmessage.js"; import { ChatRestrictionFilters, ChatRestrictionFilters$Outbound } from "./chatrestrictionfilters.js"; import { SessionInfo, SessionInfo$Outbound } from "./sessioninfo.js"; /** * The minimal set of fields that form a chat request. */ export type ChatRequest = { /** * A list of chat messages, from most recent to least recent. At least one message must specify a USER author. */ messages: Array; sessionInfo?: SessionInfo | undefined; /** * Save the current interaction as a Chat for the user to access and potentially continue later. */ saveChat?: boolean | undefined; /** * The id of the Chat that context should be retrieved from and messages added to. An empty id starts a new Chat, and the Chat is saved if saveChat is true. */ chatId?: string | undefined; /** * Describes the agent that executes the request. */ agentConfig?: AgentConfig | undefined; inclusions?: ChatRestrictionFilters | undefined; exclusions?: ChatRestrictionFilters | undefined; /** * Timeout in milliseconds for the request. A `408` error will be returned if handling the request takes longer. */ timeoutMillis?: number | undefined; /** * The ID of the application this request originates from, used to determine the configuration of underlying chat processes. This should correspond to the ID set during admin setup. If not specified, the default chat experience will be used. */ applicationId?: string | undefined; /** * The ID of the Agent that should process this chat request. Only Agents with trigger set to 'User chat message' are invokable through this API. If not specified, the default chat experience will be used. */ agentId?: string | undefined; /** * If set, response lines will be streamed one-by-one as they become available. Each will be a ChatResponse, formatted as JSON, and separated by a new line. If false, the entire response will be returned at once. Note that if this is set and the model being used does not support streaming, the model's response will not be streamed, but other messages from the endpoint still will be. */ stream?: boolean | undefined; }; /** @internal */ export type ChatRequest$Outbound = { messages: Array; sessionInfo?: SessionInfo$Outbound | undefined; saveChat?: boolean | undefined; chatId?: string | undefined; agentConfig?: AgentConfig$Outbound | undefined; inclusions?: ChatRestrictionFilters$Outbound | undefined; exclusions?: ChatRestrictionFilters$Outbound | undefined; timeoutMillis?: number | undefined; applicationId?: string | undefined; agentId?: string | undefined; stream?: boolean | undefined; }; /** @internal */ export declare const ChatRequest$outboundSchema: z.ZodType; export declare function chatRequestToJSON(chatRequest: ChatRequest): string; //# sourceMappingURL=chatrequest.d.ts.map