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
+
1
25
# [ v10.0.1] ( https://github.com/coder-hxl/x-crawl/compare/v10.0.0..v10.0.1 ) (2024-04-10)
2
26
3
27
### 🐞 Bug fixes
Original file line number Diff line number Diff line change 1
1
{
2
2
"private" : true ,
3
3
"name" : " x-crawl" ,
4
- "version" : " 10.0.1 " ,
4
+ "version" : " 10.0.2 " ,
5
5
"author" : " coderHXL" ,
6
6
"description" : " x-crawl is a flexible Node.js AI-assisted crawler library." ,
7
7
"license" : " MIT" ,
Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ import {
9
9
import { isObject , logStart , logSuccess } from '../shared'
10
10
11
11
type OpenAIChatModel =
12
+ | 'gpt-4o'
13
+ | 'gpt-4o-2024-05-13'
14
+ | 'gpt-4-turbo'
15
+ | 'gpt-4-turbo-2024-04-09'
12
16
| 'gpt-4-0125-preview'
13
17
| 'gpt-4-turbo-preview'
14
18
| 'gpt-4-1106-preview'
@@ -29,17 +33,17 @@ type OpenAIChatModel =
29
33
30
34
interface CreateCrawlOpenAIConfig {
31
35
defaultModel ?: {
32
- chatModel : OpenAIChatModel
36
+ chatModel : ( string & { } ) | OpenAIChatModel
33
37
}
34
38
clientOptions ?: ClientOptions
35
39
}
36
40
37
41
interface CrawlOpenAICommonAPIOtherOption {
38
- model ?: OpenAIChatModel
42
+ model ?: ( string & { } ) | OpenAIChatModel
39
43
}
40
44
41
45
interface CrawlOpenAIRunChatOption {
42
- model : OpenAIChatModel | undefined
46
+ model : ( string & { } ) | OpenAIChatModel | undefined
43
47
context : string
44
48
HTMLContent : string
45
49
userContent : string
@@ -92,7 +96,7 @@ export function createCrawlOpenAI(
92
96
const { defaultModel, clientOptions } = config
93
97
94
98
const openai = new OpenAI ( clientOptions )
95
- const chatDefaultModel : OpenAIChatModel =
99
+ const chatDefaultModel : ( string & { } ) | OpenAIChatModel =
96
100
defaultModel ?. chatModel ?? 'gpt-3.5-turbo'
97
101
98
102
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 1
1
{
2
2
"name" : " x-crawl" ,
3
- "version" : " 10.0.1 " ,
3
+ "version" : " 10.0.2 " ,
4
4
"author" : " coderHXL" ,
5
5
"description" : " x-crawl is a flexible Node.js AI-assisted crawler library." ,
6
6
"license" : " MIT" ,
11
11
},
12
12
"main" : " index.js" ,
13
13
"type" : " module" ,
14
- "types" : " ./dist/ index.d.ts" ,
14
+ "types" : " ./index.d.ts" ,
15
15
"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"
21
19
},
22
20
"keywords" : [
23
21
" x-crawl" ,
42
40
},
43
41
"dependencies" : {
44
42
"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 " ,
47
45
"ora" : " ^8.0.1" ,
48
- "puppeteer" : " 22.5.0 "
46
+ "puppeteer" : " 22.13.1 "
49
47
}
50
48
}
You can’t perform that action at this time.
0 commit comments