mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-04-18 05:39:05 +02:00
fix types
This commit is contained in:
parent
93b685a1a2
commit
68041d68ae
1 changed files with 46 additions and 95 deletions
|
|
@ -38,11 +38,15 @@ export enum EModelEndpoint {
|
||||||
export type TConversation = {
|
export type TConversation = {
|
||||||
conversationId: string;
|
conversationId: string;
|
||||||
title: string;
|
title: string;
|
||||||
user: string | null;
|
user?: string;
|
||||||
endpoint: EModelEndpoint;
|
endpoint: EModelEndpoint;
|
||||||
model: string; // for azureOpenAI, openAI, chatGPTBrowser only, eg. gpt-3.5-turbo
|
suggestions?: string[];
|
||||||
|
messages?: TMessage[];
|
||||||
|
createdAt: string;
|
||||||
|
updatedAt: string;
|
||||||
// for azureOpenAI, openAI only
|
// for azureOpenAI, openAI only
|
||||||
chatGptLabel?: string;
|
chatGptLabel?: string;
|
||||||
|
model?: string;
|
||||||
promptPrefix?: string;
|
promptPrefix?: string;
|
||||||
temperature?: number;
|
temperature?: number;
|
||||||
top_p?: number;
|
top_p?: number;
|
||||||
|
|
@ -51,40 +55,36 @@ export type TConversation = {
|
||||||
jailbreak?: boolean;
|
jailbreak?: boolean;
|
||||||
jailbreakConversationId?: string;
|
jailbreakConversationId?: string;
|
||||||
conversationSignature?: string;
|
conversationSignature?: string;
|
||||||
|
parentMessageId?: string;
|
||||||
clientId?: string;
|
clientId?: string;
|
||||||
invocationId?: string;
|
invocationId?: string;
|
||||||
toneStyle?: string;
|
toneStyle?: string;
|
||||||
suggestions?: string[];
|
|
||||||
messages?: TMessage[];
|
|
||||||
createdAt: string;
|
|
||||||
updatedAt: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TPrompt = {
|
export type TPreset = {
|
||||||
title: string,
|
title: string,
|
||||||
prompt: string,
|
endpoint: EModelEndpoint,
|
||||||
category: string,
|
conversationSignature?: string,
|
||||||
createdAt: string,
|
createdAt?: string,
|
||||||
updatedAt: string
|
updatedAt?: string,
|
||||||
};
|
presetId?: string,
|
||||||
|
user?: string,
|
||||||
export type TCustomGpt = {
|
// for azureOpenAI, openAI only
|
||||||
chatGptLabel: string,
|
|
||||||
promptPrefix: string,
|
|
||||||
value: string,
|
|
||||||
createdAt: string,
|
|
||||||
updatedAt: string,
|
|
||||||
_id: string
|
|
||||||
};
|
|
||||||
|
|
||||||
export type TModel = {
|
|
||||||
_id: string,
|
|
||||||
name: string,
|
|
||||||
value: string,
|
|
||||||
model: string,
|
|
||||||
chatGptLabel?: string,
|
chatGptLabel?: string,
|
||||||
promptPrefix?: string
|
frequence_penalty?: number,
|
||||||
};
|
model?: string,
|
||||||
|
presence_penalty?: number,
|
||||||
|
promptPrefix?: string,
|
||||||
|
temperature?: number,
|
||||||
|
top_p?: number,
|
||||||
|
//for BingAI
|
||||||
|
clientId?: string,
|
||||||
|
invocationId?: number,
|
||||||
|
jailbreak?: boolean,
|
||||||
|
jailbreakPresetId?: string,
|
||||||
|
presetSignature?: string,
|
||||||
|
toneStyle?: string,
|
||||||
|
}
|
||||||
|
|
||||||
export type TUser = {
|
export type TUser = {
|
||||||
username: string,
|
username: string,
|
||||||
|
|
@ -98,59 +98,9 @@ export type TGetConversationsResponse = {
|
||||||
pages: string | number
|
pages: string | number
|
||||||
};
|
};
|
||||||
|
|
||||||
export type TGetConversationResponse = {
|
|
||||||
data: TConversation
|
|
||||||
};
|
|
||||||
|
|
||||||
export type TGetMessagesResponse = {
|
|
||||||
data: TMessage[]
|
|
||||||
};
|
|
||||||
|
|
||||||
export type TAICompletionRequest = {
|
|
||||||
chatGptLabel?: string,
|
|
||||||
conversationId: string,
|
|
||||||
current: boolean,
|
|
||||||
isCreatedByUser: boolean,
|
|
||||||
model: string,
|
|
||||||
messageId: string,
|
|
||||||
parentMessageId: string,
|
|
||||||
overrideParentMessageId?: boolean,
|
|
||||||
promptPrefix?: string,
|
|
||||||
sender: string,
|
|
||||||
text: string
|
|
||||||
};
|
|
||||||
|
|
||||||
export type TGetModelsResponse = {
|
|
||||||
hasOpenAI: boolean,
|
|
||||||
hasChatGpt: boolean,
|
|
||||||
hasBing: boolean
|
|
||||||
};
|
|
||||||
|
|
||||||
export type TOpenAIModel = {
|
|
||||||
object: string,
|
|
||||||
id: string,
|
|
||||||
ready: boolean,
|
|
||||||
owner: string,
|
|
||||||
created: string | null,
|
|
||||||
permissions: string[] | null
|
|
||||||
};
|
|
||||||
|
|
||||||
export type TOpenAIModels = {
|
|
||||||
models: {
|
|
||||||
object: string,
|
|
||||||
data: TOpenAIModel[]
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export type TConversationUpdate = {
|
|
||||||
conversationId: string,
|
|
||||||
title?: string
|
|
||||||
};
|
|
||||||
|
|
||||||
export type TUpdateConversationRequest = {
|
export type TUpdateConversationRequest = {
|
||||||
conversationId: string,
|
conversationId: string,
|
||||||
title: string,
|
title: string,
|
||||||
withCredentials?: boolean
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export type TUpdateConversationResponse = {
|
export type TUpdateConversationResponse = {
|
||||||
|
|
@ -171,21 +121,22 @@ export type TDeleteConversationResponse = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export type TUpdateCustomGptRequest = {
|
export type TSearchResponse = {
|
||||||
value: string,
|
conversations: TConversation[],
|
||||||
chatGptLabel: string,
|
messages: TMessage[],
|
||||||
promptPrefix?: string,
|
pageNumber: string,
|
||||||
prevLabel?: string
|
pageSize: string | number,
|
||||||
|
pages: string | number
|
||||||
|
filter: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
export type TUpdateCustomGptResponse = {};
|
export type TEndpoints = {
|
||||||
|
azureOpenAI: boolean,
|
||||||
export type TDeleteCustomGptRequest = {
|
bingAI: boolean,
|
||||||
id: string
|
ChatGptBrowser: {
|
||||||
};
|
availableModels: []
|
||||||
|
}
|
||||||
export type TDeleteCustomGptResponse = {};
|
OpenAI: {
|
||||||
|
availableModels: []
|
||||||
export type TGetCustomGptsResponse = {};
|
}
|
||||||
|
};
|
||||||
export type TSearchResults = {};
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue