cleaner fetch types
This commit is contained in:
parent
dde3326e62
commit
8c0b4eec16
1 changed files with 2 additions and 6 deletions
|
|
@ -1,11 +1,7 @@
|
|||
import { RequestOptions } from "@continuedev/config-types";
|
||||
import { fetchwithRequestOptions } from "@continuedev/fetch";
|
||||
import fetch from "node-fetch";
|
||||
import {
|
||||
type RequestInfo,
|
||||
type RequestInit,
|
||||
type Response,
|
||||
} from "openai/_shims/index";
|
||||
import { type RequestInfo, type RequestInit } from "openai/_shims/index";
|
||||
import {
|
||||
ChatCompletionChunk,
|
||||
CompletionUsage,
|
||||
|
|
@ -145,7 +141,7 @@ export function model(options: { id: string; owned_by?: string }): Model {
|
|||
|
||||
export function customFetch(
|
||||
requestOptions: RequestOptions | undefined,
|
||||
): (req: URL | RequestInfo, init?: RequestInit) => Promise<Response> {
|
||||
): typeof fetch {
|
||||
if (process.env.FEATURE_FLAG_DISABLE_CUSTOM_FETCH) {
|
||||
return fetch;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue