本当の備忘録。
OpenRCAをOllamaで動かす。
requirements.txt の変更
以下を追加。
numpy==1.26.4
/rca/api_config.yamlの設定
以下のように。MODELは適当なモデルを設定。
SOURCE: "AI" MODEL: "gemma3:27b" API_KEY: "sk-xxxxxxxxxxxxxx" API_BASE: "http://localhost:11434/v1"
venv内のopenaiの変更
これが肝。
venv/lib/python3.11/site-packages/openai/_base_client.py 内
855 _strict_response_validation=_strict_response_validation,
856 )
--> 857 self._client = http_client or SyncHttpxClientWrapper(
858 base_url=base_url,
859 # cast to a valid type because mypy doesn't understand our type narrowing
860 timeout=cast(Timeout, timeout),
861 proxies=proxies,
862 transport=transport,
863 limits=limits,
864 follow_redirects=True,
865 )
861行目のproxiesをコメントアウト。