Skip to content

Commit

Permalink
Update libbs api use (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
mahaloz authored Jan 20, 2024
1 parent 0ce480b commit 1290a38
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
6 changes: 3 additions & 3 deletions dailalib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "2.2.6"
__version__ = "2.2.7"

from .api import AIAPI, OpenAIAPI
from libbs.api import DecompilerInterface
Expand Down Expand Up @@ -39,8 +39,8 @@ def create_plugin(*args, **kwargs):
plugin_name="DAILA",
init_plugin=True,
gui_ctx_menu_actions=gui_ctx_menu_actions,
ui_init_args=args,
ui_init_kwargs=kwargs
gui_init_args=args,
gui_init_kwargs=kwargs
)

openai_api.init_decompiler_interface(decompiler_interface=deci)
Expand Down
6 changes: 2 additions & 4 deletions dailalib/api/ai_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __init__(
model=None,
):
# useful for initing after the creation of a decompiler interface
self._dec_interface: Optional[DecompilerInterface] = None
self._dec_interface: DecompilerInterface = None
self._dec_name = None
self._delay_init = delay_init
if not self._delay_init:
Expand Down Expand Up @@ -93,9 +93,7 @@ def _requires_function(*args, ai_api: "AIAPI" = None, **kwargs):

# we must have a UI if we have no func
if function is None:
function = ai_api._dec_interface.art_lifter.lower(
ai_api._dec_interface.functions[ai_api._dec_interface.active_context().addr]
)
function = ai_api._dec_interface.functions[ai_api._dec_interface.gui_active_context().addr]

# get new text with the function that is present
if dec_text is None:
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ long_description_content_type = text/markdown
[options]
install_requires =
openai>=1.0.0
libbs
libbs>=0.19.0
tiktoken
varbert
varbert>=2.0.10

python_requires = >= 3.6
include_package_data = True
Expand Down

0 comments on commit 1290a38

Please sign in to comment.