Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
Chatgpt Puppeteer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Chatgpt Puppeteer
Commits
700cb68c
Commit
700cb68c
authored
Dec 06, 2022
by
ItzBlinkzy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced typo converstationId with conversationId
parent
542d1cdb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
docs/classes/ChatGPTAPI.md
docs/classes/ChatGPTAPI.md
+1
-1
src/chatgpt-api.ts
src/chatgpt-api.ts
+3
-3
No files found.
docs/classes/ChatGPTAPI.md
View file @
700cb68c
...
@@ -95,7 +95,7 @@ the response.
...
@@ -95,7 +95,7 @@ the response.
| :------ | :------ | :------ |
| :------ | :------ | :------ |
|
`message`
|
`string`
| The plaintext message to send. |
|
`message`
|
`string`
| The plaintext message to send. |
|
`opts`
|
`Object`
| - |
|
`opts`
|
`Object`
| - |
|
`opts.convers
t
ationId?`
|
`string`
| - |
|
`opts.conversationId?`
|
`string`
| - |
|
`opts.onProgress?`
| (
`partialResponse`
:
`string`
) =>
`void`
| - |
|
`opts.onProgress?`
| (
`partialResponse`
:
`string`
) =>
`void`
| - |
#### Returns
#### Returns
...
...
src/chatgpt-api.ts
View file @
700cb68c
...
@@ -86,11 +86,11 @@ export class ChatGPTAPI {
...
@@ -86,11 +86,11 @@ export class ChatGPTAPI {
async
sendMessage
(
async
sendMessage
(
message
:
string
,
message
:
string
,
opts
:
{
opts
:
{
convers
t
ationId
?:
string
conversationId
?:
string
onProgress
?:
(
partialResponse
:
string
)
=>
void
onProgress
?:
(
partialResponse
:
string
)
=>
void
}
=
{}
}
=
{}
):
Promise
<
string
>
{
):
Promise
<
string
>
{
const
{
convers
t
ationId
=
uuidv4
(),
onProgress
}
=
opts
const
{
conversationId
=
uuidv4
(),
onProgress
}
=
opts
const
accessToken
=
await
this
.
refreshAccessToken
()
const
accessToken
=
await
this
.
refreshAccessToken
()
...
@@ -107,7 +107,7 @@ export class ChatGPTAPI {
...
@@ -107,7 +107,7 @@ export class ChatGPTAPI {
}
}
],
],
model
:
'
text-davinci-002-render
'
,
model
:
'
text-davinci-002-render
'
,
parent_message_id
:
convers
t
ationId
parent_message_id
:
conversationId
}
}
const
url
=
`
${
this
.
_backendApiBaseUrl
}
/conversation`
const
url
=
`
${
this
.
_backendApiBaseUrl
}
/conversation`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment