feat(custom-openai): use apiKey instead of openAIApiKey
This commit is contained in:
parent
77870b39cc
commit
829b4e7134
7 changed files with 8 additions and 8 deletions
|
|
@ -38,7 +38,7 @@ export const loadAimlApiChatModels = async () => {
|
|||
chatModels[model.id] = {
|
||||
displayName: model.name || model.id,
|
||||
model: new ChatOpenAI({
|
||||
openAIApiKey: apiKey,
|
||||
apiKey: apiKey,
|
||||
modelName: model.id,
|
||||
temperature: 0.7,
|
||||
configuration: {
|
||||
|
|
@ -76,7 +76,7 @@ export const loadAimlApiEmbeddingModels = async () => {
|
|||
embeddingModels[model.id] = {
|
||||
displayName: model.name || model.id,
|
||||
model: new OpenAIEmbeddings({
|
||||
openAIApiKey: apiKey,
|
||||
apiKey: apiKey,
|
||||
modelName: model.id,
|
||||
configuration: {
|
||||
baseURL: API_URL,
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ export const getAvailableChatModelProviders = async () => {
|
|||
[customOpenAiModelName]: {
|
||||
displayName: customOpenAiModelName,
|
||||
model: new ChatOpenAI({
|
||||
openAIApiKey: customOpenAiApiKey,
|
||||
apiKey: customOpenAiApiKey,
|
||||
modelName: customOpenAiModelName,
|
||||
temperature: 0.7,
|
||||
configuration: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue