diff options
author | Tekky <98614666+xtekky@users.noreply.github.com> | 2024-10-30 09:57:55 +0100 |
---|---|---|
committer | Tekky <98614666+xtekky@users.noreply.github.com> | 2024-10-30 09:57:55 +0100 |
commit | 1443c60cc86f7f02cc6c7a4b2a31d6b1dad66a26 (patch) | |
tree | 435d831df4ad5c18839cfaa647f23e5be035cdd6 /g4f/Provider/Blackbox.py | |
parent | implement direct import of `Client` without using `g4f.client` (diff) | |
parent | Merge pull request #2304 from kqlio67/main (diff) | |
download | gpt4free-1443c60cc86f7f02cc6c7a4b2a31d6b1dad66a26.tar gpt4free-1443c60cc86f7f02cc6c7a4b2a31d6b1dad66a26.tar.gz gpt4free-1443c60cc86f7f02cc6c7a4b2a31d6b1dad66a26.tar.bz2 gpt4free-1443c60cc86f7f02cc6c7a4b2a31d6b1dad66a26.tar.lz gpt4free-1443c60cc86f7f02cc6c7a4b2a31d6b1dad66a26.tar.xz gpt4free-1443c60cc86f7f02cc6c7a4b2a31d6b1dad66a26.tar.zst gpt4free-1443c60cc86f7f02cc6c7a4b2a31d6b1dad66a26.zip |
Diffstat (limited to 'g4f/Provider/Blackbox.py')
-rw-r--r-- | g4f/Provider/Blackbox.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/g4f/Provider/Blackbox.py b/g4f/Provider/Blackbox.py index 5cd43eed..4052893a 100644 --- a/g4f/Provider/Blackbox.py +++ b/g4f/Provider/Blackbox.py @@ -51,7 +51,6 @@ class Blackbox(AsyncGeneratorProvider, ProviderModelMixin): 'ReactAgent', 'XcodeAgent', 'AngularJSAgent', - 'RepoMap', ] agentMode = { @@ -78,7 +77,6 @@ class Blackbox(AsyncGeneratorProvider, ProviderModelMixin): 'ReactAgent': {'mode': True, 'id': "React Agent"}, 'XcodeAgent': {'mode': True, 'id': "Xcode Agent"}, 'AngularJSAgent': {'mode': True, 'id': "AngularJS Agent"}, - 'RepoMap': {'mode': True, 'id': "repomap"}, } userSelectedModel = { @@ -174,7 +172,7 @@ class Blackbox(AsyncGeneratorProvider, ProviderModelMixin): proxy: Optional[str] = None, image: ImageType = None, image_name: str = None, - websearch: bool = False, + web_search: bool = False, **kwargs ) -> AsyncGenerator[Union[str, ImageResponse], None]: """ @@ -186,7 +184,7 @@ class Blackbox(AsyncGeneratorProvider, ProviderModelMixin): proxy (Optional[str]): Proxy URL, if needed. image (ImageType): Image data to be processed, if any. image_name (str): Name of the image file, if an image is provided. - websearch (bool): Enables or disables web search mode. + web_search (bool): Enables or disables web search mode. **kwargs: Additional keyword arguments. Yields: @@ -276,7 +274,7 @@ class Blackbox(AsyncGeneratorProvider, ProviderModelMixin): "clickedForceWebSearch": False, "visitFromDelta": False, "mobileClient": False, - "webSearchMode": websearch, + "webSearchMode": web_search, "userSelectedModel": cls.userSelectedModel.get(model, model) } @@ -313,7 +311,7 @@ class Blackbox(AsyncGeneratorProvider, ProviderModelMixin): else: yield cleaned_response else: - if websearch: + if web_search: match = re.search(r'\$~~~\$(.*?)\$~~~\$', cleaned_response, re.DOTALL) if match: source_part = match.group(1).strip() |