詢問 ChatGPT 答覆要我檢查 Mapleboard 有無安裝串接這兩個 LLM 的 API, 我用 pip3 show 檢查 openai 與 google-generativeai 才發現一直以來都未曾在 Mapleboard 上安裝套件進行串接 LLM 的測試, 難怪 Verify 失敗 :
tony1966@LX2438:~/flask_apps/serverless$ pip3 show openai
WARNING: Package(s) not found: openai
tony1966@LX2438:~/flask_apps/serverless$ pip3 show google-generativeai
WARNING: Package(s) not found: google-generativeai
安裝這兩個套件後 Verify 就成功了 :
pip3 install openai
tony1966@LX2438:~/flask_apps/serverless$ pip3 install openai
Defaulting to user installation because normal site-packages is not writeable
Collecting openai
Downloading openai-2.3.0-py3-none-any.whl (999 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 999.8/999.8 KB 2.8 MB/s eta 0:00:00
Requirement already satisfied: anyio<5,>=3.5.0 in /home/tony1966/.local/lib/python3.10/site-packages (from openai) (4.9.0)
Requirement already satisfied: pydantic<3,>=1.9.0 in /home/tony1966/.local/lib/python3.10/site-packages (from openai) (2.11.7)
Collecting jiter<1,>=0.10.0
Downloading jiter-0.11.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (337 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 337.6/337.6 KB 351.7 kB/s eta 0:00:00
Requirement already satisfied: distro<2,>=1.7.0 in /usr/lib/python3/dist-packages (from openai) (1.7.0)
Requirement already satisfied: tqdm>4 in /home/tony1966/.local/lib/python3.10/site-packages (from openai) (4.67.1)
Requirement already satisfied: sniffio in /home/tony1966/.local/lib/python3.10/site-packages (from openai) (1.3.1)
Requirement already satisfied: httpx<1,>=0.23.0 in /home/tony1966/.local/lib/python3.10/site-packages (from openai) (0.28.1)
Requirement already satisfied: typing-extensions<5,>=4.11 in /home/tony1966/.local/lib/python3.10/site-packages (from openai) (4.14.0)
Requirement already satisfied: exceptiongroup>=1.0.2 in /home/tony1966/.local/lib/python3.10/site-packages (from anyio<5,>=3.5.0->openai) (1.2.1)
Requirement already satisfied: idna>=2.8 in /usr/lib/python3/dist-packages (from anyio<5,>=3.5.0->openai) (3.3)
Requirement already satisfied: httpcore==1.* in /home/tony1966/.local/lib/python3.10/site-packages (from httpx<1,>=0.23.0->openai) (1.0.9)
Requirement already satisfied: certifi in /home/tony1966/.local/lib/python3.10/site-packages (from httpx<1,>=0.23.0->openai) (2024.2.2)
Requirement already satisfied: h11>=0.16 in /home/tony1966/.local/lib/python3.10/site-packages (from httpcore==1.*->httpx<1,>=0.23.0->openai) (0.16.0)
Requirement already satisfied: pydantic-core==2.33.2 in /home/tony1966/.local/lib/python3.10/site-packages (from pydantic<3,>=1.9.0->openai) (2.33.2)
Requirement already satisfied: typing-inspection>=0.4.0 in /home/tony1966/.local/lib/python3.10/site-packages (from pydantic<3,>=1.9.0->openai) (0.4.1)
Requirement already satisfied: annotated-types>=0.6.0 in /home/tony1966/.local/lib/python3.10/site-packages (from pydantic<3,>=1.9.0->openai) (0.7.0)
Installing collected packages: jiter, openai
Successfully installed jiter-0.11.0 openai-2.3.0
pip3 show google-generativeai
tony1966@LX2438:~/flask_apps/serverless$ pip3 show google-generativeai
WARNING: Package(s) not found: google-generativeai
tony1966@LX2438:~/flask_apps/serverless$ pip3 install google-generativeai
Defaulting to user installation because normal site-packages is not writeable
Collecting google-generativeai
Downloading google_generativeai-0.8.5-py3-none-any.whl (155 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 155.4/155.4 KB 728.1 kB/s eta 0:00:00
Requirement already satisfied: tqdm in /home/tony1966/.local/lib/python3.10/site-packages (from google-generativeai) (4.67.1)
Collecting google-ai-generativelanguage==0.6.15
Downloading google_ai_generativelanguage-0.6.15-py3-none-any.whl (1.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 3.8 MB/s eta 0:00:00
Collecting google-auth>=2.15.0
Downloading google_auth-2.41.1-py2.py3-none-any.whl (221 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 221.3/221.3 KB 4.5 MB/s eta 0:00:00
Requirement already satisfied: typing-extensions in /home/tony1966/.local/lib/python3.10/site-packages (from google-generativeai) (4.14.0)
Collecting google-api-core
Downloading google_api_core-2.26.0-py3-none-any.whl (162 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 162.5/162.5 KB 5.1 MB/s eta 0:00:00
Requirement already satisfied: protobuf in /home/tony1966/.local/lib/python3.10/site-packages (from google-generativeai) (6.31.1)
Collecting google-api-python-client
Downloading google_api_python_client-2.184.0-py3-none-any.whl (14.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.3/14.3 MB 4.7 MB/s eta 0:00:00
Requirement already satisfied: pydantic in /home/tony1966/.local/lib/python3.10/site-packages (from google-generativeai) (2.11.7)
Collecting proto-plus<2.0.0dev,>=1.22.3
Downloading proto_plus-1.26.1-py3-none-any.whl (50 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 50.2/50.2 KB 3.0 MB/s eta 0:00:00
Collecting protobuf
Downloading protobuf-5.29.5-cp38-abi3-manylinux2014_aarch64.whl (319 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 319.8/319.8 KB 2.5 MB/s eta 0:00:00
Collecting pyasn1-modules>=0.2.1
Downloading pyasn1_modules-0.4.2-py3-none-any.whl (181 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 181.3/181.3 KB 5.7 MB/s eta 0:00:00
Collecting rsa<5,>=3.1.4
Downloading rsa-4.9.1-py3-none-any.whl (34 kB)
Requirement already satisfied: cachetools<7.0,>=2.0.0 in /home/tony1966/.local/lib/python3.10/site-packages (from google-auth>=2.15.0->google-generativeai) (6.1.0)
Requirement already satisfied: requests<3.0.0,>=2.18.0 in /home/tony1966/.local/lib/python3.10/site-packages (from google-api-core->google-generativeai) (2.32.4)
Collecting googleapis-common-protos<2.0.0,>=1.56.2
Downloading googleapis_common_protos-1.70.0-py3-none-any.whl (294 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 294.5/294.5 KB 5.0 MB/s eta 0:00:00
Requirement already satisfied: httplib2<1.0.0,>=0.19.0 in /usr/lib/python3/dist-packages (from google-api-python-client->google-generativeai) (0.20.2)
Collecting uritemplate<5,>=3.0.1
Downloading uritemplate-4.2.0-py3-none-any.whl (11 kB)
Collecting google-auth-httplib2<1.0.0,>=0.2.0
Downloading google_auth_httplib2-0.2.0-py2.py3-none-any.whl (9.3 kB)
Requirement already satisfied: pydantic-core==2.33.2 in /home/tony1966/.local/lib/python3.10/site-packages (from pydantic->google-generativeai) (2.33.2)
Requirement already satisfied: annotated-types>=0.6.0 in /home/tony1966/.local/lib/python3.10/site-packages (from pydantic->google-generativeai) (0.7.0)
Requirement already satisfied: typing-inspection>=0.4.0 in /home/tony1966/.local/lib/python3.10/site-packages (from pydantic->google-generativeai) (0.4.1)
Collecting grpcio<2.0.0,>=1.33.2
Downloading grpcio-1.75.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (6.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.3/6.3 MB 5.4 MB/s eta 0:00:00
Collecting grpcio-status<2.0.0,>=1.33.2
Downloading grpcio_status-1.75.1-py3-none-any.whl (14 kB)
Requirement already satisfied: pyparsing!=3.0.0,!=3.0.1,!=3.0.2,!=3.0.3,<4,>=2.4.2 in /usr/lib/python3/dist-packages (from httplib2<1.0.0,>=0.19.0->google-api-python-client->google-generativeai) (2.4.7)
Collecting pyasn1<0.7.0,>=0.6.1
Downloading pyasn1-0.6.1-py3-none-any.whl (83 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 83.1/83.1 KB 2.6 MB/s eta 0:00:00
Requirement already satisfied: urllib3<3,>=1.21.1 in /home/tony1966/.local/lib/python3.10/site-packages (from requests<3.0.0,>=2.18.0->google-api-core->google-generativeai) (2.5.0)
Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3/dist-packages (from requests<3.0.0,>=2.18.0->google-api-core->google-generativeai) (3.3)
Requirement already satisfied: charset_normalizer<4,>=2 in /home/tony1966/.local/lib/python3.10/site-packages (from requests<3.0.0,>=2.18.0->google-api-core->google-generativeai) (3.4.2)
Requirement already satisfied: certifi>=2017.4.17 in /home/tony1966/.local/lib/python3.10/site-packages (from requests<3.0.0,>=2.18.0->google-api-core->google-generativeai) (2024.2.2)
Collecting grpcio-status<2.0.0,>=1.33.2
Downloading grpcio_status-1.75.0-py3-none-any.whl (14 kB)
Downloading grpcio_status-1.74.0-py3-none-any.whl (14 kB)
Downloading grpcio_status-1.73.1-py3-none-any.whl (14 kB)
Downloading grpcio_status-1.73.0-py3-none-any.whl (14 kB)
Downloading grpcio_status-1.72.2-py3-none-any.whl (14 kB)
Downloading grpcio_status-1.72.1-py3-none-any.whl (14 kB)
Downloading grpcio_status-1.71.2-py3-none-any.whl (14 kB)
Installing collected packages: uritemplate, pyasn1, protobuf, grpcio, rsa, pyasn1-modules, proto-plus, googleapis-common-protos, grpcio-status, google-auth, google-auth-httplib2, google-api-core, google-api-python-client, google-ai-generativelanguage, google-generativeai
Attempting uninstall: protobuf
Found existing installation: protobuf 6.31.1
Uninstalling protobuf-6.31.1:
Successfully uninstalled protobuf-6.31.1
Successfully installed google-ai-generativelanguage-0.6.15 google-api-core-2.26.0 google-api-python-client-2.184.0 google-auth-2.41.1 google-auth-httplib2-0.2.0 google-generativeai-0.8.5 googleapis-common-protos-1.70.0 grpcio-1.75.1 grpcio-status-1.71.2 proto-plus-1.26.1 protobuf-5.29.5 pyasn1-0.6.1 pyasn1-modules-0.4.2 rsa-4.9.1 uritemplate-4.2.0
雖然在 render.com 上成功安裝 serverless 與串接 LLM, 但免費帳戶並不保證服務品質, 還是自己維護的 Mapleboard 靠得住啦!



沒有留言 :
張貼留言