diff --git a/python/knext/knext/graph/client.py b/python/knext/knext/graph/client.py index 00c42b26..08ba7fbc 100644 --- a/python/knext/knext/graph/client.py +++ b/python/knext/knext/graph/client.py @@ -99,4 +99,4 @@ if __name__ == "__main__": "Entity", [{"name": "Anxiety_and_nervousness", "type": "Entity"}] ) for o in out: - print(o) \ No newline at end of file + print(o) diff --git a/python/knext/knext/search/rest/models/text_search_request.py b/python/knext/knext/search/rest/models/text_search_request.py index deb0ac00..046301ee 100644 --- a/python/knext/knext/search/rest/models/text_search_request.py +++ b/python/knext/knext/search/rest/models/text_search_request.py @@ -81,9 +81,11 @@ class TextSearchRequest(object): self.project_id = project_id self.query_string = query_string - self.label_constraints = label_constraints + if label_constraints is not None: + self.label_constraints = label_constraints self.topk = topk - self.params = params + if params is not None: + self.params = params @property def project_id(self): @@ -158,13 +160,6 @@ class TextSearchRequest(object): :param label_constraints: The label_constraints of this TextSearchRequest. # noqa: E501 :type: list[str] """ - if ( - self.local_vars_configuration.client_side_validation - and label_constraints is None - ): # noqa: E501 - raise ValueError( - "Invalid value for `label_constraints`, must not be `None`" - ) # noqa: E501 self._label_constraints = label_constraints @@ -213,12 +208,6 @@ class TextSearchRequest(object): :param params: The params of this TextSearchRequest. # noqa: E501 :type: object """ - if ( - self.local_vars_configuration.client_side_validation and params is None - ): # noqa: E501 - raise ValueError( - "Invalid value for `params`, must not be `None`" - ) # noqa: E501 self._params = params diff --git a/python/knext/knext/search/rest/models/vector_search_request.py b/python/knext/knext/search/rest/models/vector_search_request.py index 6e67e045..9475adba 100644 --- a/python/knext/knext/search/rest/models/vector_search_request.py +++ b/python/knext/knext/search/rest/models/vector_search_request.py @@ -94,7 +94,8 @@ class VectorSearchRequest(object): if ef_search is not None: self.ef_search = ef_search self.topk = topk - self.params = params + if params is not None: + self.params = params @property def project_id(self): @@ -272,12 +273,6 @@ class VectorSearchRequest(object): :param params: The params of this VectorSearchRequest. # noqa: E501 :type: object """ - if ( - self.local_vars_configuration.client_side_validation and params is None - ): # noqa: E501 - raise ValueError( - "Invalid value for `params`, must not be `None`" - ) # noqa: E501 self._params = params