* 在设置的高级面板里自定义temperature和top_p * change default temperature from 0.8 to 0.5 * pref: 检查代码,增加仅 api 的接口判断 * chore: 锁定 pnpm-lock.yaml --------- Co-authored-by: ChenZhaoYu <790348264@qq.com>
35 lines
704 B
TypeScript
35 lines
704 B
TypeScript
import type { FetchFn } from 'chatgpt'
|
|
|
|
export interface RequestProps {
|
|
prompt: string
|
|
options?: ChatContext
|
|
systemMessage: string
|
|
temperature?: number
|
|
top_p?: number
|
|
}
|
|
|
|
export interface ChatContext {
|
|
conversationId?: string
|
|
parentMessageId?: string
|
|
}
|
|
|
|
export interface ChatGPTUnofficialProxyAPIOptions {
|
|
accessToken: string
|
|
apiReverseProxyUrl?: string
|
|
model?: string
|
|
debug?: boolean
|
|
headers?: Record<string, string>
|
|
fetch?: FetchFn
|
|
}
|
|
|
|
export interface ModelConfig {
|
|
apiModel?: ApiModel
|
|
reverseProxy?: string
|
|
timeoutMs?: number
|
|
socksProxy?: string
|
|
httpsProxy?: string
|
|
balance?: string
|
|
}
|
|
|
|
export type ApiModel = 'ChatGPTAPI' | 'ChatGPTUnofficialProxyAPI' | undefined
|