XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
返回提交历史

XFEstudio/gpt4free

Add documentation for aarch64 compatibility

Co-authored-by: hlohaus <983577+hlohaus@users.noreply.github.com>

96404a9d
copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
提交于

代码差异

1 个文件 +72 -0
Added docs/aarch64-compatibility.md +72 -0
@@ -0,0 +1,72 @@
1 # aarch64 (ARM64) Compatibility
2
3 This document describes the compatibility status and known issues for g4f on aarch64 (ARM64) systems.
4
5 ## Issue Resolution
6
7 **Fixed in this release:** The "Illegal instruction (core dumped)" error that occurred when importing g4f on aarch64 systems has been resolved.
8
9 ### Problem
10 Previously, g4f would crash with "Illegal instruction (core dumped)" on ARM64 systems (such as Apple Silicon Macs, Raspberry Pi, AWS Graviton instances, etc.) due to compiled dependencies with architecture-specific optimizations.
11
12 ### Solution
13 The library now includes proper error handling for architecture-incompatible dependencies:
14 - Safe import mechanisms prevent crashes when compiled libraries are unavailable
15 - Graceful fallbacks to alternative implementations when possible
16 - Clear error messages when specific features require unavailable dependencies
17
18 ## Compatibility Status
19
20 ### ✅ Working Features
21 - Basic client functionality (`from g4f.client import Client`)
22 - CLI commands (`g4f --help`, `g4f client --help`)
23 - Providers that use standard HTTP libraries
24 - Most text generation functionality
25
26 ### ⚠️ Limited Features
27 Some advanced features may have reduced functionality on aarch64:
28 - Providers requiring `curl_cffi` will fall back to `aiohttp`
29 - Browser automation features may not be available
30 - Some performance optimizations may not be active
31
32 ### 📋 Requirements
33 For full functionality on aarch64, ensure you have:
34 ```bash
35 # Basic requirements (should work on all architectures)
36 pip install -r requirements-min.txt
37
38 # Full requirements (some packages may need compilation on aarch64)
39 pip install -r requirements.txt
40 ```
41
42 ## Testing Your Installation
43
44 You can verify your installation works correctly:
45
46 ```python
47 # Test basic import
48 from g4f.client import Client
49 client = Client()
50 print("✓ g4f imported successfully")
51
52 # Test CLI
53 import subprocess
54 result = subprocess.run(['g4f', '--help'], capture_output=True)
55 print("✓ CLI works" if result.returncode == 0 else "✗ CLI issues")
56 ```
57
58 ## Known Issues
59
60 1. **Performance**: Some providers may have reduced performance due to fallback implementations
61 2. **Browser Features**: nodriver and webview functionality may not be available
62 3. **Image Processing**: Some image-related features may have compatibility issues
63
64 ## Getting Help
65
66 If you encounter issues on aarch64:
67 1. First try with minimal requirements: `pip install -r requirements-min.txt`
68 2. Check if the issue persists with basic functionality
69 3. Report architecture-specific issues with your system details:
70 - Architecture: `uname -m`
71 - OS: `uname -a`
72 - Python version: `python --version`