We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04776e2 commit 4adbeebCopy full SHA for 4adbeeb
google/generativeai/client.py
@@ -231,14 +231,14 @@ def make_client(self, name):
231
def keep(name, f):
232
if name.startswith("_"):
233
return False
234
- elif not isinstance(f, types.FunctionType):
235
- return False
236
- elif isinstance(f, classmethod):
+
+ if not callable(f):
237
238
- elif isinstance(f, staticmethod):
+ if 'metadata' not in inspect.signature(f).parameters.keys():
239
240
- else:
241
- return True
+ return True
242
243
def add_default_metadata_wrapper(f):
244
def call(*args, metadata=(), **kwargs):
0 commit comments