Files
chatgpt-web/service/src/types.ts
ZuoNing 439104f195 fix: 查询使用量支持代理&修正使用量文案 (#1296)
* fix: 查询使用量支持代理&修正使用量文案

* fix: 修复默认错误

* chore: 移除打印

---------

Co-authored-by: ChenZhaoYu <790348264@qq.com>
2023-04-08 11:47:00 +08:00

35 lines
702 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
usage?: string
}
export type ApiModel = 'ChatGPTAPI' | 'ChatGPTUnofficialProxyAPI' | undefined