Skip to content

Commit

Permalink
🐁
Browse files Browse the repository at this point in the history
  • Loading branch information
transitive-bullshit committed Apr 2, 2023
1 parent 8ad7ba9 commit 6c309ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/chatgpt-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export class ChatGPTAPI {
onProgress,
stream = onProgress ? true : false,
completionParams,
conversationId = ''
conversationId
} = opts

let { abortSignal } = opts
Expand All @@ -159,9 +159,9 @@ export class ChatGPTAPI {
const message: types.ChatMessage = {
role: 'user',
id: messageId,
conversationId,
parentMessageId,
text,
conversationId
text
}

const latestQuestion = message
Expand All @@ -174,9 +174,9 @@ export class ChatGPTAPI {
const result: types.ChatMessage = {
role: 'assistant',
id: uuidv4(),
conversationId,
parentMessageId: messageId,
text: '',
conversationId
text: ''
}

const responseP = new Promise<types.ChatMessage>(
Expand Down
3 changes: 2 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ export interface ChatMessage {

// relevant for both ChatGPTAPI and ChatGPTUnofficialProxyAPI
parentMessageId?: string
// only relevant for ChatGPTUnofficialProxyAPI

// only relevant for ChatGPTUnofficialProxyAPI (optional for ChatGPTAPI)
conversationId?: string
}

Expand Down

0 comments on commit 6c309ce

Please sign in to comment.