[Fix] OpenAI Embedderにdimensions設定不可の場合の対応 #14
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
関連する Issue / PR
N/A
PR をマージした後の挙動の変化
修正後,text-embedding-ada-002 も正常に動くようにできました。
text-embedding-ada-002 では
dimensions
の設定が不可とされているため,今のままだと下記のエラーが出ています。dimensions=None
もできないようです。挙動の変更を達成するために行ったこと
本PRでは
dimensions
引数をmodel=text-embedding-ada-002
の場合には送らないようにし,OpenAIEmbedder
内のdimも設定と関わらず1536とします。これで解消しました。
動作確認