revengai 2.3.0__py3-none-any.whl → 2.9.1__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.

Files changed (37) hide show
  1. revengai/__init__.py +1 -37
  2. revengai/api/__init__.py +0 -1
  3. revengai/api/analyses_core_api.py +0 -294
  4. revengai/api/functions_ai_decompilation_api.py +30 -30
  5. revengai/api/functions_core_api.py +2 -369
  6. revengai/api_client.py +1 -1
  7. revengai/configuration.py +2 -2
  8. revengai/models/__init__.py +0 -17
  9. revengai/models/callee_function_info.py +1 -1
  10. revengai/models/caller_function_info.py +1 -1
  11. revengai/models/decompilation_response.py +2 -2
  12. revengai/models/elf_relocation.py +1 -1
  13. revengai/models/function_matching_result_with_best_match.py +2 -2
  14. revengai/models/functions_detail_response.py +5 -3
  15. revengai/models/matched_function.py +2 -2
  16. {revengai-2.3.0.dist-info → revengai-2.9.1.dist-info}/METADATA +1 -24
  17. {revengai-2.3.0.dist-info → revengai-2.9.1.dist-info}/RECORD +19 -37
  18. revengai/api/confidence_api.py +0 -1152
  19. revengai/models/ann_function.py +0 -122
  20. revengai/models/base_response_box_plot_confidence.py +0 -125
  21. revengai/models/base_response_list_function_box_plot_confidence.py +0 -129
  22. revengai/models/base_response_list_similar_functions_response.py +0 -129
  23. revengai/models/base_response_list_tag_origin_box_plot_confidence.py +0 -129
  24. revengai/models/base_response_nearest_neighbor_analysis.py +0 -135
  25. revengai/models/box_plot_confidence.py +0 -98
  26. revengai/models/function_box_plot_confidence.py +0 -92
  27. revengai/models/function_name_confidence_body.py +0 -97
  28. revengai/models/function_name_input.py +0 -88
  29. revengai/models/nearest_neighbor.py +0 -105
  30. revengai/models/origin.py +0 -42
  31. revengai/models/similar_functions_response.py +0 -100
  32. revengai/models/tag_confidence_body.py +0 -95
  33. revengai/models/tag_origin_box_plot_confidence.py +0 -96
  34. revengai/models/tags.py +0 -89
  35. revengai/models/threat_score_function_body.py +0 -87
  36. {revengai-2.3.0.dist-info → revengai-2.9.1.dist-info}/WHEEL +0 -0
  37. {revengai-2.3.0.dist-info → revengai-2.9.1.dist-info}/licenses/LICENSE.md +0 -0
@@ -345,7 +345,7 @@ class FunctionsAIDecompilationApi:
345
345
  @validate_call
346
346
  def create_ai_decompilation_task(
347
347
  self,
348
- function_id: StrictInt,
348
+ function_id: Annotated[StrictInt, Field(description="The ID of the function for which we are creating the decompilation task")],
349
349
  _request_timeout: Union[
350
350
  None,
351
351
  Annotated[StrictFloat, Field(gt=0)],
@@ -363,7 +363,7 @@ class FunctionsAIDecompilationApi:
363
363
 
364
364
  Begins the AI Decompilation Process
365
365
 
366
- :param function_id: (required)
366
+ :param function_id: The ID of the function for which we are creating the decompilation task (required)
367
367
  :type function_id: int
368
368
  :param _request_timeout: timeout setting for this request. If one
369
369
  number provided, it will be total request
@@ -417,7 +417,7 @@ class FunctionsAIDecompilationApi:
417
417
  @validate_call
418
418
  def create_ai_decompilation_task_with_http_info(
419
419
  self,
420
- function_id: StrictInt,
420
+ function_id: Annotated[StrictInt, Field(description="The ID of the function for which we are creating the decompilation task")],
421
421
  _request_timeout: Union[
422
422
  None,
423
423
  Annotated[StrictFloat, Field(gt=0)],
@@ -435,7 +435,7 @@ class FunctionsAIDecompilationApi:
435
435
 
436
436
  Begins the AI Decompilation Process
437
437
 
438
- :param function_id: (required)
438
+ :param function_id: The ID of the function for which we are creating the decompilation task (required)
439
439
  :type function_id: int
440
440
  :param _request_timeout: timeout setting for this request. If one
441
441
  number provided, it will be total request
@@ -489,7 +489,7 @@ class FunctionsAIDecompilationApi:
489
489
  @validate_call
490
490
  def create_ai_decompilation_task_without_preload_content(
491
491
  self,
492
- function_id: StrictInt,
492
+ function_id: Annotated[StrictInt, Field(description="The ID of the function for which we are creating the decompilation task")],
493
493
  _request_timeout: Union[
494
494
  None,
495
495
  Annotated[StrictFloat, Field(gt=0)],
@@ -507,7 +507,7 @@ class FunctionsAIDecompilationApi:
507
507
 
508
508
  Begins the AI Decompilation Process
509
509
 
510
- :param function_id: (required)
510
+ :param function_id: The ID of the function for which we are creating the decompilation task (required)
511
511
  :type function_id: int
512
512
  :param _request_timeout: timeout setting for this request. If one
513
513
  number provided, it will be total request
@@ -1170,7 +1170,7 @@ class FunctionsAIDecompilationApi:
1170
1170
  @validate_call
1171
1171
  def get_ai_decompilation_rating(
1172
1172
  self,
1173
- function_id: StrictInt,
1173
+ function_id: Annotated[StrictInt, Field(description="The ID of the function for which to get the rating")],
1174
1174
  _request_timeout: Union[
1175
1175
  None,
1176
1176
  Annotated[StrictFloat, Field(gt=0)],
@@ -1187,7 +1187,7 @@ class FunctionsAIDecompilationApi:
1187
1187
  """Get rating for AI decompilation
1188
1188
 
1189
1189
 
1190
- :param function_id: (required)
1190
+ :param function_id: The ID of the function for which to get the rating (required)
1191
1191
  :type function_id: int
1192
1192
  :param _request_timeout: timeout setting for this request. If one
1193
1193
  number provided, it will be total request
@@ -1237,7 +1237,7 @@ class FunctionsAIDecompilationApi:
1237
1237
  @validate_call
1238
1238
  def get_ai_decompilation_rating_with_http_info(
1239
1239
  self,
1240
- function_id: StrictInt,
1240
+ function_id: Annotated[StrictInt, Field(description="The ID of the function for which to get the rating")],
1241
1241
  _request_timeout: Union[
1242
1242
  None,
1243
1243
  Annotated[StrictFloat, Field(gt=0)],
@@ -1254,7 +1254,7 @@ class FunctionsAIDecompilationApi:
1254
1254
  """Get rating for AI decompilation
1255
1255
 
1256
1256
 
1257
- :param function_id: (required)
1257
+ :param function_id: The ID of the function for which to get the rating (required)
1258
1258
  :type function_id: int
1259
1259
  :param _request_timeout: timeout setting for this request. If one
1260
1260
  number provided, it will be total request
@@ -1304,7 +1304,7 @@ class FunctionsAIDecompilationApi:
1304
1304
  @validate_call
1305
1305
  def get_ai_decompilation_rating_without_preload_content(
1306
1306
  self,
1307
- function_id: StrictInt,
1307
+ function_id: Annotated[StrictInt, Field(description="The ID of the function for which to get the rating")],
1308
1308
  _request_timeout: Union[
1309
1309
  None,
1310
1310
  Annotated[StrictFloat, Field(gt=0)],
@@ -1321,7 +1321,7 @@ class FunctionsAIDecompilationApi:
1321
1321
  """Get rating for AI decompilation
1322
1322
 
1323
1323
 
1324
- :param function_id: (required)
1324
+ :param function_id: The ID of the function for which to get the rating (required)
1325
1325
  :type function_id: int
1326
1326
  :param _request_timeout: timeout setting for this request. If one
1327
1327
  number provided, it will be total request
@@ -1431,7 +1431,7 @@ class FunctionsAIDecompilationApi:
1431
1431
  @validate_call
1432
1432
  def get_ai_decompilation_task_result(
1433
1433
  self,
1434
- function_id: StrictInt,
1434
+ function_id: Annotated[StrictInt, Field(description="The ID of the function being decompiled")],
1435
1435
  summarise: Annotated[Optional[StrictBool], Field(description="Generate a summary for the decompilation")] = None,
1436
1436
  generate_inline_comments: Annotated[Optional[StrictBool], Field(description="Generate inline comments for the decompilation (only works if summarise is enabled)")] = None,
1437
1437
  _request_timeout: Union[
@@ -1451,7 +1451,7 @@ class FunctionsAIDecompilationApi:
1451
1451
 
1452
1452
  Polls the AI Decompilation Process
1453
1453
 
1454
- :param function_id: (required)
1454
+ :param function_id: The ID of the function being decompiled (required)
1455
1455
  :type function_id: int
1456
1456
  :param summarise: Generate a summary for the decompilation
1457
1457
  :type summarise: bool
@@ -1508,7 +1508,7 @@ class FunctionsAIDecompilationApi:
1508
1508
  @validate_call
1509
1509
  def get_ai_decompilation_task_result_with_http_info(
1510
1510
  self,
1511
- function_id: StrictInt,
1511
+ function_id: Annotated[StrictInt, Field(description="The ID of the function being decompiled")],
1512
1512
  summarise: Annotated[Optional[StrictBool], Field(description="Generate a summary for the decompilation")] = None,
1513
1513
  generate_inline_comments: Annotated[Optional[StrictBool], Field(description="Generate inline comments for the decompilation (only works if summarise is enabled)")] = None,
1514
1514
  _request_timeout: Union[
@@ -1528,7 +1528,7 @@ class FunctionsAIDecompilationApi:
1528
1528
 
1529
1529
  Polls the AI Decompilation Process
1530
1530
 
1531
- :param function_id: (required)
1531
+ :param function_id: The ID of the function being decompiled (required)
1532
1532
  :type function_id: int
1533
1533
  :param summarise: Generate a summary for the decompilation
1534
1534
  :type summarise: bool
@@ -1585,7 +1585,7 @@ class FunctionsAIDecompilationApi:
1585
1585
  @validate_call
1586
1586
  def get_ai_decompilation_task_result_without_preload_content(
1587
1587
  self,
1588
- function_id: StrictInt,
1588
+ function_id: Annotated[StrictInt, Field(description="The ID of the function being decompiled")],
1589
1589
  summarise: Annotated[Optional[StrictBool], Field(description="Generate a summary for the decompilation")] = None,
1590
1590
  generate_inline_comments: Annotated[Optional[StrictBool], Field(description="Generate inline comments for the decompilation (only works if summarise is enabled)")] = None,
1591
1591
  _request_timeout: Union[
@@ -1605,7 +1605,7 @@ class FunctionsAIDecompilationApi:
1605
1605
 
1606
1606
  Polls the AI Decompilation Process
1607
1607
 
1608
- :param function_id: (required)
1608
+ :param function_id: The ID of the function being decompiled (required)
1609
1609
  :type function_id: int
1610
1610
  :param summarise: Generate a summary for the decompilation
1611
1611
  :type summarise: bool
@@ -1732,7 +1732,7 @@ class FunctionsAIDecompilationApi:
1732
1732
  @validate_call
1733
1733
  def get_ai_decompilation_task_status(
1734
1734
  self,
1735
- function_id: StrictInt,
1735
+ function_id: Annotated[StrictInt, Field(description="The ID of the function being checked")],
1736
1736
  _request_timeout: Union[
1737
1737
  None,
1738
1738
  Annotated[StrictFloat, Field(gt=0)],
@@ -1749,7 +1749,7 @@ class FunctionsAIDecompilationApi:
1749
1749
  """Check the status of a function ai decompilation
1750
1750
 
1751
1751
 
1752
- :param function_id: (required)
1752
+ :param function_id: The ID of the function being checked (required)
1753
1753
  :type function_id: int
1754
1754
  :param _request_timeout: timeout setting for this request. If one
1755
1755
  number provided, it will be total request
@@ -1799,7 +1799,7 @@ class FunctionsAIDecompilationApi:
1799
1799
  @validate_call
1800
1800
  def get_ai_decompilation_task_status_with_http_info(
1801
1801
  self,
1802
- function_id: StrictInt,
1802
+ function_id: Annotated[StrictInt, Field(description="The ID of the function being checked")],
1803
1803
  _request_timeout: Union[
1804
1804
  None,
1805
1805
  Annotated[StrictFloat, Field(gt=0)],
@@ -1816,7 +1816,7 @@ class FunctionsAIDecompilationApi:
1816
1816
  """Check the status of a function ai decompilation
1817
1817
 
1818
1818
 
1819
- :param function_id: (required)
1819
+ :param function_id: The ID of the function being checked (required)
1820
1820
  :type function_id: int
1821
1821
  :param _request_timeout: timeout setting for this request. If one
1822
1822
  number provided, it will be total request
@@ -1866,7 +1866,7 @@ class FunctionsAIDecompilationApi:
1866
1866
  @validate_call
1867
1867
  def get_ai_decompilation_task_status_without_preload_content(
1868
1868
  self,
1869
- function_id: StrictInt,
1869
+ function_id: Annotated[StrictInt, Field(description="The ID of the function being checked")],
1870
1870
  _request_timeout: Union[
1871
1871
  None,
1872
1872
  Annotated[StrictFloat, Field(gt=0)],
@@ -1883,7 +1883,7 @@ class FunctionsAIDecompilationApi:
1883
1883
  """Check the status of a function ai decompilation
1884
1884
 
1885
1885
 
1886
- :param function_id: (required)
1886
+ :param function_id: The ID of the function being checked (required)
1887
1887
  :type function_id: int
1888
1888
  :param _request_timeout: timeout setting for this request. If one
1889
1889
  number provided, it will be total request
@@ -2306,7 +2306,7 @@ class FunctionsAIDecompilationApi:
2306
2306
  @validate_call
2307
2307
  def upsert_ai_decompilation_rating(
2308
2308
  self,
2309
- function_id: StrictInt,
2309
+ function_id: Annotated[StrictInt, Field(description="The ID of the function being rated")],
2310
2310
  upsert_ai_decomplation_rating_request: UpsertAiDecomplationRatingRequest,
2311
2311
  _request_timeout: Union[
2312
2312
  None,
@@ -2324,7 +2324,7 @@ class FunctionsAIDecompilationApi:
2324
2324
  """Upsert rating for AI decompilation
2325
2325
 
2326
2326
 
2327
- :param function_id: (required)
2327
+ :param function_id: The ID of the function being rated (required)
2328
2328
  :type function_id: int
2329
2329
  :param upsert_ai_decomplation_rating_request: (required)
2330
2330
  :type upsert_ai_decomplation_rating_request: UpsertAiDecomplationRatingRequest
@@ -2377,7 +2377,7 @@ class FunctionsAIDecompilationApi:
2377
2377
  @validate_call
2378
2378
  def upsert_ai_decompilation_rating_with_http_info(
2379
2379
  self,
2380
- function_id: StrictInt,
2380
+ function_id: Annotated[StrictInt, Field(description="The ID of the function being rated")],
2381
2381
  upsert_ai_decomplation_rating_request: UpsertAiDecomplationRatingRequest,
2382
2382
  _request_timeout: Union[
2383
2383
  None,
@@ -2395,7 +2395,7 @@ class FunctionsAIDecompilationApi:
2395
2395
  """Upsert rating for AI decompilation
2396
2396
 
2397
2397
 
2398
- :param function_id: (required)
2398
+ :param function_id: The ID of the function being rated (required)
2399
2399
  :type function_id: int
2400
2400
  :param upsert_ai_decomplation_rating_request: (required)
2401
2401
  :type upsert_ai_decomplation_rating_request: UpsertAiDecomplationRatingRequest
@@ -2448,7 +2448,7 @@ class FunctionsAIDecompilationApi:
2448
2448
  @validate_call
2449
2449
  def upsert_ai_decompilation_rating_without_preload_content(
2450
2450
  self,
2451
- function_id: StrictInt,
2451
+ function_id: Annotated[StrictInt, Field(description="The ID of the function being rated")],
2452
2452
  upsert_ai_decomplation_rating_request: UpsertAiDecomplationRatingRequest,
2453
2453
  _request_timeout: Union[
2454
2454
  None,
@@ -2466,7 +2466,7 @@ class FunctionsAIDecompilationApi:
2466
2466
  """Upsert rating for AI decompilation
2467
2467
 
2468
2468
 
2469
- :param function_id: (required)
2469
+ :param function_id: The ID of the function being rated (required)
2470
2470
  :type function_id: int
2471
2471
  :param upsert_ai_decomplation_rating_request: (required)
2472
2472
  :type upsert_ai_decomplation_rating_request: UpsertAiDecomplationRatingRequest
@@ -15,8 +15,8 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
15
15
  from typing import Any, Dict, List, Optional, Tuple, Union
16
16
  from typing_extensions import Annotated
17
17
 
18
- from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator
19
- from typing import List, Optional, Union
18
+ from pydantic import Field, StrictInt, StrictStr
19
+ from typing import Optional
20
20
  from typing_extensions import Annotated
21
21
  from revengai.models.ai_unstrip_request import AiUnstripRequest
22
22
  from revengai.models.analysis_function_matching_request import AnalysisFunctionMatchingRequest
@@ -28,7 +28,6 @@ from revengai.models.base_response_function_blocks_response import BaseResponseF
28
28
  from revengai.models.base_response_function_capability_response import BaseResponseFunctionCapabilityResponse
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
- from revengai.models.base_response_list_similar_functions_response import BaseResponseListSimilarFunctionsResponse
32
31
  from revengai.models.function_matching_batch_response import FunctionMatchingBatchResponse
33
32
  from revengai.models.function_matching_request import FunctionMatchingRequest
34
33
 
@@ -3429,369 +3428,3 @@ class FunctionsCoreApi:
3429
3428
  )
3430
3429
 
3431
3430
 
3432
-
3433
-
3434
- @validate_call
3435
- def get_similar_functions(
3436
- self,
3437
- function_id: StrictInt,
3438
- limit: Annotated[Optional[StrictInt], Field(description="Number of similar functions to return")] = None,
3439
- distance: Annotated[Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]], Field(description="Maximum cosine distance")] = None,
3440
- collection_ids: Annotated[Optional[List[Optional[StrictInt]]], Field(description="Collection filtering by IDs")] = None,
3441
- debug: Annotated[Optional[StrictBool], Field(description="Only return matching debug functions")] = None,
3442
- debug_types: Annotated[Optional[List[StrictStr]], Field(description="If limiting results to functions with debug names, which type of debug names to include?")] = None,
3443
- binary_ids: Annotated[Optional[List[Optional[StrictInt]]], Field(description="Limit similar functions to specific binaries")] = None,
3444
- _request_timeout: Union[
3445
- None,
3446
- Annotated[StrictFloat, Field(gt=0)],
3447
- Tuple[
3448
- Annotated[StrictFloat, Field(gt=0)],
3449
- Annotated[StrictFloat, Field(gt=0)]
3450
- ]
3451
- ] = None,
3452
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3453
- _content_type: Optional[StrictStr] = None,
3454
- _headers: Optional[Dict[StrictStr, Any]] = None,
3455
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3456
- ) -> BaseResponseListSimilarFunctionsResponse:
3457
- """Get list of similar functions
3458
-
3459
-
3460
- :param function_id: (required)
3461
- :type function_id: int
3462
- :param limit: Number of similar functions to return
3463
- :type limit: int
3464
- :param distance: Maximum cosine distance
3465
- :type distance: float
3466
- :param collection_ids: Collection filtering by IDs
3467
- :type collection_ids: List[Optional[int]]
3468
- :param debug: Only return matching debug functions
3469
- :type debug: bool
3470
- :param debug_types: If limiting results to functions with debug names, which type of debug names to include?
3471
- :type debug_types: List[str]
3472
- :param binary_ids: Limit similar functions to specific binaries
3473
- :type binary_ids: List[Optional[int]]
3474
- :param _request_timeout: timeout setting for this request. If one
3475
- number provided, it will be total request
3476
- timeout. It can also be a pair (tuple) of
3477
- (connection, read) timeouts.
3478
- :type _request_timeout: int, tuple(int, int), optional
3479
- :param _request_auth: set to override the auth_settings for an a single
3480
- request; this effectively ignores the
3481
- authentication in the spec for a single request.
3482
- :type _request_auth: dict, optional
3483
- :param _content_type: force content-type for the request.
3484
- :type _content_type: str, Optional
3485
- :param _headers: set to override the headers for a single
3486
- request; this effectively ignores the headers
3487
- in the spec for a single request.
3488
- :type _headers: dict, optional
3489
- :param _host_index: set to override the host_index for a single
3490
- request; this effectively ignores the host_index
3491
- in the spec for a single request.
3492
- :type _host_index: int, optional
3493
- :return: Returns the result object.
3494
- """ # noqa: E501
3495
-
3496
- _param = self._get_similar_functions_serialize(
3497
- function_id=function_id,
3498
- limit=limit,
3499
- distance=distance,
3500
- collection_ids=collection_ids,
3501
- debug=debug,
3502
- debug_types=debug_types,
3503
- binary_ids=binary_ids,
3504
- _request_auth=_request_auth,
3505
- _content_type=_content_type,
3506
- _headers=_headers,
3507
- _host_index=_host_index
3508
- )
3509
-
3510
- _response_types_map: Dict[str, Optional[str]] = {
3511
- '200': "BaseResponseListSimilarFunctionsResponse",
3512
- '422': "BaseResponse",
3513
- }
3514
- response_data = self.api_client.call_api(
3515
- *_param,
3516
- _request_timeout=_request_timeout
3517
- )
3518
- response_data.read()
3519
- return self.api_client.response_deserialize(
3520
- response_data=response_data,
3521
- response_types_map=_response_types_map,
3522
- ).data
3523
-
3524
-
3525
- @validate_call
3526
- def get_similar_functions_with_http_info(
3527
- self,
3528
- function_id: StrictInt,
3529
- limit: Annotated[Optional[StrictInt], Field(description="Number of similar functions to return")] = None,
3530
- distance: Annotated[Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]], Field(description="Maximum cosine distance")] = None,
3531
- collection_ids: Annotated[Optional[List[Optional[StrictInt]]], Field(description="Collection filtering by IDs")] = None,
3532
- debug: Annotated[Optional[StrictBool], Field(description="Only return matching debug functions")] = None,
3533
- debug_types: Annotated[Optional[List[StrictStr]], Field(description="If limiting results to functions with debug names, which type of debug names to include?")] = None,
3534
- binary_ids: Annotated[Optional[List[Optional[StrictInt]]], Field(description="Limit similar functions to specific binaries")] = None,
3535
- _request_timeout: Union[
3536
- None,
3537
- Annotated[StrictFloat, Field(gt=0)],
3538
- Tuple[
3539
- Annotated[StrictFloat, Field(gt=0)],
3540
- Annotated[StrictFloat, Field(gt=0)]
3541
- ]
3542
- ] = None,
3543
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3544
- _content_type: Optional[StrictStr] = None,
3545
- _headers: Optional[Dict[StrictStr, Any]] = None,
3546
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3547
- ) -> ApiResponse[BaseResponseListSimilarFunctionsResponse]:
3548
- """Get list of similar functions
3549
-
3550
-
3551
- :param function_id: (required)
3552
- :type function_id: int
3553
- :param limit: Number of similar functions to return
3554
- :type limit: int
3555
- :param distance: Maximum cosine distance
3556
- :type distance: float
3557
- :param collection_ids: Collection filtering by IDs
3558
- :type collection_ids: List[Optional[int]]
3559
- :param debug: Only return matching debug functions
3560
- :type debug: bool
3561
- :param debug_types: If limiting results to functions with debug names, which type of debug names to include?
3562
- :type debug_types: List[str]
3563
- :param binary_ids: Limit similar functions to specific binaries
3564
- :type binary_ids: List[Optional[int]]
3565
- :param _request_timeout: timeout setting for this request. If one
3566
- number provided, it will be total request
3567
- timeout. It can also be a pair (tuple) of
3568
- (connection, read) timeouts.
3569
- :type _request_timeout: int, tuple(int, int), optional
3570
- :param _request_auth: set to override the auth_settings for an a single
3571
- request; this effectively ignores the
3572
- authentication in the spec for a single request.
3573
- :type _request_auth: dict, optional
3574
- :param _content_type: force content-type for the request.
3575
- :type _content_type: str, Optional
3576
- :param _headers: set to override the headers for a single
3577
- request; this effectively ignores the headers
3578
- in the spec for a single request.
3579
- :type _headers: dict, optional
3580
- :param _host_index: set to override the host_index for a single
3581
- request; this effectively ignores the host_index
3582
- in the spec for a single request.
3583
- :type _host_index: int, optional
3584
- :return: Returns the result object.
3585
- """ # noqa: E501
3586
-
3587
- _param = self._get_similar_functions_serialize(
3588
- function_id=function_id,
3589
- limit=limit,
3590
- distance=distance,
3591
- collection_ids=collection_ids,
3592
- debug=debug,
3593
- debug_types=debug_types,
3594
- binary_ids=binary_ids,
3595
- _request_auth=_request_auth,
3596
- _content_type=_content_type,
3597
- _headers=_headers,
3598
- _host_index=_host_index
3599
- )
3600
-
3601
- _response_types_map: Dict[str, Optional[str]] = {
3602
- '200': "BaseResponseListSimilarFunctionsResponse",
3603
- '422': "BaseResponse",
3604
- }
3605
- response_data = self.api_client.call_api(
3606
- *_param,
3607
- _request_timeout=_request_timeout
3608
- )
3609
- response_data.read()
3610
- return self.api_client.response_deserialize(
3611
- response_data=response_data,
3612
- response_types_map=_response_types_map,
3613
- )
3614
-
3615
-
3616
- @validate_call
3617
- def get_similar_functions_without_preload_content(
3618
- self,
3619
- function_id: StrictInt,
3620
- limit: Annotated[Optional[StrictInt], Field(description="Number of similar functions to return")] = None,
3621
- distance: Annotated[Optional[Union[Annotated[float, Field(le=1.0, strict=True, ge=0.0)], Annotated[int, Field(le=1, strict=True, ge=0)]]], Field(description="Maximum cosine distance")] = None,
3622
- collection_ids: Annotated[Optional[List[Optional[StrictInt]]], Field(description="Collection filtering by IDs")] = None,
3623
- debug: Annotated[Optional[StrictBool], Field(description="Only return matching debug functions")] = None,
3624
- debug_types: Annotated[Optional[List[StrictStr]], Field(description="If limiting results to functions with debug names, which type of debug names to include?")] = None,
3625
- binary_ids: Annotated[Optional[List[Optional[StrictInt]]], Field(description="Limit similar functions to specific binaries")] = None,
3626
- _request_timeout: Union[
3627
- None,
3628
- Annotated[StrictFloat, Field(gt=0)],
3629
- Tuple[
3630
- Annotated[StrictFloat, Field(gt=0)],
3631
- Annotated[StrictFloat, Field(gt=0)]
3632
- ]
3633
- ] = None,
3634
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
3635
- _content_type: Optional[StrictStr] = None,
3636
- _headers: Optional[Dict[StrictStr, Any]] = None,
3637
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3638
- ) -> RESTResponseType:
3639
- """Get list of similar functions
3640
-
3641
-
3642
- :param function_id: (required)
3643
- :type function_id: int
3644
- :param limit: Number of similar functions to return
3645
- :type limit: int
3646
- :param distance: Maximum cosine distance
3647
- :type distance: float
3648
- :param collection_ids: Collection filtering by IDs
3649
- :type collection_ids: List[Optional[int]]
3650
- :param debug: Only return matching debug functions
3651
- :type debug: bool
3652
- :param debug_types: If limiting results to functions with debug names, which type of debug names to include?
3653
- :type debug_types: List[str]
3654
- :param binary_ids: Limit similar functions to specific binaries
3655
- :type binary_ids: List[Optional[int]]
3656
- :param _request_timeout: timeout setting for this request. If one
3657
- number provided, it will be total request
3658
- timeout. It can also be a pair (tuple) of
3659
- (connection, read) timeouts.
3660
- :type _request_timeout: int, tuple(int, int), optional
3661
- :param _request_auth: set to override the auth_settings for an a single
3662
- request; this effectively ignores the
3663
- authentication in the spec for a single request.
3664
- :type _request_auth: dict, optional
3665
- :param _content_type: force content-type for the request.
3666
- :type _content_type: str, Optional
3667
- :param _headers: set to override the headers for a single
3668
- request; this effectively ignores the headers
3669
- in the spec for a single request.
3670
- :type _headers: dict, optional
3671
- :param _host_index: set to override the host_index for a single
3672
- request; this effectively ignores the host_index
3673
- in the spec for a single request.
3674
- :type _host_index: int, optional
3675
- :return: Returns the result object.
3676
- """ # noqa: E501
3677
-
3678
- _param = self._get_similar_functions_serialize(
3679
- function_id=function_id,
3680
- limit=limit,
3681
- distance=distance,
3682
- collection_ids=collection_ids,
3683
- debug=debug,
3684
- debug_types=debug_types,
3685
- binary_ids=binary_ids,
3686
- _request_auth=_request_auth,
3687
- _content_type=_content_type,
3688
- _headers=_headers,
3689
- _host_index=_host_index
3690
- )
3691
-
3692
- _response_types_map: Dict[str, Optional[str]] = {
3693
- '200': "BaseResponseListSimilarFunctionsResponse",
3694
- '422': "BaseResponse",
3695
- }
3696
- response_data = self.api_client.call_api(
3697
- *_param,
3698
- _request_timeout=_request_timeout
3699
- )
3700
- return response_data.response
3701
-
3702
-
3703
- def _get_similar_functions_serialize(
3704
- self,
3705
- function_id,
3706
- limit,
3707
- distance,
3708
- collection_ids,
3709
- debug,
3710
- debug_types,
3711
- binary_ids,
3712
- _request_auth,
3713
- _content_type,
3714
- _headers,
3715
- _host_index,
3716
- ) -> RequestSerialized:
3717
-
3718
- _host = None
3719
-
3720
- _collection_formats: Dict[str, str] = {
3721
- 'collection_ids': 'multi',
3722
- 'debug_types': 'multi',
3723
- 'binary_ids': 'multi',
3724
- }
3725
-
3726
- _path_params: Dict[str, str] = {}
3727
- _query_params: List[Tuple[str, str]] = []
3728
- _header_params: Dict[str, Optional[str]] = _headers or {}
3729
- _form_params: List[Tuple[str, str]] = []
3730
- _files: Dict[
3731
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3732
- ] = {}
3733
- _body_params: Optional[bytes] = None
3734
-
3735
- # process the path parameters
3736
- if function_id is not None:
3737
- _path_params['function_id'] = function_id
3738
- # process the query parameters
3739
- if limit is not None:
3740
-
3741
- _query_params.append(('limit', limit))
3742
-
3743
- if distance is not None:
3744
-
3745
- _query_params.append(('distance', distance))
3746
-
3747
- if collection_ids is not None:
3748
-
3749
- _query_params.append(('collection_ids', collection_ids))
3750
-
3751
- if debug is not None:
3752
-
3753
- _query_params.append(('debug', debug))
3754
-
3755
- if debug_types is not None:
3756
-
3757
- _query_params.append(('debug_types', debug_types))
3758
-
3759
- if binary_ids is not None:
3760
-
3761
- _query_params.append(('binary_ids', binary_ids))
3762
-
3763
- # process the header parameters
3764
- # process the form parameters
3765
- # process the body parameter
3766
-
3767
-
3768
- # set the HTTP header `Accept`
3769
- if 'Accept' not in _header_params:
3770
- _header_params['Accept'] = self.api_client.select_header_accept(
3771
- [
3772
- 'application/json'
3773
- ]
3774
- )
3775
-
3776
-
3777
- # authentication setting
3778
- _auth_settings: List[str] = [
3779
- 'APIKey'
3780
- ]
3781
-
3782
- return self.api_client.param_serialize(
3783
- method='GET',
3784
- resource_path='/v2/functions/{function_id}/similar-functions',
3785
- path_params=_path_params,
3786
- query_params=_query_params,
3787
- header_params=_header_params,
3788
- body=_body_params,
3789
- post_params=_form_params,
3790
- files=_files,
3791
- auth_settings=_auth_settings,
3792
- collection_formats=_collection_formats,
3793
- _host=_host,
3794
- _request_auth=_request_auth
3795
- )
3796
-
3797
-
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/v2.3.0/python'
93
+ self.user_agent = 'OpenAPI-Generator/v2.9.1/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: v2.3.0\n"\
533
- "SDK Package Version: v2.3.0".\
532
+ "Version of the API: v2.9.1\n"\
533
+ "SDK Package Version: v2.9.1".\
534
534
  format(env=sys.platform, pyversion=sys.version)
535
535
 
536
536
  def get_host_settings(self) -> List[HostSetting]: