Skip to content

Commit 600b35e

Browse files
chore: update ts docs
1 parent bf66500 commit 600b35e

16 files changed

+327
-84
lines changed

docs/classes/ChatGPTAPI.md

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
### Accessors
1212

1313
- [apiKey](ChatGPTAPI.md#apikey)
14+
- [apiOrg](ChatGPTAPI.md#apiorg)
1415

1516
### Methods
1617

@@ -32,7 +33,7 @@ Creates a new client wrapper around OpenAI's chat completion API, mimicing the o
3233

3334
#### Defined in
3435

35-
[src/chatgpt-api.ts:49](https://github.com/transitive-bullshit/chatgpt-api/blob/9eac18f/src/chatgpt-api.ts#L49)
36+
[src/chatgpt-api.ts:51](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/chatgpt-api.ts#L51)
3637

3738
## Accessors
3839

@@ -46,7 +47,7 @@ Creates a new client wrapper around OpenAI's chat completion API, mimicing the o
4647

4748
#### Defined in
4849

49-
[src/chatgpt-api.ts:311](https://github.com/transitive-bullshit/chatgpt-api/blob/9eac18f/src/chatgpt-api.ts#L311)
50+
[src/chatgpt-api.ts:345](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/chatgpt-api.ts#L345)
5051

5152
`set` **apiKey**(`apiKey`): `void`
5253

@@ -62,7 +63,37 @@ Creates a new client wrapper around OpenAI's chat completion API, mimicing the o
6263

6364
#### Defined in
6465

65-
[src/chatgpt-api.ts:315](https://github.com/transitive-bullshit/chatgpt-api/blob/9eac18f/src/chatgpt-api.ts#L315)
66+
[src/chatgpt-api.ts:349](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/chatgpt-api.ts#L349)
67+
68+
___
69+
70+
### apiOrg
71+
72+
`get` **apiOrg**(): `string`
73+
74+
#### Returns
75+
76+
`string`
77+
78+
#### Defined in
79+
80+
[src/chatgpt-api.ts:353](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/chatgpt-api.ts#L353)
81+
82+
`set` **apiOrg**(`apiOrg`): `void`
83+
84+
#### Parameters
85+
86+
| Name | Type |
87+
| :------ | :------ |
88+
| `apiOrg` | `string` |
89+
90+
#### Returns
91+
92+
`void`
93+
94+
#### Defined in
95+
96+
[src/chatgpt-api.ts:357](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/chatgpt-api.ts#L357)
6697

6798
## Methods
6899

@@ -94,4 +125,4 @@ The response from ChatGPT
94125

95126
#### Defined in
96127

97-
[src/chatgpt-api.ts:132](https://github.com/transitive-bullshit/chatgpt-api/blob/9eac18f/src/chatgpt-api.ts#L132)
128+
[src/chatgpt-api.ts:137](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/chatgpt-api.ts#L137)

docs/classes/ChatGPTError.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Error.constructor
3939

4040
#### Defined in
4141

42-
node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es5.d.ts:1059
42+
node_modules/.pnpm/typescript@5.0.3/node_modules/typescript/lib/lib.es5.d.ts:1060
4343

4444
**new ChatGPTError**(`message?`, `options?`)
4545

@@ -56,7 +56,7 @@ Error.constructor
5656

5757
#### Defined in
5858

59-
node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2022.error.d.ts:30
59+
node_modules/.pnpm/typescript@5.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts:28
6060

6161
## Properties
6262

@@ -66,7 +66,7 @@ node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2022.error
6666

6767
#### Defined in
6868

69-
[src/types.ts:80](https://github.com/transitive-bullshit/chatgpt-api/blob/9eac18f/src/types.ts#L80)
69+
[src/types.ts:86](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/types.ts#L86)
7070

7171
___
7272

@@ -76,7 +76,7 @@ ___
7676

7777
#### Defined in
7878

79-
[src/types.ts:79](https://github.com/transitive-bullshit/chatgpt-api/blob/9eac18f/src/types.ts#L79)
79+
[src/types.ts:85](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/types.ts#L85)
8080

8181
___
8282

@@ -86,7 +86,7 @@ ___
8686

8787
#### Defined in
8888

89-
[src/types.ts:77](https://github.com/transitive-bullshit/chatgpt-api/blob/9eac18f/src/types.ts#L77)
89+
[src/types.ts:83](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/types.ts#L83)
9090

9191
___
9292

@@ -96,4 +96,4 @@ ___
9696

9797
#### Defined in
9898

99-
[src/types.ts:78](https://github.com/transitive-bullshit/chatgpt-api/blob/9eac18f/src/types.ts#L78)
99+
[src/types.ts:84](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/types.ts#L84)

docs/classes/ChatGPTUnofficialProxyAPI.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
#### Defined in
3838

39-
[src/chatgpt-unofficial-proxy-api.ts:20](https://github.com/transitive-bullshit/chatgpt-api/blob/9eac18f/src/chatgpt-unofficial-proxy-api.ts#L20)
39+
[src/chatgpt-unofficial-proxy-api.ts:20](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/chatgpt-unofficial-proxy-api.ts#L20)
4040

4141
## Accessors
4242

@@ -50,7 +50,7 @@
5050

5151
#### Defined in
5252

53-
[src/chatgpt-unofficial-proxy-api.ts:66](https://github.com/transitive-bullshit/chatgpt-api/blob/9eac18f/src/chatgpt-unofficial-proxy-api.ts#L66)
53+
[src/chatgpt-unofficial-proxy-api.ts:66](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/chatgpt-unofficial-proxy-api.ts#L66)
5454

5555
`set` **accessToken**(`value`): `void`
5656

@@ -66,7 +66,7 @@
6666

6767
#### Defined in
6868

69-
[src/chatgpt-unofficial-proxy-api.ts:70](https://github.com/transitive-bullshit/chatgpt-api/blob/9eac18f/src/chatgpt-unofficial-proxy-api.ts#L70)
69+
[src/chatgpt-unofficial-proxy-api.ts:70](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/chatgpt-unofficial-proxy-api.ts#L70)
7070

7171
## Methods
7272

@@ -101,4 +101,4 @@ The response from ChatGPT
101101

102102
#### Defined in
103103

104-
[src/chatgpt-unofficial-proxy-api.ts:97](https://github.com/transitive-bullshit/chatgpt-api/blob/9eac18f/src/chatgpt-unofficial-proxy-api.ts#L97)
104+
[src/chatgpt-unofficial-proxy-api.ts:97](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/chatgpt-unofficial-proxy-api.ts#L97)

docs/interfaces/ChatMessage.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
#### Defined in
2525

26-
[src/types.ts:73](https://github.com/transitive-bullshit/chatgpt-api/blob/9eac18f/src/types.ts#L73)
26+
[src/types.ts:79](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/types.ts#L79)
2727

2828
___
2929

@@ -33,17 +33,17 @@ ___
3333

3434
#### Defined in
3535

36-
[src/types.ts:67](https://github.com/transitive-bullshit/chatgpt-api/blob/9eac18f/src/types.ts#L67)
36+
[src/types.ts:70](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/types.ts#L70)
3737

3838
___
3939

4040
### detail
4141

42-
`Optional` **detail**: `any`
42+
`Optional` **detail**: [`CreateChatCompletionResponse`](openai.CreateChatCompletionResponse.md) \| [`CreateChatCompletionStreamResponse`](CreateChatCompletionStreamResponse.md)
4343

4444
#### Defined in
4545

46-
[src/types.ts:68](https://github.com/transitive-bullshit/chatgpt-api/blob/9eac18f/src/types.ts#L68)
46+
[src/types.ts:71](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/types.ts#L71)
4747

4848
___
4949

@@ -53,7 +53,7 @@ ___
5353

5454
#### Defined in
5555

56-
[src/types.ts:63](https://github.com/transitive-bullshit/chatgpt-api/blob/9eac18f/src/types.ts#L63)
56+
[src/types.ts:66](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/types.ts#L66)
5757

5858
___
5959

@@ -63,7 +63,7 @@ ___
6363

6464
#### Defined in
6565

66-
[src/types.ts:66](https://github.com/transitive-bullshit/chatgpt-api/blob/9eac18f/src/types.ts#L66)
66+
[src/types.ts:69](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/types.ts#L69)
6767

6868
___
6969

@@ -73,7 +73,7 @@ ___
7373

7474
#### Defined in
7575

76-
[src/types.ts:71](https://github.com/transitive-bullshit/chatgpt-api/blob/9eac18f/src/types.ts#L71)
76+
[src/types.ts:76](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/types.ts#L76)
7777

7878
___
7979

@@ -83,7 +83,7 @@ ___
8383

8484
#### Defined in
8585

86-
[src/types.ts:65](https://github.com/transitive-bullshit/chatgpt-api/blob/9eac18f/src/types.ts#L65)
86+
[src/types.ts:68](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/types.ts#L68)
8787

8888
___
8989

@@ -93,4 +93,4 @@ ___
9393

9494
#### Defined in
9595

96-
[src/types.ts:64](https://github.com/transitive-bullshit/chatgpt-api/blob/9eac18f/src/types.ts#L64)
96+
[src/types.ts:67](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/types.ts#L67)
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
[chatgpt](../readme.md) / [Exports](../modules.md) / CreateChatCompletionStreamResponse
2+
3+
# Interface: CreateChatCompletionStreamResponse
4+
5+
## Hierarchy
6+
7+
- [`CreateChatCompletionDeltaResponse`](openai.CreateChatCompletionDeltaResponse.md)
8+
9+
**`CreateChatCompletionStreamResponse`**
10+
11+
## Table of contents
12+
13+
### Properties
14+
15+
- [choices](CreateChatCompletionStreamResponse.md#choices)
16+
- [created](CreateChatCompletionStreamResponse.md#created)
17+
- [id](CreateChatCompletionStreamResponse.md#id)
18+
- [model](CreateChatCompletionStreamResponse.md#model)
19+
- [object](CreateChatCompletionStreamResponse.md#object)
20+
- [usage](CreateChatCompletionStreamResponse.md#usage)
21+
22+
## Properties
23+
24+
### choices
25+
26+
**choices**: [{ `delta`: { `content?`: `string` ; `role`: [`Role`](../modules.md#role) } ; `finish_reason`: `string` ; `index`: `number` }]
27+
28+
#### Inherited from
29+
30+
[CreateChatCompletionDeltaResponse](openai.CreateChatCompletionDeltaResponse.md).[choices](openai.CreateChatCompletionDeltaResponse.md#choices)
31+
32+
#### Defined in
33+
34+
[src/types.ts:198](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/types.ts#L198)
35+
36+
___
37+
38+
### created
39+
40+
**created**: `number`
41+
42+
#### Inherited from
43+
44+
[CreateChatCompletionDeltaResponse](openai.CreateChatCompletionDeltaResponse.md).[created](openai.CreateChatCompletionDeltaResponse.md#created)
45+
46+
#### Defined in
47+
48+
[src/types.ts:196](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/types.ts#L196)
49+
50+
___
51+
52+
### id
53+
54+
**id**: `string`
55+
56+
#### Inherited from
57+
58+
[CreateChatCompletionDeltaResponse](openai.CreateChatCompletionDeltaResponse.md).[id](openai.CreateChatCompletionDeltaResponse.md#id)
59+
60+
#### Defined in
61+
62+
[src/types.ts:194](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/types.ts#L194)
63+
64+
___
65+
66+
### model
67+
68+
**model**: `string`
69+
70+
#### Inherited from
71+
72+
[CreateChatCompletionDeltaResponse](openai.CreateChatCompletionDeltaResponse.md).[model](openai.CreateChatCompletionDeltaResponse.md#model)
73+
74+
#### Defined in
75+
76+
[src/types.ts:197](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/types.ts#L197)
77+
78+
___
79+
80+
### object
81+
82+
**object**: ``"chat.completion.chunk"``
83+
84+
#### Inherited from
85+
86+
[CreateChatCompletionDeltaResponse](openai.CreateChatCompletionDeltaResponse.md).[object](openai.CreateChatCompletionDeltaResponse.md#object)
87+
88+
#### Defined in
89+
90+
[src/types.ts:195](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/types.ts#L195)
91+
92+
___
93+
94+
### usage
95+
96+
**usage**: [`CreateCompletionStreamResponseUsage`](CreateCompletionStreamResponseUsage.md)
97+
98+
#### Defined in
99+
100+
[src/types.ts:97](https://github.com/transitive-bullshit/chatgpt-api/blob/bf66500/src/types.ts#L97)

0 commit comments

Comments
 (0)