When calling the OpenAiChatModel
with ChatOptions
, they are always ignored. Options are considered only when using OpenAiChatOptions
or FunctionCallingOptions
.
This seems a regression after the recent refactoring of FunctionCallingOptions
. I checked all the model implementation and it's only OpenAI having this error.
Comment From: tzolov
I've noticed this issue last week. Initially the FunctionCallingOptions
where NOT extending from ChatOptions
.
So the above implementation was making sense. But since we made FunctionCallingOptions extends ChatOptions this obviously a bogus behavior and IMO we need to fix for all models.
Comment From: ThomasVitale
@tzolov I haven't seen the bug in the other chat implementations since they all already have an "else" statement that makes sure the portable options are mapped correctly. Can we get the bug fixed in OpenAI with this PR and then have the refactoring to improve the logic in a separate issue, now that FunctionCallingOptions
extends ChatOptions
?
Comment From: tzolov
@ThomasVitale i guess you are right. I was concerned about the order, but it correct (e.g. from more specific to the generic type) Thanks for the fix!