mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-11 11:56:53 +08:00
Feat/assistant app (#2086)
Co-authored-by: chenhe <guchenhe@gmail.com> Co-authored-by: Pascal M <11357019+perzeuss@users.noreply.github.com>
This commit is contained in:
34
api/core/tools/entities/tool_bundle.py
Normal file
34
api/core/tools/entities/tool_bundle.py
Normal file
@@ -0,0 +1,34 @@
|
||||
from pydantic import BaseModel
|
||||
from typing import Dict, Optional, Any, List
|
||||
|
||||
from core.tools.entities.tool_entities import ToolProviderType, ToolParamter
|
||||
|
||||
class ApiBasedToolBundle(BaseModel):
|
||||
"""
|
||||
This class is used to store the schema information of an api based tool. such as the url, the method, the parameters, etc.
|
||||
"""
|
||||
# server_url
|
||||
server_url: str
|
||||
# method
|
||||
method: str
|
||||
# summary
|
||||
summary: Optional[str] = None
|
||||
# operation_id
|
||||
operation_id: str = None
|
||||
# parameters
|
||||
parameters: Optional[List[ToolParamter]] = None
|
||||
# author
|
||||
author: str
|
||||
# icon
|
||||
icon: Optional[str] = None
|
||||
# openapi operation
|
||||
openapi: dict
|
||||
|
||||
class AppToolBundle(BaseModel):
|
||||
"""
|
||||
This class is used to store the schema information of an tool for an app.
|
||||
"""
|
||||
type: ToolProviderType
|
||||
credential: Optional[Dict[str, Any]] = None
|
||||
provider_id: str
|
||||
tool_name: str
|
||||
Reference in New Issue
Block a user