feat: add icons to API components and update Python icon SVG (#4794)

* add icons: wikipedia, serpapi, searchapi, glean, python, bing

* update glean icon

* formatting files

* ✨ (create_data.py): add an icon attribute with the value "ListFilter" to improve visual representation of the component
📝 (python_code_structured_tool.py): update the icon attribute value from "🐍" to "Python" for better clarity and consistency

---------

Co-authored-by: anovazzi1 <otavio2204@gmail.com>
This commit is contained in:
Cristhian Zanforlin Lousa 2024-11-22 18:13:13 -03:00 • committed by GitHub
commit 214d5a9f07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 8667 additions and 184 deletions

View file

@ -14,6 +14,7 @@ class CreateDataComponent(Component):
name: str = "CreateData"
MAX_FIELDS = 15 # Define a constant for maximum number of fields
legacy = True
icon = "ListFilter"
inputs = [
IntInput(

View file

@ -13,6 +13,7 @@ class BingSearchAPIComponent(LCToolComponent):
display_name = "Bing Search API"
description = "Call the Bing Search API."
name = "BingSearchAPI"
icon = "Bing"
inputs = [
SecretStrInput(name="bing_subscription_key", display_name="Bing Subscription Key"),

View file

@ -100,6 +100,7 @@ class GleanSearchAPIComponent(LCToolComponent):
display_name = "Glean Search API"
description = "Call Glean Search API"
name = "GleanAPI"
icon = "Glean"
inputs = [
StrInput(

View file

@ -41,7 +41,7 @@ class PythonCodeStructuredTool(LCToolComponent):
description = "structuredtool dataclass code to tool"
documentation = "https://python.langchain.com/docs/modules/tools/custom_tools/#structuredtool-dataclass"
name = "PythonCodeStructuredTool"
icon = "🐍"
icon = "Python"
field_order = ["name", "description", "tool_code", "return_direct", "tool_function"]
legacy: bool = True

View file

@ -16,6 +16,7 @@ class PythonREPLToolComponent(LCToolComponent):
display_name = "Python REPL"
description = "A tool for running Python code in a REPL environment."
name = "PythonREPLTool"
icon = "Python"
inputs = [
StrInput(

View file

@ -15,6 +15,7 @@ class SearchAPIComponent(LCToolComponent):
description: str = "Call the searchapi.io API with result limiting"
name = "SearchAPI"
documentation: str = "https://www.searchapi.io/docs/google"
icon = "SearchAPI"
inputs = [
MessageTextInput(name="engine", display_name="Engine", value="google"),

View file

@ -33,6 +33,7 @@ class SerpAPIComponent(LCToolComponent):
display_name = "Serp Search API"
description = "Call Serp Search API with result limiting"
name = "SerpAPI"
icon = "SerpSearch"
inputs = [
SecretStrInput(name="serpapi_api_key", display_name="SerpAPI API Key", required=True),

View file

@ -56,6 +56,7 @@ class WikidataAPIComponent(LCToolComponent):
display_name = "Wikidata API"
description = "Performs a search using the Wikidata API."
name = "WikidataAPI"
icon = "Wikipedia"
inputs = [
MultilineInput(

View file

@ -13,6 +13,7 @@ class WikipediaAPIComponent(LCToolComponent):
display_name = "Wikipedia API"
description = "Call Wikipedia API."
name = "WikipediaAPI"
icon = "Wikipedia"
inputs = [
MultilineInput(