mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-12-24 03:23:49 +03:00
Update (g4f/Provider/Blackbox.py)
This commit is contained in:
parent
4cd1ed1a71
commit
d9892cebfd
@ -181,7 +181,7 @@ class Blackbox(AsyncGeneratorProvider, ProviderModelMixin):
|
|||||||
model (str): Model to use for generating responses.
|
model (str): Model to use for generating responses.
|
||||||
messages (Messages): Message history.
|
messages (Messages): Message history.
|
||||||
proxy (Optional[str]): Proxy URL, if needed.
|
proxy (Optional[str]): Proxy URL, if needed.
|
||||||
web_search_mode (bool): Enables or disables web search mode.
|
websearch (bool): Enables or disables web search mode.
|
||||||
**kwargs: Additional keyword arguments.
|
**kwargs: Additional keyword arguments.
|
||||||
|
|
||||||
Yields:
|
Yields:
|
||||||
@ -298,7 +298,7 @@ class Blackbox(AsyncGeneratorProvider, ProviderModelMixin):
|
|||||||
else:
|
else:
|
||||||
yield cleaned_response
|
yield cleaned_response
|
||||||
else:
|
else:
|
||||||
if web_search_mode:
|
if websearch:
|
||||||
match = re.search(r'\$~~~\$(.*?)\$~~~\$', cleaned_response, re.DOTALL)
|
match = re.search(r'\$~~~\$(.*?)\$~~~\$', cleaned_response, re.DOTALL)
|
||||||
if match:
|
if match:
|
||||||
source_part = match.group(1).strip()
|
source_part = match.group(1).strip()
|
||||||
|
Loading…
Reference in New Issue
Block a user