Skip to content

Commit

Permalink
Type response in PortkeyClient because of issues with inferred type
Browse files Browse the repository at this point in the history
  • Loading branch information
narengogi committed Sep 4, 2024
1 parent 10e9c6f commit 9a1728d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/client.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { ApiClientInterface } from "./_types/generalTypes";
import * as API from "./apis";
import { PostBodyParams } from "./apis/postMethod";
import { ApiClient, RequestOptions } from "./baseClient";
import { PostBodyParams, PostResponse } from "./apis/postMethod";
import { ApiClient, APIPromise, RequestOptions } from "./baseClient";
import { MISSING_API_KEY_ERROR_MESSAGE, PORTKEY_BASE_URL } from "./constants";
import { Stream } from "./streaming";
import { castToError, readEnv } from "./utils";

export class Portkey extends ApiClient {
Expand Down Expand Up @@ -140,7 +141,7 @@ export class Portkey extends ApiClient {
_body: PostBodyParams,
params?: ApiClientInterface,
opts?: RequestOptions
) => {
): APIPromise<Stream<PostResponse>> | APIPromise<PostResponse> => {
return new API.postMethod(this).create(url, _body, params, opts)
};

Expand Down

0 comments on commit 9a1728d

Please sign in to comment.