refactor/marketplace react query (#29028)

Co-authored-by: zhsama <torvalds@linux.do>
This commit is contained in:
yyh
2025-12-03 18:30:20 +08:00
committed by GitHub
parent 0343374d52
commit 2e0c2e8482
11 changed files with 244 additions and 176 deletions

View File

@ -21,9 +21,6 @@ export type ConversationListResponse = {
logs: Conversation[]
}
export const fetchLogs = (url: string) =>
fetch(url).then<ConversationListResponse>(r => r.json())
export const CompletionParams = ['temperature', 'top_p', 'presence_penalty', 'max_token', 'stop', 'frequency_penalty'] as const
export type CompletionParamType = typeof CompletionParams[number]

View File

@ -1,17 +0,0 @@
export type User = {
id: string
firstName: string
lastName: string
name: string
phone: string
username: string
email: string
avatar: string
}
export type UserResponse = {
users: User[]
}
export const fetchUsers = (url: string) =>
fetch(url).then<UserResponse>(r => r.json())