mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-18 08:03:36 +00:00
community[patch]: Add missing annotations (#24890)
This PR adds annotations in comunity package. Annotations are only strictly needed in subclasses of BaseModel for pydantic 2 compatibility. This PR adds some unnecessary annotations, but they're not bad to have regardless for documentation pages.
This commit is contained in:
@@ -59,8 +59,8 @@ def test_custom_formatter() -> None:
|
||||
"""Test ability to create a custom content formatter."""
|
||||
|
||||
class CustomFormatter(ContentFormatterBase):
|
||||
content_type = "application/json"
|
||||
accepts = "application/json"
|
||||
content_type: str = "application/json"
|
||||
accepts: str = "application/json"
|
||||
|
||||
def format_request_payload(self, prompt: str, model_kwargs: Dict) -> bytes: # type: ignore[override]
|
||||
input_str = json.dumps(
|
||||
@@ -101,8 +101,8 @@ def test_invalid_request_format() -> None:
|
||||
"""Test invalid request format."""
|
||||
|
||||
class CustomContentFormatter(ContentFormatterBase):
|
||||
content_type = "application/json"
|
||||
accepts = "application/json"
|
||||
content_type: str = "application/json"
|
||||
accepts: str = "application/json"
|
||||
|
||||
def format_request_payload(self, prompt: str, model_kwargs: Dict) -> bytes: # type: ignore[override]
|
||||
input_str = json.dumps(
|
||||
|
Reference in New Issue
Block a user