/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { llmResponsesCancel } from "../funcs/llmResponsesCancel.js"; import { llmResponsesCompact } from "../funcs/llmResponsesCompact.js"; import { CreateAcceptEnum, llmResponsesCreate, } from "../funcs/llmResponsesCreate.js"; import { llmResponsesDelete } from "../funcs/llmResponsesDelete.js"; import { GetAcceptEnum, llmResponsesGet } from "../funcs/llmResponsesGet.js"; import { llmResponsesList } from "../funcs/llmResponsesList.js"; import { llmResponsesListInputItems } from "../funcs/llmResponsesListInputItems.js"; import { llmResponsesUpdate } from "../funcs/llmResponsesUpdate.js"; import { llmResponsesWake } from "../funcs/llmResponsesWake.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export { CreateAcceptEnum } from "../funcs/llmResponsesCreate.js"; export { GetAcceptEnum } from "../funcs/llmResponsesGet.js"; export class Responses extends ClientSDK { /** * Create an agent-powered response with tool support * * @remarks * Creates a new AI agent response using advanced language models with autonomous tool usage capabilities. */ async create( request: operations.CreateResponseRequest, options?: RequestOptions & { acceptHeaderOverride?: CreateAcceptEnum }, ): Promise { return unwrapAsync(llmResponsesCreate( this, request, options, )); } /** * List all responses with pagination * * @remarks * Retrieves a paginated list of all agent responses for the authenticated user. */ async list( request: operations.ListResponsesRequest, options?: RequestOptions, ): Promise { return unwrapAsync(llmResponsesList( this, request, options, )); } /** * Retrieve response by ID with status and results * * @remarks * Retrieves a previously created agent response by its unique ID. When stream=true, returns Server-Sent Events for real-time updates on in-progress background responses. */ async get( request: operations.GetResponseRequest, options?: RequestOptions & { acceptHeaderOverride?: GetAcceptEnum }, ): Promise { return unwrapAsync(llmResponsesGet( this, request, options, )); } /** * Update a response * * @remarks * Update a response's metadata. */ async update( request: operations.UpdateResponseRequest, options?: RequestOptions, ): Promise { return unwrapAsync(llmResponsesUpdate( this, request, options, )); } /** * Permanently delete a response and its data * * @remarks * Permanently deletes an agent response and all associated data. */ async delete( request: operations.DeleteResponseRequest, options?: RequestOptions, ): Promise { return unwrapAsync(llmResponsesDelete( this, request, options, )); } /** * Cancel an in-progress background response * * @remarks * Cancels an agent response that is currently processing in the background. */ async cancel( request: operations.CancelResponseRequest, options?: RequestOptions, ): Promise { return unwrapAsync(llmResponsesCancel( this, request, options, )); } /** * Wake a sleeping background response * * @remarks * Interrupts a short sleep tool call on an in-progress background response by providing follow-up input. Wake delivery is polled by the sleeping agent and may take up to one second. */ async wake( request: operations.WakeResponseRequest, options?: RequestOptions, ): Promise { return unwrapAsync(llmResponsesWake( this, request, options, )); } /** * List paginated input items for a response * * @remarks * Retrieves a paginated list of all input items provided when creating the specified agent response. */ async listInputItems( request: operations.ListInputItemsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(llmResponsesListInputItems( this, request, options, )); } /** * Compact a conversation * * @remarks * Creates a compacted summary of the conversation history for a response, reducing context size while preserving key information. Returns a compacted response object. */ async compact( request: operations.CompactResponseRequest, options?: RequestOptions, ): Promise { return unwrapAsync(llmResponsesCompact( this, request, options, )); } }