File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1450,7 +1450,7 @@ export default (props: {}) => {
14501450 variant = "destructive"
14511451 className = "w-full"
14521452 onClick = { ( ) => {
1453- chatStore . chatPrice = null ;
1453+ chatStore . chatPrice = undefined ;
14541454 setChatStore ( { ...chatStore } ) ;
14551455 } }
14561456 >
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ export interface ChatStore {
4444 json_mode : boolean ;
4545 logprobs : boolean ;
4646 contents_for_index : string [ ] ;
47- chatPrice : ModelPricing | null ;
47+ chatPrice ? : ModelPricing ;
4848}
4949
5050export interface TemplateChatStore extends ChatStore {
Original file line number Diff line number Diff line change 44 CHATGPT_API_WEB_VERSION ,
55} from "@/const" ;
66import { ChatStore , ChatStoreMessage } from "@/types/chatstore" ;
7- import { models } from "@/types/models" ;
7+ import { ModelPricing , models } from "@/types/models" ;
88
99interface NewChatStoreOptions {
1010 apiKey ?: string ;
@@ -36,6 +36,7 @@ interface NewChatStoreOptions {
3636 logprobs ?: boolean ;
3737 maxTokens ?: number ;
3838 use_this_history ?: ChatStoreMessage [ ] ;
39+ chatPrice ?: ModelPricing ;
3940}
4041
4142export const newChatStore = ( options : NewChatStoreOptions ) : ChatStore => {
@@ -82,5 +83,6 @@ export const newChatStore = (options: NewChatStoreOptions): ChatStore => {
8283 tts_format : options . tts_format ?? "mp3" ,
8384 logprobs : options . logprobs ?? false ,
8485 contents_for_index : [ ] ,
86+ chatPrice : options . chatPrice ?? undefined ,
8587 } ;
8688} ;
You can’t perform that action at this time.
0 commit comments