Skip to content

Commit

Permalink
Update src/napari_chatgpt/omega/tools/async_base_tool.py
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
royerloic and coderabbitai[bot] authored Aug 31, 2024
1 parent 6653244 commit 6c8bced
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/napari_chatgpt/omega/tools/async_base_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ class AsyncBaseTool(BaseTool):
def normalise_to_string(self, kwargs):

# extract the value for args key in kwargs:
if isinstance(kwargs, dict):
query = kwargs.get('args', '')
else:
query = kwargs
query = kwargs.get('args', '') if isinstance(kwargs, dict) else kwargs

# If query is a singleton list, extract the value:
if isinstance(query, list) and len(query) == 1:
Expand Down

0 comments on commit 6c8bced

Please sign in to comment.