mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-26 13:59:49 +00:00
huggingface,box[patch]: Add missing default None (#26323)
This PR was autogenerated using gritql ``` engine marzano(0.1) language python class_definition(name=$C, $body, superclasses=$S) where { $C <: ! "Config", // Does not work in this scope, but works after class_definition $body <: block($statements), $statements <: some bubble assignment(left=$x, right=$y, type=$t) as $A where { or { $y <: `Field($z)`, $x <: "model_config" } }, // And has either Any or Optional fields without a default $statements <: some bubble assignment(left=$x, right=$y, type=$t) as $A where { $t <: or { r"Optional.*", r"Any", r"Union[None, .*]", r"Union[.*, None, .*]", r"Union[.*, None]", }, $y <: ., // Match empty node $t => `$t = None`, }, } ``` ```shell grit apply 'class_definition(name=$C, $body, superclasses=$S) where { $C <: ! "Config", // Does not work in this scope, but works after class_definition $body <: block($statements), $statements <: some bubble assignment(left=$x, right=$y, type=$t) as $A where { or { $y <: `Field($z)`, $x <: "model_config" } }, // And has either Any or Optional fields without a default $statements <: some bubble assignment(left=$x, right=$y, type=$t) as $A where { $t <: or { r"Optional.*", r"Any", r"Union[None, .*]", r"Union[.*, None, .*]", r"Union[.*, None]", }, $y <: ., // Match empty node $t => `$t = None`, }, } ' --language python . ```
This commit is contained in:
@@ -173,7 +173,7 @@ class BoxLoader(BaseLoader, BaseModel):
|
||||
"""character_limit is an int that caps the number of characters to
|
||||
return per document."""
|
||||
|
||||
_box: Optional[_BoxAPIWrapper]
|
||||
_box: Optional[_BoxAPIWrapper] = None
|
||||
|
||||
model_config = ConfigDict(
|
||||
arbitrary_types_allowed=True,
|
||||
|
@@ -128,7 +128,7 @@ class BoxRetriever(BaseRetriever):
|
||||
"""character_limit is an int that caps the number of characters to
|
||||
return per document."""
|
||||
|
||||
_box: Optional[_BoxAPIWrapper]
|
||||
_box: Optional[_BoxAPIWrapper] = None
|
||||
|
||||
model_config = ConfigDict(
|
||||
arbitrary_types_allowed=True,
|
||||
|
@@ -485,7 +485,7 @@ class _BoxAPIWrapper(BaseModel):
|
||||
"""character_limit is an int that caps the number of characters to
|
||||
return per document."""
|
||||
|
||||
_box: Optional[box_sdk_gen.BoxClient]
|
||||
_box: Optional[box_sdk_gen.BoxClient] = None
|
||||
|
||||
model_config = ConfigDict(
|
||||
arbitrary_types_allowed=True,
|
||||
|
@@ -54,7 +54,7 @@ class HuggingFacePipeline(BaseLLM):
|
||||
hf = HuggingFacePipeline(pipeline=pipe)
|
||||
"""
|
||||
|
||||
pipeline: Any #: :meta private:
|
||||
pipeline: Any = None #: :meta private:
|
||||
model_id: str = DEFAULT_MODEL_ID
|
||||
"""Model name to use."""
|
||||
model_kwargs: Optional[dict] = None
|
||||
|
Reference in New Issue
Block a user