kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
feat: improve diffbot types; fix proxycurl default timeout
rodzic
ef97c26ab4
commit
b19b4fbbfe
|
@ -259,7 +259,7 @@ export namespace diffbot {
|
||||||
description?: string
|
description?: string
|
||||||
homepageUri?: string
|
homepageUri?: string
|
||||||
allNames?: string[]
|
allNames?: string[]
|
||||||
skills?: Skill[]
|
skills?: Partial<BasicEntity>[]
|
||||||
crawlTimestamp?: number
|
crawlTimestamp?: number
|
||||||
summary?: string
|
summary?: string
|
||||||
image?: string
|
image?: string
|
||||||
|
@ -383,72 +383,121 @@ export namespace diffbot {
|
||||||
nbOrigins?: number
|
nbOrigins?: number
|
||||||
nbIncomingEdges?: number
|
nbIncomingEdges?: number
|
||||||
nbFollowers?: number
|
nbFollowers?: number
|
||||||
|
nbLocations?: number
|
||||||
|
nbEmployeesMin?: number
|
||||||
|
nbEmployeesMax?: number
|
||||||
|
nbActiveEmployeeEdges?: number
|
||||||
educations?: Education[]
|
educations?: Education[]
|
||||||
nationalities?: Nationality[]
|
nationalities?: Nationality[]
|
||||||
allNames?: string[]
|
allNames?: string[]
|
||||||
skills?: Skill[]
|
skills?: Partial<BasicEntity>[]
|
||||||
children?: Children[]
|
children?: BasicEntity[]
|
||||||
height?: number
|
height?: number
|
||||||
image?: string
|
image?: string
|
||||||
images?: Image[]
|
images?: Image[]
|
||||||
allOriginHashes?: string[]
|
allOriginHashes?: string[]
|
||||||
nameDetail?: NameDetail
|
nameDetail?: NameDetail
|
||||||
parents?: Parent[]
|
parents?: BasicEntity[]
|
||||||
gender?: Gender
|
gender?: Gender
|
||||||
importance?: number
|
importance?: number
|
||||||
|
wikipediaPageviews?: number
|
||||||
wikipediaPageviewsLastQuarterGrowth?: number
|
wikipediaPageviewsLastQuarterGrowth?: number
|
||||||
wikipediaPageviewsLastYear?: number
|
wikipediaPageviewsLastYear?: number
|
||||||
wikipediaPageviewsLastYearGrowth?: number
|
wikipediaPageviewsLastYearGrowth?: number
|
||||||
wikipediaPageviews?: number
|
|
||||||
wikipediaPageviewsLastQuarter?: number
|
wikipediaPageviewsLastQuarter?: number
|
||||||
wikipediaPageviewsGrowth?: number
|
wikipediaPageviewsGrowth?: number
|
||||||
birthPlace?: BirthPlace
|
birthPlace?: Location
|
||||||
types?: string[]
|
types?: string[]
|
||||||
unions?: Union[]
|
unions?: Union[]
|
||||||
languages?: Language[]
|
languages?: Language[]
|
||||||
employments?: Employment[]
|
employments?: Employment[]
|
||||||
birthDate?: DateTime
|
birthDate?: DateTime
|
||||||
religion?: Religion
|
religion?: Partial<BasicEntity>
|
||||||
awards?: Award[]
|
awards?: Award[]
|
||||||
netWorth?: NetWorth
|
netWorth?: Amount
|
||||||
allDescriptions?: string[]
|
allDescriptions?: string[]
|
||||||
locations?: Location[]
|
locations?: Location[]
|
||||||
location?: Location
|
location?: Location
|
||||||
interests?: Interest[]
|
interests?: Interest[]
|
||||||
emailAddresses?: any
|
suppliers?: BasicEntity[]
|
||||||
|
subsidiaries?: BasicEntity[]
|
||||||
|
ipo?: {
|
||||||
|
date: DateTime
|
||||||
|
stockExchange: string
|
||||||
|
}
|
||||||
|
motto?: string
|
||||||
|
logo?: string
|
||||||
|
foundingDate?: DateTime
|
||||||
|
totalInvestment?: Amount
|
||||||
|
naicsClassification2017?: any[]
|
||||||
|
naicsClassification?: any[]
|
||||||
|
sicClassification?: any[]
|
||||||
|
employeeCategories?: any[]
|
||||||
|
emailAddresses?: EmailAddress[]
|
||||||
age?: number
|
age?: number
|
||||||
|
isPublic?: boolean
|
||||||
|
isAcquired?: boolean
|
||||||
|
isDissolved?: boolean
|
||||||
|
isNonProfit?: boolean
|
||||||
crawlTimestamp?: number
|
crawlTimestamp?: number
|
||||||
|
founders?: BasicEntity[]
|
||||||
|
boardMembers?: BasicEntity[]
|
||||||
|
ceo?: BasicEntity
|
||||||
|
investments?: Investment[]
|
||||||
|
acquiredBy?: BasicEntity[]
|
||||||
|
diffbotClassification?: any[]
|
||||||
|
blogUri?: string
|
||||||
|
descriptors?: string[]
|
||||||
|
industries?: string[]
|
||||||
|
partnerships?: BasicEntity[]
|
||||||
|
categories?: Category[]
|
||||||
|
customers?: BasicEntity[]
|
||||||
|
technographics?: Technographic[]
|
||||||
|
stock?: Stock
|
||||||
|
companiesHouseIds?: string[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Technographic {
|
||||||
|
technology: Partial<BasicEntity>
|
||||||
|
categories: string[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Category {
|
||||||
|
level?: number
|
||||||
|
isPrimary?: boolean
|
||||||
|
name: string
|
||||||
|
diffbotUri?: string
|
||||||
|
targetDiffbotId?: string
|
||||||
|
type?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Investment {
|
||||||
|
date: DateTime
|
||||||
|
amount?: Amount
|
||||||
|
isCurrent: boolean
|
||||||
|
series: string
|
||||||
|
investors: BasicEntity[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Amount {
|
||||||
|
currency: string
|
||||||
|
value: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface EmailAddress {
|
||||||
|
contactString: string
|
||||||
|
type: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Education {
|
export interface Education {
|
||||||
institution: Institution
|
institution: BasicEntity
|
||||||
isCurrent?: boolean
|
isCurrent?: boolean
|
||||||
major?: Major
|
major?: BasicEntity
|
||||||
degree?: Degree
|
degree?: BasicEntity
|
||||||
from?: DateTime
|
from?: DateTime
|
||||||
to?: DateTime
|
to?: DateTime
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Institution {
|
|
||||||
summary: string
|
|
||||||
image: string
|
|
||||||
types: string[]
|
|
||||||
name: string
|
|
||||||
diffbotUri: string
|
|
||||||
targetDiffbotId: string
|
|
||||||
type: string
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Major {}
|
|
||||||
|
|
||||||
export interface Degree {
|
|
||||||
types: string[]
|
|
||||||
name: string
|
|
||||||
diffbotUri: string
|
|
||||||
targetDiffbotId: string
|
|
||||||
type: string
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface DateTime {
|
export interface DateTime {
|
||||||
str: string
|
str: string
|
||||||
precision: number
|
precision: number
|
||||||
|
@ -460,21 +509,6 @@ export namespace diffbot {
|
||||||
type: string
|
type: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Skill {
|
|
||||||
name: string
|
|
||||||
diffbotUri?: string
|
|
||||||
targetDiffbotId?: string
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Children {
|
|
||||||
summary: string
|
|
||||||
types: string[]
|
|
||||||
name: string
|
|
||||||
diffbotUri: string
|
|
||||||
targetDiffbotId: string
|
|
||||||
type: string
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Image {
|
export interface Image {
|
||||||
url: string
|
url: string
|
||||||
primary?: boolean
|
primary?: boolean
|
||||||
|
@ -486,88 +520,31 @@ export namespace diffbot {
|
||||||
middleName?: string[]
|
middleName?: string[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Parent {
|
|
||||||
summary: string
|
|
||||||
types: string[]
|
|
||||||
name: string
|
|
||||||
diffbotUri: string
|
|
||||||
targetDiffbotId: string
|
|
||||||
type: string
|
|
||||||
image?: string
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Gender {
|
export interface Gender {
|
||||||
normalizedValue: string
|
normalizedValue: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BirthPlace {
|
export interface Stock {
|
||||||
country: Country
|
symbol: string
|
||||||
isCurrent: boolean
|
isCurrent: boolean
|
||||||
address: string
|
exchange: string
|
||||||
city: City
|
|
||||||
subregion: Subregion
|
|
||||||
latitude: number
|
|
||||||
precision: number
|
|
||||||
surfaceForm: string
|
|
||||||
region: Region
|
|
||||||
longitude: number
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Country {
|
|
||||||
summary: string
|
|
||||||
image: string
|
|
||||||
types: string[]
|
|
||||||
name: string
|
|
||||||
diffbotUri: string
|
|
||||||
targetDiffbotId: string
|
|
||||||
type: string
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface City {
|
|
||||||
summary: string
|
|
||||||
image: string
|
|
||||||
types: string[]
|
|
||||||
name: string
|
|
||||||
diffbotUri: string
|
|
||||||
targetDiffbotId: string
|
|
||||||
type: string
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Subregion {
|
|
||||||
summary: string
|
|
||||||
image: string
|
|
||||||
types: string[]
|
|
||||||
name: string
|
|
||||||
diffbotUri: string
|
|
||||||
targetDiffbotId: string
|
|
||||||
type: string
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Region {
|
|
||||||
summary: string
|
|
||||||
image: string
|
|
||||||
types: string[]
|
|
||||||
name: string
|
|
||||||
diffbotUri: string
|
|
||||||
targetDiffbotId: string
|
|
||||||
type: string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Union {
|
export interface Union {
|
||||||
person: Person
|
person: BasicEntity
|
||||||
from?: DateTime
|
from?: DateTime
|
||||||
to?: DateTime
|
to?: DateTime
|
||||||
type?: string
|
type?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Person {
|
export interface BasicEntity {
|
||||||
summary: string
|
|
||||||
image: string
|
|
||||||
types: string[]
|
|
||||||
name: string
|
name: string
|
||||||
|
summary: string
|
||||||
|
type: string
|
||||||
|
image?: string
|
||||||
|
types?: string[]
|
||||||
diffbotUri: string
|
diffbotUri: string
|
||||||
targetDiffbotId: string
|
targetDiffbotId: string
|
||||||
type: string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Language {
|
export interface Language {
|
||||||
|
@ -577,59 +554,28 @@ export namespace diffbot {
|
||||||
|
|
||||||
export interface Employment {
|
export interface Employment {
|
||||||
isCurrent?: boolean
|
isCurrent?: boolean
|
||||||
employer?: Employer
|
employer?: BasicEntity
|
||||||
from?: DateTime
|
from?: DateTime
|
||||||
categories?: EmploymentCategory[]
|
categories?: Partial<BasicEntity>[]
|
||||||
title?: string
|
title?: string
|
||||||
to?: DateTime
|
to?: DateTime
|
||||||
location?: Location
|
location?: Location
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Employer {
|
|
||||||
summary?: string
|
|
||||||
image?: string
|
|
||||||
types?: string[]
|
|
||||||
name: string
|
|
||||||
diffbotUri?: string
|
|
||||||
targetDiffbotId?: string
|
|
||||||
type: string
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface EmploymentCategory {
|
|
||||||
types: string[]
|
|
||||||
name: string
|
|
||||||
diffbotUri: string
|
|
||||||
targetDiffbotId: string
|
|
||||||
type: string
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Location {
|
export interface Location {
|
||||||
country?: Country
|
|
||||||
isCurrent: boolean
|
isCurrent: boolean
|
||||||
address: string
|
country?: BasicEntity
|
||||||
city: City
|
address?: string
|
||||||
street: string
|
city?: BasicEntity
|
||||||
metroArea: MetroArea
|
street?: string
|
||||||
subregion: Subregion
|
metroArea?: BasicEntity
|
||||||
latitude: number
|
subregion?: BasicEntity
|
||||||
precision: number
|
surfaceForm?: string
|
||||||
postalCode: string
|
latitude?: number
|
||||||
region?: Region
|
longitude?: number
|
||||||
longitude: number
|
postalCode?: string
|
||||||
}
|
region?: BasicEntity
|
||||||
|
precision?: number
|
||||||
export interface MetroArea {
|
|
||||||
summary: string
|
|
||||||
image: string
|
|
||||||
types: string[]
|
|
||||||
name: string
|
|
||||||
diffbotUri: string
|
|
||||||
targetDiffbotId: string
|
|
||||||
type: string
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Religion {
|
|
||||||
str: string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Award {
|
export interface Award {
|
||||||
|
@ -637,11 +583,6 @@ export namespace diffbot {
|
||||||
date?: DateTime
|
date?: DateTime
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface NetWorth {
|
|
||||||
currency: string
|
|
||||||
value: number
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Interest {
|
export interface Interest {
|
||||||
name: string
|
name: string
|
||||||
type: string
|
type: string
|
||||||
|
@ -655,7 +596,14 @@ export namespace diffbot {
|
||||||
'images',
|
'images',
|
||||||
'nationalities',
|
'nationalities',
|
||||||
'awards',
|
'awards',
|
||||||
'interests'
|
'interests',
|
||||||
|
'suppliers',
|
||||||
|
'partnerships',
|
||||||
|
'industries',
|
||||||
|
'categories',
|
||||||
|
'technographics',
|
||||||
|
'employeeCategories',
|
||||||
|
'diffbotClassification'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2046,11 +2046,13 @@ export class ProxycurlClient extends AIFunctionsProvider {
|
||||||
apiBaseUrl = getEnv('PROXYCURL_API_BASE_URL') ??
|
apiBaseUrl = getEnv('PROXYCURL_API_BASE_URL') ??
|
||||||
'https://nubela.co/proxycurl',
|
'https://nubela.co/proxycurl',
|
||||||
throttle = true,
|
throttle = true,
|
||||||
|
timeoutMs = 30_000,
|
||||||
ky = defaultKy
|
ky = defaultKy
|
||||||
}: {
|
}: {
|
||||||
apiKey?: string
|
apiKey?: string
|
||||||
apiBaseUrl?: string
|
apiBaseUrl?: string
|
||||||
throttle?: boolean
|
throttle?: boolean
|
||||||
|
timeoutMs?: number
|
||||||
ky?: KyInstance
|
ky?: KyInstance
|
||||||
} = {}) {
|
} = {}) {
|
||||||
assert(
|
assert(
|
||||||
|
@ -2070,6 +2072,7 @@ export class ProxycurlClient extends AIFunctionsProvider {
|
||||||
|
|
||||||
this.ky = throttledKy.extend({
|
this.ky = throttledKy.extend({
|
||||||
prefixUrl: apiBaseUrl,
|
prefixUrl: apiBaseUrl,
|
||||||
|
timeout: timeoutMs,
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${apiKey}`
|
Authorization: `Bearer ${apiKey}`
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue