/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 10c775d37e01
 */
import { betaConversationsAppend } from "../funcs/betaConversationsAppend.js";
import { betaConversationsAppendStream } from "../funcs/betaConversationsAppendStream.js";
import { betaConversationsDelete } from "../funcs/betaConversationsDelete.js";
import { betaConversationsGet } from "../funcs/betaConversationsGet.js";
import { betaConversationsGetHistory } from "../funcs/betaConversationsGetHistory.js";
import { betaConversationsGetMessages } from "../funcs/betaConversationsGetMessages.js";
import { betaConversationsList } from "../funcs/betaConversationsList.js";
import { betaConversationsRestart } from "../funcs/betaConversationsRestart.js";
import { betaConversationsRestartStream } from "../funcs/betaConversationsRestartStream.js";
import { betaConversationsStart } from "../funcs/betaConversationsStart.js";
import { betaConversationsStartStream } from "../funcs/betaConversationsStartStream.js";
import { ClientSDK } from "../lib/sdks.js";
import { unwrapAsync } from "../types/fp.js";
export class Conversations extends ClientSDK {
    /**
     * Create a conversation and append entries to it.
     *
     * @remarks
     * Create a new conversation, using a base model or an agent and append entries. Completion and tool executions are run and the response is appended to the conversation.Use the returned conversation_id to continue the conversation.
     */
    async start(request, options) {
        return unwrapAsync(betaConversationsStart(this, request, options));
    }
    /**
     * List all created conversations.
     *
     * @remarks
     * Retrieve a list of conversation entities sorted by creation time.
     */
    async list(request, options) {
        return unwrapAsync(betaConversationsList(this, request, options));
    }
    /**
     * Retrieve a conversation information.
     *
     * @remarks
     * Given a conversation_id retrieve a conversation entity with its attributes.
     */
    async get(request, options) {
        return unwrapAsync(betaConversationsGet(this, request, options));
    }
    /**
     * Delete a conversation.
     *
     * @remarks
     * Delete a conversation given a conversation_id.
     */
    async delete(request, options) {
        return unwrapAsync(betaConversationsDelete(this, request, options));
    }
    /**
     * Append new entries to an existing conversation.
     *
     * @remarks
     * Run completion on the history of the conversation and the user entries. Return the new created entries.
     */
    async append(request, options) {
        return unwrapAsync(betaConversationsAppend(this, request, options));
    }
    /**
     * Retrieve all entries in a conversation.
     *
     * @remarks
     * Given a conversation_id retrieve all the entries belonging to that conversation. The entries are sorted in the order they were appended, those can be messages, connectors or function_call.
     */
    async getHistory(request, options) {
        return unwrapAsync(betaConversationsGetHistory(this, request, options));
    }
    /**
     * Retrieve all messages in a conversation.
     *
     * @remarks
     * Given a conversation_id retrieve all the messages belonging to that conversation. This is similar to retrieving all entries except we filter the messages only.
     */
    async getMessages(request, options) {
        return unwrapAsync(betaConversationsGetMessages(this, request, options));
    }
    /**
     * Restart a conversation starting from a given entry.
     *
     * @remarks
     * Given a conversation_id and an id, recreate a conversation from this point and run completion. A new conversation is returned with the new entries returned.
     */
    async restart(request, options) {
        return unwrapAsync(betaConversationsRestart(this, request, options));
    }
    /**
     * Create a conversation and append entries to it.
     *
     * @remarks
     * Create a new conversation, using a base model or an agent and append entries. Completion and tool executions are run and the response is appended to the conversation.Use the returned conversation_id to continue the conversation.
     */
    async startStream(request, options) {
        return unwrapAsync(betaConversationsStartStream(this, request, options));
    }
    /**
     * Append new entries to an existing conversation.
     *
     * @remarks
     * Run completion on the history of the conversation and the user entries. Return the new created entries.
     */
    async appendStream(request, options) {
        return unwrapAsync(betaConversationsAppendStream(this, request, options));
    }
    /**
     * Restart a conversation starting from a given entry.
     *
     * @remarks
     * Given a conversation_id and an id, recreate a conversation from this point and run completion. A new conversation is returned with the new entries returned.
     */
    async restartStream(request, options) {
        return unwrapAsync(betaConversationsRestartStream(this, request, options));
    }
}
//# sourceMappingURL=conversations.js.map