0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

OpenAIのライブラリをAWS lamda レイヤーいれるのに手こずった話

Posted at

openaiとpydanticのライブラリを使いたくてレイヤーの設定をしていたら
Unable to import module 'lambda_function': No module named 'jiter.jiter'
Unable to import module 'lambda_function': No module named 'pydantic_core._pydantic_core
こんなんでてきて困り果てました。
なんとか動くとこまでできたので共有します。

解決方法
ランタイムはpython3.9を選択
https://github.com/keithrozario/Klayers/tree/master/deployments/python3.9
からpypydanticのARNもってくる
https://github.com/erenyasarkurt/OpenAI-AWS-Lambda-Layer?tab=readme-ov-file
ここからOPENAIのzipフォルダインストールしあとにフォルダ名pythonに変えてレイヤーを作成
以上

注意
・OPENAIのライブラリ古いので,APIの設定や呼び出し方がほんの少し違う
・あくまで自己責任で

参考にしたサイト(自分はうまくいかず)
https://zenn.dev/galapagos/articles/a222e38a32f4ba
https://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q14302582744

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?