mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-06 21:43:44 +00:00
community[patch]: Add missing type annotations (#22758)
Add missing type annotations to objects in community. These missing type annotations will raise type errors in pydantic 2.
This commit is contained in:
@@ -23,9 +23,9 @@ class EdenAiExplicitImageTool(EdenaiTool):
|
||||
|
||||
"""
|
||||
|
||||
name = "edenai_image_explicit_content_detection"
|
||||
name: str = "edenai_image_explicit_content_detection"
|
||||
|
||||
description = (
|
||||
description: str = (
|
||||
"A wrapper around edenai Services Explicit image detection. "
|
||||
"""Useful for when you have to extract Explicit Content from images.
|
||||
it detects adult only content in images,
|
||||
@@ -35,9 +35,9 @@ class EdenAiExplicitImageTool(EdenaiTool):
|
||||
"Input should be the string url of the image ."
|
||||
)
|
||||
|
||||
combine_available = True
|
||||
feature = "image"
|
||||
subfeature = "explicit_content"
|
||||
combine_available: bool = True
|
||||
feature: str = "image"
|
||||
subfeature: str = "explicit_content"
|
||||
|
||||
def _parse_json(self, json_data: dict) -> str:
|
||||
result_str = f"nsfw_likelihood: {json_data['nsfw_likelihood']}\n"
|
||||
|
Reference in New Issue
Block a user