mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-22 11:01:22 +03:00
Support custom base URL for ChatGoogleGenerativeAI (#4347)
feat: Support custom base URL for ChatGoogleGenerativeAI
This commit is contained in:
@@ -163,6 +163,14 @@ class GoogleGenerativeAI_ChatModels implements INode {
|
||||
optional: true,
|
||||
additionalParams: true
|
||||
},
|
||||
{
|
||||
label: 'Base URL',
|
||||
name: 'baseUrl',
|
||||
type: 'string',
|
||||
description: 'Base URL for the API. Leave empty to use the default.',
|
||||
optional: true,
|
||||
additionalParams: true
|
||||
},
|
||||
{
|
||||
label: 'Allow Image Uploads',
|
||||
name: 'allowImageUploads',
|
||||
@@ -197,6 +205,7 @@ class GoogleGenerativeAI_ChatModels implements INode {
|
||||
const cache = nodeData.inputs?.cache as BaseCache
|
||||
const contextCache = nodeData.inputs?.contextCache as FlowiseGoogleAICacheManager
|
||||
const streaming = nodeData.inputs?.streaming as boolean
|
||||
const baseUrl = nodeData.inputs?.baseUrl as string | undefined
|
||||
|
||||
const allowImageUploads = nodeData.inputs?.allowImageUploads as boolean
|
||||
|
||||
@@ -211,6 +220,7 @@ class GoogleGenerativeAI_ChatModels implements INode {
|
||||
if (topK) obj.topK = parseFloat(topK)
|
||||
if (cache) obj.cache = cache
|
||||
if (temperature) obj.temperature = parseFloat(temperature)
|
||||
if (baseUrl) obj.baseUrl = baseUrl
|
||||
|
||||
// Safety Settings
|
||||
let harmCategories: string[] = convertMultiOptionsToStringArray(harmCategory)
|
||||
|
||||
Reference in New Issue
Block a user