mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-06 02:30:41 -08:00
```
feat: add __call__ in field_serializer and update body wait logic
- In g4f/client/stubs.py, add a __call__ method to the field_serializer class that returns the first positional argument.
- In g4f/requests/__init__.py, replace the wait_for call with a while loop that repeatedly evaluates "document.querySelector('body:not(.no-js)')" and sleeps until the element is found.
```
This commit is contained in:
parent
3ab36ebc64
commit
17976b93a7
2 changed files with 4 additions and 1 deletions
|
|
@ -22,6 +22,8 @@ except ImportError:
|
|||
class field_serializer():
|
||||
def __init__(self, field_name):
|
||||
self.field_name = field_name
|
||||
def __call__(self, *args, **kwargs):
|
||||
return args[0]
|
||||
|
||||
class BaseModel(BaseModel):
|
||||
@classmethod
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue