mirror of
https://github.com/wassname/chatGPTBox.git
synced 2026-07-27 11:20:47 +08:00
+26
-12
@@ -1,27 +1,41 @@
|
||||
/**
|
||||
* @typedef {object} BingWeb
|
||||
* @property {string|null} conversationSignature
|
||||
* @property {string|null} conversationId
|
||||
* @property {string|null} clientId
|
||||
* @property {string|null} invocationId
|
||||
*/
|
||||
/**
|
||||
* @typedef {object} Session
|
||||
* @property {string|null} question
|
||||
* @property {Object[]|null} conversationRecords
|
||||
* @property {string|null} conversationId - chatGPT web mode
|
||||
* @property {string|null} messageId - chatGPT web mode
|
||||
* @property {string|null} parentMessageId - chatGPT web mode
|
||||
* @property {Object[]|null} conversationRecords
|
||||
* @property {BingWeb} bingWeb
|
||||
*/
|
||||
/**
|
||||
* @param {Session} session
|
||||
* @param {string|null} question
|
||||
* @param {Object[]|null} conversationRecords
|
||||
* @returns {Session}
|
||||
*/
|
||||
export function initSession({
|
||||
question = null,
|
||||
conversationId = null,
|
||||
messageId = null,
|
||||
parentMessageId = null,
|
||||
conversationRecords = [],
|
||||
} = {}) {
|
||||
export function initSession({ question = null, conversationRecords = [] } = {}) {
|
||||
return {
|
||||
// common
|
||||
question,
|
||||
conversationId,
|
||||
messageId,
|
||||
parentMessageId,
|
||||
conversationRecords,
|
||||
|
||||
// chatgpt-web
|
||||
conversationId: null,
|
||||
messageId: null,
|
||||
parentMessageId: null,
|
||||
|
||||
// bing
|
||||
bingWeb: {
|
||||
conversationSignature: null,
|
||||
conversationId: null,
|
||||
clientId: null,
|
||||
invocationId: null,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user