Feat/customizable file upload config (#818)

This commit is contained in:
Matri
2023-08-16 23:14:27 +08:00
committed by GitHub
parent b7c29ea1b6
commit 155a4733f6
13 changed files with 122 additions and 83 deletions

View File

@@ -2,6 +2,7 @@ import type { Fetcher } from 'swr'
import { del, get, patch, post, put } from './base'
import type {
AccountIntegrate, CommonResponse, DataSourceNotion,
FileUploadConfigResponse,
ICurrentWorkspace,
IWorkspace, LangGeniusVersionResponse, Member,
OauthResponse, PluginProvider, Provider, ProviderAnthropicToken, ProviderAzureToken,
@@ -178,3 +179,7 @@ export const updateDefaultModel: Fetcher<CommonResponse, { url: string; body: an
export const submitFreeQuota: Fetcher<{ type: string; redirect_url?: string; result?: string }, string> = (url) => {
return post(url) as Promise<{ type: string; redirect_url?: string; result?: string }>
}
export const fetchFileUploadConfig: Fetcher<FileUploadConfigResponse, { url: string }> = ({ url }) => {
return get(url) as Promise<FileUploadConfigResponse>
}