From 9876f1e25c19c8171fd1da09b5c7ac7922e805bb Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Mon, 22 Jan 2024 20:58:29 +0100 Subject: [PATCH] chore(internal): update resource client type (#263) --- src/resource.ts | 6 +++--- src/resources/beta/messages.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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); } }