all tools

This commit is contained in:
StyleZhang
2024-03-22 13:08:28 +08:00
parent ce2b2755af
commit 4f3872277c
14 changed files with 217 additions and 377 deletions

View File

@ -1,5 +1,6 @@
import { get, post } from './base'
import type { Collection, CustomCollectionBackend, CustomParamSchema, Tool, ToolCredential } from '@/app/components/tools/types'
import type { ToolWithProvider } from '@/app/components/workflow/types'
export const fetchCollectionList = () => {
return get<Collection[]>('/workspaces/current/tool-providers')
@ -86,3 +87,11 @@ export const testAPIAvailable = (payload: any) => {
},
})
}
export const fetchAllBuiltInTools = () => {
return get<ToolWithProvider[]>('/workspaces/current/tools/builtin')
}
export const fetchAllCustomTools = () => {
return get<ToolWithProvider[]>('/workspaces/current/tools/api')
}