You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When apiKey and baseUrl parameters are passed to the OpenAIHandler, an error is thrown by the underlying OpenAI JavaScript library. This issue arises because these parameters, along with others, are directly passed to the completion function using the spread operator, which causes conflicts.
Steps to Reproduce
Call OpenAIHandler with apiKey and baseUrl parameters.
Observe that the library throws an error.
Expected Behavior
The OpenAIHandler should correctly separate the parameters for creating a new OpenAI object and the subset of parameters needed for the completions API call.
Actual Behavior
An error is thrown due to parameter conflicts when apiKey and baseUrl are provided.
Proposed Solution
Modify OpenAIHandler to separate the initialization parameters (apiKey, baseUrl) from the completion call parameters. This can be achieved by explicitly passing only the necessary parameters to the completions API call.
I will be submitting a pull request shortly to address this issue.
The text was updated successfully, but these errors were encountered:
Description
When
apiKey
andbaseUrl
parameters are passed to theOpenAIHandler
, an error is thrown by the underlying OpenAI JavaScript library. This issue arises because these parameters, along with others, are directly passed to the completion function using the spread operator, which causes conflicts.Steps to Reproduce
OpenAIHandler
withapiKey
andbaseUrl
parameters.Expected Behavior
The
OpenAIHandler
should correctly separate the parameters for creating a new OpenAI object and the subset of parameters needed for the completions API call.Actual Behavior
An error is thrown due to parameter conflicts when
apiKey
andbaseUrl
are provided.Proposed Solution
Modify
OpenAIHandler
to separate the initialization parameters (apiKey
,baseUrl
) from the completion call parameters. This can be achieved by explicitly passing only the necessary parameters to the completions API call.I will be submitting a pull request shortly to address this issue.
The text was updated successfully, but these errors were encountered: