fix: Fix typo in credentials field name (#2155)

This commit is contained in:
Yeuoly
2024-01-24 12:00:34 +08:00
committed by GitHub
parent a31b502668
commit 57024614bd
23 changed files with 51 additions and 51 deletions

View File

@@ -10,4 +10,4 @@ identity:
zh_Hans: 图表生成是一个用于生成可视化图表的工具,你可以通过它来生成柱状图、折线图、饼图等各类图表
pt_BR: O Gerador de gráficos é uma ferramenta para gerar gráficos estatísticos como gráfico de barras, gráfico de linhas, gráfico de pizza, etc.
icon: icon.png
credentails_for_provider:
credentials_for_provider:

View File

@@ -10,7 +10,7 @@ identity:
zh_Hans: DALL-E 绘画
pt_BR: DALL-E art
icon: icon.png
credentails_for_provider:
credentials_for_provider:
openai_api_key:
type: secret-input
required: true

View File

@@ -10,7 +10,7 @@ identity:
zh_Hans: GoogleSearch
pt_BR: Google
icon: icon.svg
credentails_for_provider:
credentials_for_provider:
serpapi_api_key:
type: secret-input
required: true

View File

@@ -10,7 +10,7 @@ identity:
zh_Hans: Stable Diffusion 是一个可以在本地部署的图片生成的工具。
pt_BR: Stable Diffusion is a tool for generating images which can be deployed locally.
icon: icon.png
credentails_for_provider:
credentials_for_provider:
base_url:
type: secret-input
required: true

View File

@@ -10,4 +10,4 @@ identity:
zh_Hans: 一个用于获取当前时间的工具。
pt_BR: A tool for getting the current time.
icon: icon.svg
credentails_for_provider:
credentials_for_provider:

View File

@@ -10,7 +10,7 @@ identity:
zh_Hans: 一个将 PNG 和 JPG 图像快速轻松地转换为 SVG 矢量图的工具。
pt_BR: Convert your PNG and JPG images to SVG vectors quickly and easily. Fully automatically. Using AI.
icon: icon.png
credentails_for_provider:
credentials_for_provider:
api_key_name:
type: secret-input
required: true

View File

@@ -10,4 +10,4 @@ identity:
zh_Hans: 一个用于抓取网页的工具。
pt_BR: Web Scrapper tool kit is used to scrape web
icon: icon.svg
credentails_for_provider:
credentials_for_provider:

View File

@@ -10,4 +10,4 @@ identity:
zh_Hans: 维基百科是一个由全世界的志愿者创建和编辑的免费在线百科全书。
pt_BR: Wikipedia is a free online encyclopedia, created and edited by volunteers around the world.
icon: icon.svg
credentails_for_provider:
credentials_for_provider:

View File

@@ -10,7 +10,7 @@ identity:
zh_Hans: WolframAlpha 是一个强大的计算知识引擎。
pt_BR: WolframAlpha is a powerful computational knowledge engine.
icon: icon.svg
credentails_for_provider:
credentials_for_provider:
appid:
type: secret-input
required: true

View File

@@ -10,4 +10,4 @@ identity:
zh_Hans: 雅虎财经,获取并整理出最新的新闻、股票报价等一切你想要的财经信息。
pt_BR: Finance, and Yahoo! get the latest news, stock quotes, and interactive chart with Yahoo!
icon: icon.png
credentails_for_provider:
credentials_for_provider:

View File

@@ -10,7 +10,7 @@ identity:
zh_Hans: Youtube油管是全球最大的视频分享网站用户可以在上面上传、观看和分享视频。
pt_BR: Youtube é o maior site de compartilhamento de vídeos do mundo, onde os usuários podem fazer upload, assistir e compartilhar vídeos.
icon: icon.png
credentails_for_provider:
credentials_for_provider:
google_api_key:
type: secret-input
required: true

View File

@@ -30,14 +30,14 @@ class BuiltinToolProviderController(ToolProviderController):
except:
raise ToolProviderNotFoundError(f'can not load provider yaml for {provider}')
if 'credentails_for_provider' in provider_yaml and provider_yaml['credentails_for_provider'] is not None:
if 'credentials_for_provider' in provider_yaml and provider_yaml['credentials_for_provider'] is not None:
# set credentials name
for credential_name in provider_yaml['credentails_for_provider']:
provider_yaml['credentails_for_provider'][credential_name]['name'] = credential_name
for credential_name in provider_yaml['credentials_for_provider']:
provider_yaml['credentials_for_provider'][credential_name]['name'] = credential_name
super().__init__(**{
'identity': provider_yaml['identity'],
'credentials_schema': provider_yaml['credentails_for_provider'] if 'credentails_for_provider' in provider_yaml else None,
'credentials_schema': provider_yaml['credentials_for_provider'] if 'credentials_for_provider' in provider_yaml else None,
})
def _get_bulitin_tools(self) -> List[Tool]:
@@ -75,7 +75,7 @@ class BuiltinToolProviderController(ToolProviderController):
self.tools = tools
return tools
def get_credentails_schema(self) -> Dict[str, ToolProviderCredentials]:
def get_credentials_schema(self) -> Dict[str, ToolProviderCredentials]:
"""
returns the credentials schema of the provider
@@ -86,14 +86,14 @@ class BuiltinToolProviderController(ToolProviderController):
return self.credentials_schema.copy()
def user_get_credentails_schema(self) -> UserToolProviderCredentials:
def user_get_credentials_schema(self) -> UserToolProviderCredentials:
"""
returns the credentials schema of the provider, this method is used for user
:return: the credentials schema
"""
credentials = self.credentials_schema.copy()
return UserToolProviderCredentials(credentails=credentials)
return UserToolProviderCredentials(credentials=credentials)
def get_tools(self) -> List[Tool]:
"""

View File

@@ -15,7 +15,7 @@ class ToolProviderController(BaseModel, ABC):
tools: Optional[List[Tool]] = None
credentials_schema: Optional[Dict[str, ToolProviderCredentials]] = None
def get_credentails_schema(self) -> Dict[str, ToolProviderCredentials]:
def get_credentials_schema(self) -> Dict[str, ToolProviderCredentials]:
"""
returns the credentials schema of the provider
@@ -23,14 +23,14 @@ class ToolProviderController(BaseModel, ABC):
"""
return self.credentials_schema.copy()
def user_get_credentails_schema(self) -> UserToolProviderCredentials:
def user_get_credentials_schema(self) -> UserToolProviderCredentials:
"""
returns the credentials schema of the provider, this method is used for user
:return: the credentials schema
"""
credentials = self.credentials_schema.copy()
return UserToolProviderCredentials(credentails=credentials)
return UserToolProviderCredentials(credentials=credentials)
@abstractmethod
def get_tools(self) -> List[Tool]: