import ApiCall from "./ApiCall"; import { ConversationModelCreateSchema, ConversationModelSchema, } from "./ConversationModel"; const RESOURCEPATH = "/conversations/models"; export default class ConversationModels { constructor(private readonly apiCall: ApiCall) { this.apiCall = apiCall; } async create( params: ConversationModelCreateSchema, ): Promise { return this.apiCall.post( this.endpointPath(), params, ); } async retrieve(): Promise { return this.apiCall.get( this.endpointPath(), ); } private endpointPath(operation?: string): string { return `${ConversationModels.RESOURCEPATH}${ operation === undefined ? "" : "/" + encodeURIComponent(operation) }`; } static get RESOURCEPATH() { return RESOURCEPATH; } }