From cadc507fad2fee59b23d1d8e73c472c077f468fc Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Sat, 18 Nov 2023 04:38:31 +0100 Subject: Add AiChatOnline, ChatgptDemoAi, ChatgptNext Providers Add OnlineGpt and TalkAi Provider Add get_random_string and get_random_hex helper Remove funcaptcha package --- .../npm/node_modules/undici/types/fetch.d.ts | 209 --------------------- 1 file changed, 209 deletions(-) delete mode 100644 g4f/Provider/npm/node_modules/undici/types/fetch.d.ts (limited to 'g4f/Provider/npm/node_modules/undici/types/fetch.d.ts') diff --git a/g4f/Provider/npm/node_modules/undici/types/fetch.d.ts b/g4f/Provider/npm/node_modules/undici/types/fetch.d.ts deleted file mode 100644 index fa4619c9..00000000 --- a/g4f/Provider/npm/node_modules/undici/types/fetch.d.ts +++ /dev/null @@ -1,209 +0,0 @@ -// based on https://github.com/Ethan-Arrowood/undici-fetch/blob/249269714db874351589d2d364a0645d5160ae71/index.d.ts (MIT license) -// and https://github.com/node-fetch/node-fetch/blob/914ce6be5ec67a8bab63d68510aabf07cb818b6d/index.d.ts (MIT license) -/// - -import { Blob } from 'buffer' -import { URL, URLSearchParams } from 'url' -import { ReadableStream } from 'stream/web' -import { FormData } from './formdata' - -import Dispatcher from './dispatcher' - -export type RequestInfo = string | URL | Request - -export declare function fetch ( - input: RequestInfo, - init?: RequestInit -): Promise - -export type BodyInit = - | ArrayBuffer - | AsyncIterable - | Blob - | FormData - | Iterable - | NodeJS.ArrayBufferView - | URLSearchParams - | null - | string - -export interface BodyMixin { - readonly body: ReadableStream | null - readonly bodyUsed: boolean - - readonly arrayBuffer: () => Promise - readonly blob: () => Promise - readonly formData: () => Promise - readonly json: () => Promise - readonly text: () => Promise -} - -export interface SpecIterator { - next(...args: [] | [TNext]): IteratorResult; -} - -export interface SpecIterableIterator extends SpecIterator { - [Symbol.iterator](): SpecIterableIterator; -} - -export interface SpecIterable { - [Symbol.iterator](): SpecIterator; -} - -export type HeadersInit = string[][] | Record> | Headers - -export declare class Headers implements SpecIterable<[string, string]> { - constructor (init?: HeadersInit) - readonly append: (name: string, value: string) => void - readonly delete: (name: string) => void - readonly get: (name: string) => string | null - readonly has: (name: string) => boolean - readonly set: (name: string, value: string) => void - readonly getSetCookie: () => string[] - readonly forEach: ( - callbackfn: (value: string, key: string, iterable: Headers) => void, - thisArg?: unknown - ) => void - - readonly keys: () => SpecIterableIterator - readonly values: () => SpecIterableIterator - readonly entries: () => SpecIterableIterator<[string, string]> - readonly [Symbol.iterator]: () => SpecIterator<[string, string]> -} - -export type RequestCache = - | 'default' - | 'force-cache' - | 'no-cache' - | 'no-store' - | 'only-if-cached' - | 'reload' - -export type RequestCredentials = 'omit' | 'include' | 'same-origin' - -type RequestDestination = - | '' - | 'audio' - | 'audioworklet' - | 'document' - | 'embed' - | 'font' - | 'image' - | 'manifest' - | 'object' - | 'paintworklet' - | 'report' - | 'script' - | 'sharedworker' - | 'style' - | 'track' - | 'video' - | 'worker' - | 'xslt' - -export interface RequestInit { - method?: string - keepalive?: boolean - headers?: HeadersInit - body?: BodyInit - redirect?: RequestRedirect - integrity?: string - signal?: AbortSignal - credentials?: RequestCredentials - mode?: RequestMode - referrer?: string - referrerPolicy?: ReferrerPolicy - window?: null - dispatcher?: Dispatcher - duplex?: RequestDuplex -} - -export type ReferrerPolicy = - | '' - | 'no-referrer' - | 'no-referrer-when-downgrade' - | 'origin' - | 'origin-when-cross-origin' - | 'same-origin' - | 'strict-origin' - | 'strict-origin-when-cross-origin' - | 'unsafe-url'; - -export type RequestMode = 'cors' | 'navigate' | 'no-cors' | 'same-origin' - -export type RequestRedirect = 'error' | 'follow' | 'manual' - -export type RequestDuplex = 'half' - -export declare class Request implements BodyMixin { - constructor (input: RequestInfo, init?: RequestInit) - - readonly cache: RequestCache - readonly credentials: RequestCredentials - readonly destination: RequestDestination - readonly headers: Headers - readonly integrity: string - readonly method: string - readonly mode: RequestMode - readonly redirect: RequestRedirect - readonly referrerPolicy: string - readonly url: string - - readonly keepalive: boolean - readonly signal: AbortSignal - readonly duplex: RequestDuplex - - readonly body: ReadableStream | null - readonly bodyUsed: boolean - - readonly arrayBuffer: () => Promise - readonly blob: () => Promise - readonly formData: () => Promise - readonly json: () => Promise - readonly text: () => Promise - - readonly clone: () => Request -} - -export interface ResponseInit { - readonly status?: number - readonly statusText?: string - readonly headers?: HeadersInit -} - -export type ResponseType = - | 'basic' - | 'cors' - | 'default' - | 'error' - | 'opaque' - | 'opaqueredirect' - -export type ResponseRedirectStatus = 301 | 302 | 303 | 307 | 308 - -export declare class Response implements BodyMixin { - constructor (body?: BodyInit, init?: ResponseInit) - - readonly headers: Headers - readonly ok: boolean - readonly status: number - readonly statusText: string - readonly type: ResponseType - readonly url: string - readonly redirected: boolean - - readonly body: ReadableStream | null - readonly bodyUsed: boolean - - readonly arrayBuffer: () => Promise - readonly blob: () => Promise - readonly formData: () => Promise - readonly json: () => Promise - readonly text: () => Promise - - readonly clone: () => Response - - static error (): Response - static json(data: any, init?: ResponseInit): Response - static redirect (url: string | URL, status: ResponseRedirectStatus): Response -} -- cgit v1.2.3