revengai 1.88.0__py3-none-any.whl → 1.89.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of revengai might be problematic. Click here for more details.
- revengai/__init__.py +5 -5
- revengai/api/functions_core_api.py +19 -19
- revengai/api_client.py +1 -1
- revengai/configuration.py +2 -2
- revengai/models/__init__.py +2 -2
- revengai/models/analysis_function_matching_request.py +13 -2
- revengai/models/{function_matching_scope_request.py → function_matching_filters.py} +6 -9
- revengai/models/{function_matching_batch_request.py → function_matching_request.py} +23 -13
- revengai/models/function_matching_result_with_best_match.py +9 -4
- {revengai-1.88.0.dist-info → revengai-1.89.2.dist-info}/METADATA +3 -3
- {revengai-1.88.0.dist-info → revengai-1.89.2.dist-info}/RECORD +12 -12
- {revengai-1.88.0.dist-info → revengai-1.89.2.dist-info}/WHEEL +0 -0
revengai/__init__.py
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
__version__ = "v1.
|
|
16
|
+
__version__ = "v1.89.2"
|
|
17
17
|
|
|
18
18
|
# Define package exports
|
|
19
19
|
__all__ = [
|
|
@@ -242,10 +242,10 @@ __all__ = [
|
|
|
242
242
|
"FunctionLocalVariableResponse",
|
|
243
243
|
"FunctionMapping",
|
|
244
244
|
"FunctionMappingFull",
|
|
245
|
-
"FunctionMatchingBatchRequest",
|
|
246
245
|
"FunctionMatchingBatchResponse",
|
|
246
|
+
"FunctionMatchingFilters",
|
|
247
|
+
"FunctionMatchingRequest",
|
|
247
248
|
"FunctionMatchingResultWithBestMatch",
|
|
248
|
-
"FunctionMatchingScopeRequest",
|
|
249
249
|
"FunctionNameConfidenceBody",
|
|
250
250
|
"FunctionNameHistory",
|
|
251
251
|
"FunctionNameInput",
|
|
@@ -590,10 +590,10 @@ from revengai.models.function_info_output import FunctionInfoOutput as FunctionI
|
|
|
590
590
|
from revengai.models.function_local_variable_response import FunctionLocalVariableResponse as FunctionLocalVariableResponse
|
|
591
591
|
from revengai.models.function_mapping import FunctionMapping as FunctionMapping
|
|
592
592
|
from revengai.models.function_mapping_full import FunctionMappingFull as FunctionMappingFull
|
|
593
|
-
from revengai.models.function_matching_batch_request import FunctionMatchingBatchRequest as FunctionMatchingBatchRequest
|
|
594
593
|
from revengai.models.function_matching_batch_response import FunctionMatchingBatchResponse as FunctionMatchingBatchResponse
|
|
594
|
+
from revengai.models.function_matching_filters import FunctionMatchingFilters as FunctionMatchingFilters
|
|
595
|
+
from revengai.models.function_matching_request import FunctionMatchingRequest as FunctionMatchingRequest
|
|
595
596
|
from revengai.models.function_matching_result_with_best_match import FunctionMatchingResultWithBestMatch as FunctionMatchingResultWithBestMatch
|
|
596
|
-
from revengai.models.function_matching_scope_request import FunctionMatchingScopeRequest as FunctionMatchingScopeRequest
|
|
597
597
|
from revengai.models.function_name_confidence_body import FunctionNameConfidenceBody as FunctionNameConfidenceBody
|
|
598
598
|
from revengai.models.function_name_history import FunctionNameHistory as FunctionNameHistory
|
|
599
599
|
from revengai.models.function_name_input import FunctionNameInput as FunctionNameInput
|
|
@@ -29,8 +29,8 @@ from revengai.models.base_response_function_capability_response import BaseRespo
|
|
|
29
29
|
from revengai.models.base_response_function_strings_response import BaseResponseFunctionStringsResponse
|
|
30
30
|
from revengai.models.base_response_functions_detail_response import BaseResponseFunctionsDetailResponse
|
|
31
31
|
from revengai.models.base_response_list_similar_functions_response import BaseResponseListSimilarFunctionsResponse
|
|
32
|
-
from revengai.models.function_matching_batch_request import FunctionMatchingBatchRequest
|
|
33
32
|
from revengai.models.function_matching_batch_response import FunctionMatchingBatchResponse
|
|
33
|
+
from revengai.models.function_matching_request import FunctionMatchingRequest
|
|
34
34
|
|
|
35
35
|
from revengai.api_client import ApiClient, RequestSerialized
|
|
36
36
|
from revengai.api_response import ApiResponse
|
|
@@ -378,7 +378,7 @@ class FunctionsCoreApi:
|
|
|
378
378
|
) -> FunctionMatchingBatchResponse:
|
|
379
379
|
"""Perform matching for the functions of an analysis
|
|
380
380
|
|
|
381
|
-
Takes in an analysis id and settings and
|
|
381
|
+
Takes in an analysis id and settings and matches the nearest functions to the ones associated with it. Results can optionally be filtered by collection, binary, debug type or (other) function ids
|
|
382
382
|
|
|
383
383
|
:param analysis_id: (required)
|
|
384
384
|
:type analysis_id: int
|
|
@@ -454,7 +454,7 @@ class FunctionsCoreApi:
|
|
|
454
454
|
) -> ApiResponse[FunctionMatchingBatchResponse]:
|
|
455
455
|
"""Perform matching for the functions of an analysis
|
|
456
456
|
|
|
457
|
-
Takes in an analysis id and settings and
|
|
457
|
+
Takes in an analysis id and settings and matches the nearest functions to the ones associated with it. Results can optionally be filtered by collection, binary, debug type or (other) function ids
|
|
458
458
|
|
|
459
459
|
:param analysis_id: (required)
|
|
460
460
|
:type analysis_id: int
|
|
@@ -530,7 +530,7 @@ class FunctionsCoreApi:
|
|
|
530
530
|
) -> RESTResponseType:
|
|
531
531
|
"""Perform matching for the functions of an analysis
|
|
532
532
|
|
|
533
|
-
Takes in an analysis id and settings and
|
|
533
|
+
Takes in an analysis id and settings and matches the nearest functions to the ones associated with it. Results can optionally be filtered by collection, binary, debug type or (other) function ids
|
|
534
534
|
|
|
535
535
|
:param analysis_id: (required)
|
|
536
536
|
:type analysis_id: int
|
|
@@ -974,7 +974,7 @@ class FunctionsCoreApi:
|
|
|
974
974
|
@validate_call
|
|
975
975
|
def batch_function_matching(
|
|
976
976
|
self,
|
|
977
|
-
|
|
977
|
+
function_matching_request: FunctionMatchingRequest,
|
|
978
978
|
authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
|
|
979
979
|
_request_timeout: Union[
|
|
980
980
|
None,
|
|
@@ -993,8 +993,8 @@ class FunctionsCoreApi:
|
|
|
993
993
|
|
|
994
994
|
Takes in an input of functions ID's and settings and finds the nearest functions for each function that's within the system
|
|
995
995
|
|
|
996
|
-
:param
|
|
997
|
-
:type
|
|
996
|
+
:param function_matching_request: (required)
|
|
997
|
+
:type function_matching_request: FunctionMatchingRequest
|
|
998
998
|
:param authorization: API Key bearer token
|
|
999
999
|
:type authorization: str
|
|
1000
1000
|
:param _request_timeout: timeout setting for this request. If one
|
|
@@ -1020,7 +1020,7 @@ class FunctionsCoreApi:
|
|
|
1020
1020
|
""" # noqa: E501
|
|
1021
1021
|
|
|
1022
1022
|
_param = self._batch_function_matching_serialize(
|
|
1023
|
-
|
|
1023
|
+
function_matching_request=function_matching_request,
|
|
1024
1024
|
authorization=authorization,
|
|
1025
1025
|
_request_auth=_request_auth,
|
|
1026
1026
|
_content_type=_content_type,
|
|
@@ -1046,7 +1046,7 @@ class FunctionsCoreApi:
|
|
|
1046
1046
|
@validate_call
|
|
1047
1047
|
def batch_function_matching_with_http_info(
|
|
1048
1048
|
self,
|
|
1049
|
-
|
|
1049
|
+
function_matching_request: FunctionMatchingRequest,
|
|
1050
1050
|
authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
|
|
1051
1051
|
_request_timeout: Union[
|
|
1052
1052
|
None,
|
|
@@ -1065,8 +1065,8 @@ class FunctionsCoreApi:
|
|
|
1065
1065
|
|
|
1066
1066
|
Takes in an input of functions ID's and settings and finds the nearest functions for each function that's within the system
|
|
1067
1067
|
|
|
1068
|
-
:param
|
|
1069
|
-
:type
|
|
1068
|
+
:param function_matching_request: (required)
|
|
1069
|
+
:type function_matching_request: FunctionMatchingRequest
|
|
1070
1070
|
:param authorization: API Key bearer token
|
|
1071
1071
|
:type authorization: str
|
|
1072
1072
|
:param _request_timeout: timeout setting for this request. If one
|
|
@@ -1092,7 +1092,7 @@ class FunctionsCoreApi:
|
|
|
1092
1092
|
""" # noqa: E501
|
|
1093
1093
|
|
|
1094
1094
|
_param = self._batch_function_matching_serialize(
|
|
1095
|
-
|
|
1095
|
+
function_matching_request=function_matching_request,
|
|
1096
1096
|
authorization=authorization,
|
|
1097
1097
|
_request_auth=_request_auth,
|
|
1098
1098
|
_content_type=_content_type,
|
|
@@ -1118,7 +1118,7 @@ class FunctionsCoreApi:
|
|
|
1118
1118
|
@validate_call
|
|
1119
1119
|
def batch_function_matching_without_preload_content(
|
|
1120
1120
|
self,
|
|
1121
|
-
|
|
1121
|
+
function_matching_request: FunctionMatchingRequest,
|
|
1122
1122
|
authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
|
|
1123
1123
|
_request_timeout: Union[
|
|
1124
1124
|
None,
|
|
@@ -1137,8 +1137,8 @@ class FunctionsCoreApi:
|
|
|
1137
1137
|
|
|
1138
1138
|
Takes in an input of functions ID's and settings and finds the nearest functions for each function that's within the system
|
|
1139
1139
|
|
|
1140
|
-
:param
|
|
1141
|
-
:type
|
|
1140
|
+
:param function_matching_request: (required)
|
|
1141
|
+
:type function_matching_request: FunctionMatchingRequest
|
|
1142
1142
|
:param authorization: API Key bearer token
|
|
1143
1143
|
:type authorization: str
|
|
1144
1144
|
:param _request_timeout: timeout setting for this request. If one
|
|
@@ -1164,7 +1164,7 @@ class FunctionsCoreApi:
|
|
|
1164
1164
|
""" # noqa: E501
|
|
1165
1165
|
|
|
1166
1166
|
_param = self._batch_function_matching_serialize(
|
|
1167
|
-
|
|
1167
|
+
function_matching_request=function_matching_request,
|
|
1168
1168
|
authorization=authorization,
|
|
1169
1169
|
_request_auth=_request_auth,
|
|
1170
1170
|
_content_type=_content_type,
|
|
@@ -1185,7 +1185,7 @@ class FunctionsCoreApi:
|
|
|
1185
1185
|
|
|
1186
1186
|
def _batch_function_matching_serialize(
|
|
1187
1187
|
self,
|
|
1188
|
-
|
|
1188
|
+
function_matching_request,
|
|
1189
1189
|
authorization,
|
|
1190
1190
|
_request_auth,
|
|
1191
1191
|
_content_type,
|
|
@@ -1214,8 +1214,8 @@ class FunctionsCoreApi:
|
|
|
1214
1214
|
_header_params['authorization'] = authorization
|
|
1215
1215
|
# process the form parameters
|
|
1216
1216
|
# process the body parameter
|
|
1217
|
-
if
|
|
1218
|
-
_body_params =
|
|
1217
|
+
if function_matching_request is not None:
|
|
1218
|
+
_body_params = function_matching_request
|
|
1219
1219
|
|
|
1220
1220
|
|
|
1221
1221
|
# set the HTTP header `Accept`
|
revengai/api_client.py
CHANGED
|
@@ -90,7 +90,7 @@ class ApiClient:
|
|
|
90
90
|
self.default_headers[header_name] = header_value
|
|
91
91
|
self.cookie = cookie
|
|
92
92
|
# Set default User-Agent.
|
|
93
|
-
self.user_agent = 'OpenAPI-Generator/v1.
|
|
93
|
+
self.user_agent = 'OpenAPI-Generator/v1.89.2/python'
|
|
94
94
|
self.client_side_validation = configuration.client_side_validation
|
|
95
95
|
|
|
96
96
|
def __enter__(self):
|
revengai/configuration.py
CHANGED
|
@@ -529,8 +529,8 @@ conf = revengai.Configuration(
|
|
|
529
529
|
return "Python SDK Debug Report:\n"\
|
|
530
530
|
"OS: {env}\n"\
|
|
531
531
|
"Python Version: {pyversion}\n"\
|
|
532
|
-
"Version of the API: v1.
|
|
533
|
-
"SDK Package Version: v1.
|
|
532
|
+
"Version of the API: v1.89.2\n"\
|
|
533
|
+
"SDK Package Version: v1.89.2".\
|
|
534
534
|
format(env=sys.platform, pyversion=sys.version)
|
|
535
535
|
|
|
536
536
|
def get_host_settings(self) -> List[HostSetting]:
|
revengai/models/__init__.py
CHANGED
|
@@ -208,10 +208,10 @@ from revengai.models.function_info_output import FunctionInfoOutput
|
|
|
208
208
|
from revengai.models.function_local_variable_response import FunctionLocalVariableResponse
|
|
209
209
|
from revengai.models.function_mapping import FunctionMapping
|
|
210
210
|
from revengai.models.function_mapping_full import FunctionMappingFull
|
|
211
|
-
from revengai.models.function_matching_batch_request import FunctionMatchingBatchRequest
|
|
212
211
|
from revengai.models.function_matching_batch_response import FunctionMatchingBatchResponse
|
|
212
|
+
from revengai.models.function_matching_filters import FunctionMatchingFilters
|
|
213
|
+
from revengai.models.function_matching_request import FunctionMatchingRequest
|
|
213
214
|
from revengai.models.function_matching_result_with_best_match import FunctionMatchingResultWithBestMatch
|
|
214
|
-
from revengai.models.function_matching_scope_request import FunctionMatchingScopeRequest
|
|
215
215
|
from revengai.models.function_name_confidence_body import FunctionNameConfidenceBody
|
|
216
216
|
from revengai.models.function_name_history import FunctionNameHistory
|
|
217
217
|
from revengai.models.function_name_input import FunctionNameInput
|
|
@@ -19,6 +19,7 @@ import json
|
|
|
19
19
|
from pydantic import BaseModel, ConfigDict, Field
|
|
20
20
|
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
21
21
|
from typing_extensions import Annotated
|
|
22
|
+
from revengai.models.function_matching_filters import FunctionMatchingFilters
|
|
22
23
|
from typing import Optional, Set
|
|
23
24
|
from typing_extensions import Self
|
|
24
25
|
|
|
@@ -27,7 +28,8 @@ class AnalysisFunctionMatchingRequest(BaseModel):
|
|
|
27
28
|
AnalysisFunctionMatchingRequest
|
|
28
29
|
""" # noqa: E501
|
|
29
30
|
min_similarity: Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=0.9, description="Minimum similarity expected for a match, default is 0.9")
|
|
30
|
-
|
|
31
|
+
filters: Optional[FunctionMatchingFilters] = None
|
|
32
|
+
__properties: ClassVar[List[str]] = ["min_similarity", "filters"]
|
|
31
33
|
|
|
32
34
|
model_config = ConfigDict(
|
|
33
35
|
populate_by_name=True,
|
|
@@ -68,6 +70,14 @@ class AnalysisFunctionMatchingRequest(BaseModel):
|
|
|
68
70
|
exclude=excluded_fields,
|
|
69
71
|
exclude_none=True,
|
|
70
72
|
)
|
|
73
|
+
# override the default output from pydantic by calling `to_dict()` of filters
|
|
74
|
+
if self.filters:
|
|
75
|
+
_dict['filters'] = self.filters.to_dict()
|
|
76
|
+
# set to None if filters (nullable) is None
|
|
77
|
+
# and model_fields_set contains the field
|
|
78
|
+
if self.filters is None and "filters" in self.model_fields_set:
|
|
79
|
+
_dict['filters'] = None
|
|
80
|
+
|
|
71
81
|
return _dict
|
|
72
82
|
|
|
73
83
|
@classmethod
|
|
@@ -80,7 +90,8 @@ class AnalysisFunctionMatchingRequest(BaseModel):
|
|
|
80
90
|
return cls.model_validate(obj)
|
|
81
91
|
|
|
82
92
|
_obj = cls.model_validate({
|
|
83
|
-
"min_similarity": obj.get("min_similarity") if obj.get("min_similarity") is not None else 0.9
|
|
93
|
+
"min_similarity": obj.get("min_similarity") if obj.get("min_similarity") is not None else 0.9,
|
|
94
|
+
"filters": FunctionMatchingFilters.from_dict(obj["filters"]) if obj.get("filters") is not None else None
|
|
84
95
|
})
|
|
85
96
|
return _obj
|
|
86
97
|
|
|
@@ -17,21 +17,19 @@ import re # noqa: F401
|
|
|
17
17
|
import json
|
|
18
18
|
|
|
19
19
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
|
|
20
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
21
|
-
from typing_extensions import Annotated
|
|
20
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
21
|
from typing import Optional, Set
|
|
23
22
|
from typing_extensions import Self
|
|
24
23
|
|
|
25
|
-
class
|
|
24
|
+
class FunctionMatchingFilters(BaseModel):
|
|
26
25
|
"""
|
|
27
|
-
|
|
26
|
+
FunctionMatchingFilters
|
|
28
27
|
""" # noqa: E501
|
|
29
28
|
binary_ids: Optional[List[StrictInt]] = Field(default=None, description="ID's of binaries to limit the search to, if empty, search all scoped binaries")
|
|
30
29
|
collection_ids: Optional[List[StrictInt]] = Field(default=None, description="ID's of collections to limit the search to, if empty, search all scoped collections")
|
|
31
30
|
function_ids: Optional[List[StrictInt]] = Field(default=None, description="ID's of functions to limit the search to, if empty, search all scoped functions")
|
|
32
|
-
min_similarity: Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=0.9, description="Minimum similarity expected for a match, default is 0.9")
|
|
33
31
|
debug_types: Optional[List[StrictStr]] = Field(default=None, description="Limit the search to specific debug types, if empty, search all scoped debug & non-debug functions")
|
|
34
|
-
__properties: ClassVar[List[str]] = ["binary_ids", "collection_ids", "function_ids", "
|
|
32
|
+
__properties: ClassVar[List[str]] = ["binary_ids", "collection_ids", "function_ids", "debug_types"]
|
|
35
33
|
|
|
36
34
|
@field_validator('debug_types')
|
|
37
35
|
def debug_types_validate_enum(cls, value):
|
|
@@ -62,7 +60,7 @@ class FunctionMatchingScopeRequest(BaseModel):
|
|
|
62
60
|
|
|
63
61
|
@classmethod
|
|
64
62
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
65
|
-
"""Create an instance of
|
|
63
|
+
"""Create an instance of FunctionMatchingFilters from a JSON string"""
|
|
66
64
|
return cls.from_dict(json.loads(json_str))
|
|
67
65
|
|
|
68
66
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -87,7 +85,7 @@ class FunctionMatchingScopeRequest(BaseModel):
|
|
|
87
85
|
|
|
88
86
|
@classmethod
|
|
89
87
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
90
|
-
"""Create an instance of
|
|
88
|
+
"""Create an instance of FunctionMatchingFilters from a dict"""
|
|
91
89
|
if obj is None:
|
|
92
90
|
return None
|
|
93
91
|
|
|
@@ -98,7 +96,6 @@ class FunctionMatchingScopeRequest(BaseModel):
|
|
|
98
96
|
"binary_ids": obj.get("binary_ids"),
|
|
99
97
|
"collection_ids": obj.get("collection_ids"),
|
|
100
98
|
"function_ids": obj.get("function_ids"),
|
|
101
|
-
"min_similarity": obj.get("min_similarity") if obj.get("min_similarity") is not None else 0.9,
|
|
102
99
|
"debug_types": obj.get("debug_types")
|
|
103
100
|
})
|
|
104
101
|
return _obj
|
|
@@ -17,18 +17,21 @@ import re # noqa: F401
|
|
|
17
17
|
import json
|
|
18
18
|
|
|
19
19
|
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
|
20
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
21
|
-
from
|
|
20
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from revengai.models.function_matching_filters import FunctionMatchingFilters
|
|
22
23
|
from typing import Optional, Set
|
|
23
24
|
from typing_extensions import Self
|
|
24
25
|
|
|
25
|
-
class
|
|
26
|
+
class FunctionMatchingRequest(BaseModel):
|
|
26
27
|
"""
|
|
27
|
-
|
|
28
|
+
FunctionMatchingRequest
|
|
28
29
|
""" # noqa: E501
|
|
29
|
-
model_id:
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
model_id: StrictInt = Field(description="ID of the model used for function matching, used to determine the embedding model")
|
|
31
|
+
function_ids: List[StrictInt] = Field(description="ID's of functions to find matches for, must be at least one function ID")
|
|
32
|
+
min_similarity: Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]] = Field(default=0.9, description="Minimum similarity expected for a match, default is 0.9")
|
|
33
|
+
filters: Optional[FunctionMatchingFilters] = None
|
|
34
|
+
__properties: ClassVar[List[str]] = ["model_id", "function_ids", "min_similarity", "filters"]
|
|
32
35
|
|
|
33
36
|
model_config = ConfigDict(
|
|
34
37
|
populate_by_name=True,
|
|
@@ -48,7 +51,7 @@ class FunctionMatchingBatchRequest(BaseModel):
|
|
|
48
51
|
|
|
49
52
|
@classmethod
|
|
50
53
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
-
"""Create an instance of
|
|
54
|
+
"""Create an instance of FunctionMatchingRequest from a JSON string"""
|
|
52
55
|
return cls.from_dict(json.loads(json_str))
|
|
53
56
|
|
|
54
57
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -69,14 +72,19 @@ class FunctionMatchingBatchRequest(BaseModel):
|
|
|
69
72
|
exclude=excluded_fields,
|
|
70
73
|
exclude_none=True,
|
|
71
74
|
)
|
|
72
|
-
# override the default output from pydantic by calling `to_dict()` of
|
|
73
|
-
if self.
|
|
74
|
-
_dict['
|
|
75
|
+
# override the default output from pydantic by calling `to_dict()` of filters
|
|
76
|
+
if self.filters:
|
|
77
|
+
_dict['filters'] = self.filters.to_dict()
|
|
78
|
+
# set to None if filters (nullable) is None
|
|
79
|
+
# and model_fields_set contains the field
|
|
80
|
+
if self.filters is None and "filters" in self.model_fields_set:
|
|
81
|
+
_dict['filters'] = None
|
|
82
|
+
|
|
75
83
|
return _dict
|
|
76
84
|
|
|
77
85
|
@classmethod
|
|
78
86
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
79
|
-
"""Create an instance of
|
|
87
|
+
"""Create an instance of FunctionMatchingRequest from a dict"""
|
|
80
88
|
if obj is None:
|
|
81
89
|
return None
|
|
82
90
|
|
|
@@ -85,7 +93,9 @@ class FunctionMatchingBatchRequest(BaseModel):
|
|
|
85
93
|
|
|
86
94
|
_obj = cls.model_validate({
|
|
87
95
|
"model_id": obj.get("model_id"),
|
|
88
|
-
"
|
|
96
|
+
"function_ids": obj.get("function_ids"),
|
|
97
|
+
"min_similarity": obj.get("min_similarity") if obj.get("min_similarity") is not None else 0.9,
|
|
98
|
+
"filters": FunctionMatchingFilters.from_dict(obj["filters"]) if obj.get("filters") is not None else None
|
|
89
99
|
})
|
|
90
100
|
return _obj
|
|
91
101
|
|
|
@@ -27,10 +27,10 @@ class FunctionMatchingResultWithBestMatch(BaseModel):
|
|
|
27
27
|
FunctionMatchingResultWithBestMatch
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
function_id: StrictInt
|
|
30
|
-
similarity: Union[StrictFloat, StrictInt]
|
|
31
30
|
matched_function: MatchedFunction
|
|
32
31
|
suggested_name: Optional[StrictStr] = None
|
|
33
|
-
|
|
32
|
+
suggested_name_confidence: Optional[Union[StrictFloat, StrictInt]] = None
|
|
33
|
+
__properties: ClassVar[List[str]] = ["function_id", "matched_function", "suggested_name", "suggested_name_confidence"]
|
|
34
34
|
|
|
35
35
|
model_config = ConfigDict(
|
|
36
36
|
populate_by_name=True,
|
|
@@ -79,6 +79,11 @@ class FunctionMatchingResultWithBestMatch(BaseModel):
|
|
|
79
79
|
if self.suggested_name is None and "suggested_name" in self.model_fields_set:
|
|
80
80
|
_dict['suggested_name'] = None
|
|
81
81
|
|
|
82
|
+
# set to None if suggested_name_confidence (nullable) is None
|
|
83
|
+
# and model_fields_set contains the field
|
|
84
|
+
if self.suggested_name_confidence is None and "suggested_name_confidence" in self.model_fields_set:
|
|
85
|
+
_dict['suggested_name_confidence'] = None
|
|
86
|
+
|
|
82
87
|
return _dict
|
|
83
88
|
|
|
84
89
|
@classmethod
|
|
@@ -92,9 +97,9 @@ class FunctionMatchingResultWithBestMatch(BaseModel):
|
|
|
92
97
|
|
|
93
98
|
_obj = cls.model_validate({
|
|
94
99
|
"function_id": obj.get("function_id"),
|
|
95
|
-
"similarity": obj.get("similarity"),
|
|
96
100
|
"matched_function": MatchedFunction.from_dict(obj["matched_function"]) if obj.get("matched_function") is not None else None,
|
|
97
|
-
"suggested_name": obj.get("suggested_name")
|
|
101
|
+
"suggested_name": obj.get("suggested_name"),
|
|
102
|
+
"suggested_name_confidence": obj.get("suggested_name_confidence")
|
|
98
103
|
})
|
|
99
104
|
return _obj
|
|
100
105
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: revengai
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.89.2
|
|
4
4
|
Summary: RevEng.AI API
|
|
5
5
|
Project-URL: Repository, https://github.com/RevEngAI/revengai-python
|
|
6
6
|
Keywords: RevEng.AI API
|
|
@@ -372,10 +372,10 @@ Class | Method | HTTP request | Description
|
|
|
372
372
|
- [FunctionLocalVariableResponse](docs/FunctionLocalVariableResponse.md)
|
|
373
373
|
- [FunctionMapping](docs/FunctionMapping.md)
|
|
374
374
|
- [FunctionMappingFull](docs/FunctionMappingFull.md)
|
|
375
|
-
- [FunctionMatchingBatchRequest](docs/FunctionMatchingBatchRequest.md)
|
|
376
375
|
- [FunctionMatchingBatchResponse](docs/FunctionMatchingBatchResponse.md)
|
|
376
|
+
- [FunctionMatchingFilters](docs/FunctionMatchingFilters.md)
|
|
377
|
+
- [FunctionMatchingRequest](docs/FunctionMatchingRequest.md)
|
|
377
378
|
- [FunctionMatchingResultWithBestMatch](docs/FunctionMatchingResultWithBestMatch.md)
|
|
378
|
-
- [FunctionMatchingScopeRequest](docs/FunctionMatchingScopeRequest.md)
|
|
379
379
|
- [FunctionNameConfidenceBody](docs/FunctionNameConfidenceBody.md)
|
|
380
380
|
- [FunctionNameHistory](docs/FunctionNameHistory.md)
|
|
381
381
|
- [FunctionNameInput](docs/FunctionNameInput.md)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
revengai/__init__.py,sha256=
|
|
2
|
-
revengai/api_client.py,sha256=
|
|
1
|
+
revengai/__init__.py,sha256=FWVFLadbHuMoeMa2Fa18W5sHSAZeD3-_TPGEPU3NEbc,44069
|
|
2
|
+
revengai/api_client.py,sha256=B9oCt2W3mz2Q23mxxN-wCawNSDeO3bEzTzylcrKSqnY,27670
|
|
3
3
|
revengai/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
|
4
|
-
revengai/configuration.py,sha256=
|
|
4
|
+
revengai/configuration.py,sha256=Ezak3oZ-UWHvb_0vFKtsAdWmJK-RX6V2yxAOmRnglyo,18749
|
|
5
5
|
revengai/exceptions.py,sha256=IvdI9ZIZ9b2lSSKtIKMQDlG-5UPAedrjm3U4xfmGkso,6385
|
|
6
6
|
revengai/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
revengai/rest.py,sha256=T6Q2dcazhntqm288H33BKC1hf8NVdvmQWgaymlJo158,9376
|
|
@@ -19,14 +19,14 @@ revengai/api/external_sources_api.py,sha256=JMyVAoivo6AsgeNekXnSk5BZh02APn9bzojo
|
|
|
19
19
|
revengai/api/firmware_api.py,sha256=IPkGAJ-gxmuNcz2sUM6ip-9N2DZujqLJWwhiLvUQBOA,24150
|
|
20
20
|
revengai/api/functions_ai_decompilation_api.py,sha256=ecFO-ENq9W7EoikKueY3McecKAw2fz44ZchYw6QJ29c,109824
|
|
21
21
|
revengai/api/functions_block_comments_api.py,sha256=SilDkZYrrJ2_6j-Hh-ZNTUZKp1G9XE9aUwVbDzev5Co,35480
|
|
22
|
-
revengai/api/functions_core_api.py,sha256=
|
|
22
|
+
revengai/api/functions_core_api.py,sha256=aK3szgh3LRltaMoUt2_8fiPWUFS9GBPKotcPYoRvkbs,162988
|
|
23
23
|
revengai/api/functions_data_types_api.py,sha256=Fzu4oI6kTwSE820_cGjr09N_G3uGOa4DUiyPFwOqvx4,73869
|
|
24
24
|
revengai/api/functions_decompilation_api.py,sha256=nEvYHPFoonmKSAf_t4_voC3SfoDd-O9sisSfA-5hiJo,83262
|
|
25
25
|
revengai/api/functions_renaming_history_api.py,sha256=L2CDadLnZrA0oNxhJfTSLLiMDz0Z4583Q8zLEj-Ze2I,47441
|
|
26
26
|
revengai/api/functions_threat_score_api.py,sha256=RYbCaX71r2ssv7VxUrcezT8dSdU5K5ipHD6yR592k6I,23867
|
|
27
27
|
revengai/api/models_api.py,sha256=bqukeUMctErkaX5mH8Rm3iPKEHQOCx-JT-P8_KV_iP8,11319
|
|
28
28
|
revengai/api/search_api.py,sha256=Kzo7KfP4nY1-YsoCHxVOQm3Vn89kFjcnUV7oNdaw5z0,65835
|
|
29
|
-
revengai/models/__init__.py,sha256=
|
|
29
|
+
revengai/models/__init__.py,sha256=UXuW7FhCIMc3s_K4LeAQjVWxeFs2UKlcGzVQouA_vkk,23746
|
|
30
30
|
revengai/models/addr.py,sha256=-2N-UQsOiZ0eyEAQ7ssk0of8W2fBrXeYdTZXuVt3SZs,4787
|
|
31
31
|
revengai/models/ai_decompilation_rating.py,sha256=gyay27QJwToUNtK9NARyw731Sg8GFRTufGGUABVYyfo,722
|
|
32
32
|
revengai/models/ai_unstrip_request.py,sha256=loSXNdHATJmY5yttiUCE-lLEOkuE63qVDTz8U0eCAIc,2596
|
|
@@ -36,7 +36,7 @@ revengai/models/analysis_create_request.py,sha256=6hU94Fi47hrxXQ-wX1jRuDrDi1GQym
|
|
|
36
36
|
revengai/models/analysis_create_response.py,sha256=aaO3-lJ65iBGe5lnyW8exHb9qByDaWfF2hOVKrWkN-I,2628
|
|
37
37
|
revengai/models/analysis_detail_response.py,sha256=KPyzlSbu9TU7itVlhGusJVSszrZAkuC8dMg1welYZeM,4170
|
|
38
38
|
revengai/models/analysis_function_mapping.py,sha256=_8LOSaBOgsFKLeqvoizbU2FSHtekA7aNrM7deIJyM4k,2886
|
|
39
|
-
revengai/models/analysis_function_matching_request.py,sha256=
|
|
39
|
+
revengai/models/analysis_function_matching_request.py,sha256=a03YZsFHA_BLW_DARHPeDYZ7CBFAEG0C66d9TSLDgaY,3434
|
|
40
40
|
revengai/models/analysis_functions.py,sha256=N1TKQuw33I9dw-i07kLus36k2bcAXQVm2oc1Ycfrgdw,3067
|
|
41
41
|
revengai/models/analysis_record.py,sha256=DxnERhF-s5AilH804yKtMAOyXhhjWQsq0ned1ji5t5Q,5516
|
|
42
42
|
revengai/models/analysis_scope.py,sha256=azpsUux2axe4QKwQ4FbW30HbazYYVFP-e68F9zp33-4,668
|
|
@@ -223,10 +223,10 @@ revengai/models/function_info_output.py,sha256=iIxkZ6_KFSoz0NhbBXyNi7knPvWcIp-hm
|
|
|
223
223
|
revengai/models/function_local_variable_response.py,sha256=llv5alvfVXqxE3Cs6vt7qnQNyfwj4PBoxq_Sim65jic,2733
|
|
224
224
|
revengai/models/function_mapping.py,sha256=X4fa-lcMfO-40eVMtSTUPRpJlxdSZNEdzPTEOR0uAlg,2924
|
|
225
225
|
revengai/models/function_mapping_full.py,sha256=dax345vnk25zSPVVpAmCFrrOWXzFXW6OnhSs9zVIKpI,11948
|
|
226
|
-
revengai/models/function_matching_batch_request.py,sha256=5weNPPU3rmXbZtBJZaQT8_Rh16vskWTI9xBOAw9g3pI,3041
|
|
227
226
|
revengai/models/function_matching_batch_response.py,sha256=VT-WIbiOfLl2HPbRUTyKC8a5l6D1XLgNsJQfgiaW1_I,4270
|
|
228
|
-
revengai/models/
|
|
229
|
-
revengai/models/
|
|
227
|
+
revengai/models/function_matching_filters.py,sha256=O5F1PIcPhbumH8z-4KbG7JNoUsx_H3wBZQU9kCZ_boI,3710
|
|
228
|
+
revengai/models/function_matching_request.py,sha256=nEyqOxsdo61bUQCbTNxsCh0lX5WSPOyT1jVLJbzwdnc,3797
|
|
229
|
+
revengai/models/function_matching_result_with_best_match.py,sha256=dfWeaKkEJ0k_stJMIs-Yh3yKlDD2TRZioeHdG33JGtM,3826
|
|
230
230
|
revengai/models/function_name_confidence_body.py,sha256=Dz8HvTUDn5YcyCie-KMXmOdy8yF8PD-m0XzwpRyyQmg,3415
|
|
231
231
|
revengai/models/function_name_history.py,sha256=INu3KWYUpQMFfWy6oWl5iSaxrlayKr-wvuiahRCzinI,3265
|
|
232
232
|
revengai/models/function_name_input.py,sha256=zKzb0qAJBZKadixsWnRfkTnFHdNGtS2i13QgSeHr4c0,2538
|
|
@@ -339,6 +339,6 @@ revengai/models/vulnerabilities.py,sha256=9t6uoZd3svWyfcZJjmj6zP731Dp47Apb25y8Qt
|
|
|
339
339
|
revengai/models/vulnerability.py,sha256=P7rAOAYU5JLLpcRr824-YJgZba5kPb_J9ALV3tSNfLQ,3688
|
|
340
340
|
revengai/models/vulnerability_type.py,sha256=SyOgfMmELYYc_H84oPkikBpjwngtG5Qw9Q_86a2TPr8,866
|
|
341
341
|
revengai/models/workspace.py,sha256=chjU62GFvByEmaNd6luMNQVQLP3wlPx1zJgGJ_yyMLA,676
|
|
342
|
-
revengai-1.
|
|
343
|
-
revengai-1.
|
|
344
|
-
revengai-1.
|
|
342
|
+
revengai-1.89.2.dist-info/METADATA,sha256=X6Bg7yy8U2rs5eKKAV_1hSie7UH7jgz6jrkHcD0jjco,42416
|
|
343
|
+
revengai-1.89.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
344
|
+
revengai-1.89.2.dist-info/RECORD,,
|
|
File without changes
|