diff --git a/src/resource.ts b/src/resource.ts index a9322ff1..838ddac9 100644 --- a/src/resource.ts +++ b/src/resource.ts @@ -1,11 +1,11 @@ // File generated from our OpenAPI spec by Stainless. -import type { Anthropic } from './index'; +import * as Core from '@anthropic-ai/sdk/core'; export class APIResource { - protected _client: Anthropic; + protected _client: Core.APIClient; - constructor(client: Anthropic) { + constructor(client: Core.APIClient) { this._client = client; } } diff --git a/src/resources/beta/messages.ts b/src/resources/beta/messages.ts index 0dce589c..6401acc1 100644 --- a/src/resources/beta/messages.ts +++ b/src/resources/beta/messages.ts @@ -40,7 +40,7 @@ export class Messages extends APIResource { * Create a Message stream */ stream(body: MessageStreamParams, options?: Core.RequestOptions): MessageStream { - return MessageStream.createMessage(this._client.beta.messages, body, options); + return MessageStream.createMessage(this, body, options); } }