diff --git a/g4f/api/__init__.py b/g4f/api/__init__.py index 2fd83b6b..bd4c07e6 100644 --- a/g4f/api/__init__.py +++ b/g4f/api/__init__.py @@ -436,7 +436,6 @@ class Api: provider: str = None, conversation_id: str = None, x_user: Annotated[str | None, Header()] = None, - cf_ipcountry: Annotated[str | None, Header()] = None, x_forwarded_for: Annotated[str | None, Header()] = None ): if AppConfig.demo and x_forwarded_for is not None: @@ -511,7 +510,7 @@ class Api: **{ "conversation_id": None, "conversation": conversation, - "user": f"{cf_ipcountry}:{x_user}" if cf_ipcountry else x_user, + "user": x_user, } }, ignored=AppConfig.ignored_providers diff --git a/g4f/requests/__init__.py b/g4f/requests/__init__.py index 78e1811a..f2eb0936 100644 --- a/g4f/requests/__init__.py +++ b/g4f/requests/__init__.py @@ -177,7 +177,10 @@ async def get_nodriver( # Default to Edge if Chrome is not available. browser_executable_path = "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe" if not os.path.exists(browser_executable_path): - browser_executable_path = None + # Default to Chromium on Linux systems. + browser_executable_path = "/data/data/com.termux/files/usr/bin/chromium-browser" + if not os.path.exists(browser_executable_path): + browser_executable_path = None debug.log(f"Browser executable path: {browser_executable_path}") lock_file = Path(get_cookies_dir()) / ".nodriver_is_open" if user_data_dir: