Преглед изворни кода

chore: remove unused parameter (#15558)

tags/1.1.0
crazywoola пре 7 месеци
родитељ
комит
258736f505
No account linked to committer's email address
3 измењених фајлова са 28 додато и 31 уклоњено
  1. 0
    1
      api/services/workspace_service.py
  2. 0
    1
      web/context/app-context.tsx
  3. 28
    29
      web/models/common.ts

+ 0
- 1
api/services/workspace_service.py Прегледај датотеку

"plan": tenant.plan, "plan": tenant.plan,
"status": tenant.status, "status": tenant.status,
"created_at": tenant.created_at, "created_at": tenant.created_at,
"in_trail": True,
"trial_end_reason": None, "trial_end_reason": None,
"role": "normal", "role": "normal",
} }

+ 0
- 1
web/context/app-context.tsx Прегледај датотеку

created_at: 0, created_at: 0,
role: 'normal', role: 'normal',
providers: [], providers: [],
in_trail: true,
} }


const AppContext = createContext<AppContextValue>({ const AppContext = createContext<AppContextValue>({

+ 28
- 29
web/models/common.ts Прегледај датотеку

import type { I18nText } from '@/i18n/language' import type { I18nText } from '@/i18n/language'


export interface CommonResponse {
export type CommonResponse = {
result: 'success' | 'fail' result: 'success' | 'fail'
} }


export interface OauthResponse {
export type OauthResponse = {
redirect_url: string redirect_url: string
} }


export interface SetupStatusResponse {
export type SetupStatusResponse = {
step: 'finished' | 'not_started' step: 'finished' | 'not_started'
setup_at?: Date setup_at?: Date
} }


export interface InitValidateStatusResponse {
export type InitValidateStatusResponse = {
status: 'finished' | 'not_started' status: 'finished' | 'not_started'
} }


export interface UserProfileResponse {
export type UserProfileResponse = {
id: string id: string
name: string name: string
email: string email: string
created_at?: string created_at?: string
} }


export interface UserProfileOriginResponse {
export type UserProfileOriginResponse = {
json: () => Promise<UserProfileResponse> json: () => Promise<UserProfileResponse>
bodyUsed: boolean bodyUsed: boolean
headers: any headers: any
} }


export interface LangGeniusVersionResponse {
export type LangGeniusVersionResponse = {
current_version: string current_version: string
latest_version: string latest_version: string
version: string version: string
current_env: string current_env: string
} }


export interface TenantInfoResponse {
export type TenantInfoResponse = {
name: string name: string
created_at: string created_at: string
providers: Array<{ providers: Array<{
Tongyi = 'tongyi', Tongyi = 'tongyi',
ChatGLM = 'chatglm', ChatGLM = 'chatglm',
} }
export interface ProviderAzureToken {
export type ProviderAzureToken = {
openai_api_base?: string openai_api_base?: string
openai_api_key?: string openai_api_key?: string
} }
export interface ProviderAnthropicToken {
export type ProviderAnthropicToken = {
anthropic_api_key?: string anthropic_api_key?: string
} }
export interface ProviderTokenType {
export type ProviderTokenType = {
[ProviderName.OPENAI]: string [ProviderName.OPENAI]: string
[ProviderName.AZURE_OPENAI]: ProviderAzureToken [ProviderName.AZURE_OPENAI]: ProviderAzureToken
[ProviderName.ANTHROPIC]: ProviderAnthropicToken [ProviderName.ANTHROPIC]: ProviderAnthropicToken
quota_used: number quota_used: number
} }


export interface AccountIntegrate {
export type AccountIntegrate = {
provider: 'google' | 'github' provider: 'google' | 'github'
created_at: number created_at: number
is_bound: boolean is_bound: boolean
link: string link: string
} }


export interface IWorkspace {
export type IWorkspace = {
id: string id: string
name: string name: string
plan: string plan: string
export type ICurrentWorkspace = Omit<IWorkspace, 'current'> & { export type ICurrentWorkspace = Omit<IWorkspace, 'current'> & {
role: 'owner' | 'admin' | 'editor' | 'dataset_operator' | 'normal' role: 'owner' | 'admin' | 'editor' | 'dataset_operator' | 'normal'
providers: Provider[] providers: Provider[]
in_trail: boolean
trial_end_reason?: string trial_end_reason?: string
custom_config?: { custom_config?: {
remove_webapp_brand?: boolean remove_webapp_brand?: boolean
} }
} }


export interface DataSourceNotionPage {
export type DataSourceNotionPage = {
page_icon: null | { page_icon: null | {
type: string | null type: string | null
url: string | null url: string | null


export type DataSourceNotionPageMap = Record<string, DataSourceNotionPage & { workspace_id: string }> export type DataSourceNotionPageMap = Record<string, DataSourceNotionPage & { workspace_id: string }>


export interface DataSourceNotionWorkspace {
export type DataSourceNotionWorkspace = {
workspace_name: string workspace_name: string
workspace_id: string workspace_id: string
workspace_icon: string | null workspace_icon: string | null


export type DataSourceNotionWorkspaceMap = Record<string, DataSourceNotionWorkspace> export type DataSourceNotionWorkspaceMap = Record<string, DataSourceNotionWorkspace>


export interface DataSourceNotion {
export type DataSourceNotion = {
id: string id: string
provider: string provider: string
is_bound: boolean is_bound: boolean
jinaReader = 'jinareader', jinaReader = 'jinareader',
} }


export interface FirecrawlConfig {
export type FirecrawlConfig = {
api_key: string api_key: string
base_url: string base_url: string
} }


export interface DataSourceItem {
export type DataSourceItem = {
id: string id: string
category: DataSourceCategory category: DataSourceCategory
provider: DataSourceProvider provider: DataSourceProvider
updated_at: number updated_at: number
} }


export interface DataSources {
export type DataSources = {
sources: DataSourceItem[] sources: DataSourceItem[]
} }


export interface GithubRepo {
export type GithubRepo = {
stargazers_count: number stargazers_count: number
} }


export interface PluginProvider {
export type PluginProvider = {
tool_name: string tool_name: string
is_enabled: boolean is_enabled: boolean
credentials: { credentials: {
} | null } | null
} }


export interface FileUploadConfigResponse {
export type FileUploadConfigResponse = {
batch_count_limit: number batch_count_limit: number
image_file_size_limit?: number | string // default is 10MB image_file_size_limit?: number | string // default is 10MB
file_size_limit: number // default is 15MB file_size_limit: number // default is 15MB
invitation_results: InvitationResult[] invitation_results: InvitationResult[]
} }


export interface ApiBasedExtension {
export type ApiBasedExtension = {
id?: string id?: string
name?: string name?: string
api_endpoint?: string api_endpoint?: string
api_key?: string api_key?: string
} }


export interface CodeBasedExtensionForm {
export type CodeBasedExtensionForm = {
type: string type: string
label: I18nText label: I18nText
variable: string variable: string
max_length?: number max_length?: number
} }


export interface CodeBasedExtensionItem {
export type CodeBasedExtensionItem = {
name: string name: string
label: any label: any
form_schema: CodeBasedExtensionForm[] form_schema: CodeBasedExtensionForm[]
} }
export interface CodeBasedExtension {
export type CodeBasedExtension = {
module: string module: string
data: CodeBasedExtensionItem[] data: CodeBasedExtensionItem[]
} }


export interface ExternalDataTool {
export type ExternalDataTool = {
type?: string type?: string
label?: string label?: string
icon?: string icon?: string
} & Partial<Record<string, any>> } & Partial<Record<string, any>>
} }


export interface ModerateResponse {
export type ModerateResponse = {
flagged: boolean flagged: boolean
text: string text: string
} }

Loading…
Откажи
Сачувај