File tree Expand file tree Collapse file tree 5 files changed +43
-15
lines changed
Expand file tree Collapse file tree 5 files changed +43
-15
lines changed Original file line number Diff line number Diff line change 1+ # [ v10.0.2] ( https://github.com/coder-hxl/x-crawl/compare/v10.0.1..v10.0.2 ) (2024-07-21)
2+
3+ ### 🚀 Features
4+
5+ - Added 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' to OpenAIChatModel type to keep in sync with openai.
6+
7+ ### ⛓️ Dependencies
8+
9+ - puppeteer from 22.5.0 to 22.13.1
10+ - openai from 4.33.0 to 4.52.7
11+ - https-proxy-agent from 7.0.4 to 7.0.5
12+
13+ ---
14+
15+ ### 🚀 特征
16+
17+ - OpenAIChatModel 类型新增 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' ,与 openai 保持同步。
18+
19+ ### ⛓️ 依赖关系
20+
21+ - puppeteer 从 22.5.0 升至 22.13.1
22+ - openai 从 4.33.0 升至 4.52.7
23+ - https-proxy-agent 从 7.0.4 升至 7.0.5
24+
125# [ v10.0.1] ( https://github.com/coder-hxl/x-crawl/compare/v10.0.0..v10.0.1 ) (2024-04-10)
226
327### 🐞 Bug fixes
Original file line number Diff line number Diff line change 11{
22 "private" : true ,
33 "name" : " x-crawl" ,
4- "version" : " 10.0.1 " ,
4+ "version" : " 10.0.2 " ,
55 "author" : " coderHXL" ,
66 "description" : " x-crawl is a flexible Node.js AI-assisted crawler library." ,
77 "license" : " MIT" ,
Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ import {
99import { isObject , logStart , logSuccess } from '../shared'
1010
1111type OpenAIChatModel =
12+ | 'gpt-4o'
13+ | 'gpt-4o-2024-05-13'
14+ | 'gpt-4-turbo'
15+ | 'gpt-4-turbo-2024-04-09'
1216 | 'gpt-4-0125-preview'
1317 | 'gpt-4-turbo-preview'
1418 | 'gpt-4-1106-preview'
@@ -29,17 +33,17 @@ type OpenAIChatModel =
2933
3034interface CreateCrawlOpenAIConfig {
3135 defaultModel ?: {
32- chatModel : OpenAIChatModel
36+ chatModel : ( string & { } ) | OpenAIChatModel
3337 }
3438 clientOptions ?: ClientOptions
3539}
3640
3741interface CrawlOpenAICommonAPIOtherOption {
38- model ?: OpenAIChatModel
42+ model ?: ( string & { } ) | OpenAIChatModel
3943}
4044
4145interface CrawlOpenAIRunChatOption {
42- model : OpenAIChatModel | undefined
46+ model : ( string & { } ) | OpenAIChatModel | undefined
4347 context : string
4448 HTMLContent : string
4549 userContent : string
@@ -92,7 +96,7 @@ export function createCrawlOpenAI(
9296 const { defaultModel, clientOptions } = config
9397
9498 const openai = new OpenAI ( clientOptions )
95- const chatDefaultModel : OpenAIChatModel =
99+ const chatDefaultModel : ( string & { } ) | OpenAIChatModel =
96100 defaultModel ?. chatModel ?? 'gpt-3.5-turbo'
97101
98102 async function runChat < T > ( option : CrawlOpenAIRunChatOption ) : Promise < T > {
Original file line number Diff line number Diff line change 1+ export * from './dist/crawl'
2+ export * from './dist/ai'
Original file line number Diff line number Diff line change 11{
22 "name" : " x-crawl" ,
3- "version" : " 10.0.1 " ,
3+ "version" : " 10.0.2 " ,
44 "author" : " coderHXL" ,
55 "description" : " x-crawl is a flexible Node.js AI-assisted crawler library." ,
66 "license" : " MIT" ,
1111 },
1212 "main" : " index.js" ,
1313 "type" : " module" ,
14- "types" : " ./dist/ index.d.ts" ,
14+ "types" : " ./index.d.ts" ,
1515 "exports" : {
16- "." : {
17- "types" : " ./dist/index.d.ts" ,
18- "import" : " ./index.js" ,
19- "require" : " ./index.cjs"
20- }
16+ "types" : " ./index.d.ts" ,
17+ "import" : " ./index.js" ,
18+ "require" : " ./index.cjs"
2119 },
2220 "keywords" : [
2321 " x-crawl" ,
4240 },
4341 "dependencies" : {
4442 "chalk" : " 5.3.0" ,
45- "https-proxy-agent" : " ^7.0.4 " ,
46- "openai" : " ^4.33.0 " ,
43+ "https-proxy-agent" : " ^7.0.5 " ,
44+ "openai" : " ^4.52.7 " ,
4745 "ora" : " ^8.0.1" ,
48- "puppeteer" : " 22.5.0 "
46+ "puppeteer" : " 22.13.1 "
4947 }
5048}
You can’t perform that action at this time.
0 commit comments