kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
Merge 9d01e7cb8a
into 73fb30bc11
commit
b6833020a4
|
@ -141,16 +141,20 @@ export class ChatGPTUnofficialProxyAPI {
|
|||
|
||||
const body: types.ConversationJSONBody = {
|
||||
action,
|
||||
messages: [
|
||||
{
|
||||
id: messageId,
|
||||
role: 'user',
|
||||
content: {
|
||||
content_type: 'text',
|
||||
parts: [text]
|
||||
}
|
||||
...(
|
||||
action === 'continue' ? {} : {
|
||||
messages: [
|
||||
{
|
||||
id: messageId,
|
||||
role: 'user',
|
||||
content: {
|
||||
content_type: 'text',
|
||||
parts: [text]
|
||||
}
|
||||
}
|
||||
],
|
||||
}
|
||||
],
|
||||
),
|
||||
model: this._model,
|
||||
parent_message_id: parentMessageId
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ export type SendMessageOptions = {
|
|||
>
|
||||
}
|
||||
|
||||
export type MessageActionType = 'next' | 'variant'
|
||||
export type MessageActionType = 'next' | 'continue' | 'variant'
|
||||
|
||||
export type SendMessageBrowserOptions = {
|
||||
conversationId?: string
|
||||
|
@ -118,8 +118,10 @@ export type ConversationJSONBody = {
|
|||
|
||||
/**
|
||||
* Prompts to provide
|
||||
*
|
||||
* Should be null when the action is 'continue'
|
||||
*/
|
||||
messages: Prompt[]
|
||||
messages?: Prompt[]
|
||||
|
||||
/**
|
||||
* The model to use
|
||||
|
|
Ładowanie…
Reference in New Issue