@anthropic-ai/sdk
Version:
The official TypeScript library for the Anthropic API
23 lines • 778 B
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../resource.mjs";
import { MessageStream } from "../lib/MessageStream.mjs";
export { MessageStream } from "../lib/MessageStream.mjs";
export class Messages extends APIResource {
create(body, options) {
return this._client.post('/v1/messages', {
body,
timeout: this._client._options.timeout ?? 600000,
...options,
stream: body.stream ?? false,
});
}
/**
* Create a Message stream
*/
stream(body, options) {
return MessageStream.createMessage(this, body, options);
}
}
(function (Messages) {
})(Messages || (Messages = {}));
//# sourceMappingURL=messages.mjs.map