23 lines
922 B
JavaScript
23 lines
922 B
JavaScript
"use strict";
|
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.Completions = void 0;
|
|
const resource_1 = require("../core/resource.js");
|
|
const headers_1 = require("../internal/headers.js");
|
|
class Completions extends resource_1.APIResource {
|
|
create(params, options) {
|
|
const { betas, ...body } = params;
|
|
return this._client.post('/v1/complete', {
|
|
body,
|
|
timeout: this._client._options.timeout ?? 600000,
|
|
...options,
|
|
headers: (0, headers_1.buildHeaders)([
|
|
{ ...(betas?.toString() != null ? { 'anthropic-beta': betas?.toString() } : undefined) },
|
|
options?.headers,
|
|
]),
|
|
stream: params.stream ?? false,
|
|
});
|
|
}
|
|
}
|
|
exports.Completions = Completions;
|
|
//# sourceMappingURL=completions.js.map
|